import Link from "next/link";
import { ArrowUpRightIcon, TeamIcon } from "@/components/icons";
import { ctaBannerActionClass } from "@/components/shared/cta-banner";

type JobCtaCardProps = { title: string; text: string; applyLabel: string; applyHref: string };

/** "Ready to make an impact?" strip under the job details (Figma: gradient card, 32px / 24px padding). */
export function JobCtaCard({ title, text, applyLabel, applyHref }: JobCtaCardProps) {
  return (
    <div className="flex flex-col items-start gap-5 rounded-3xl border border-accent-violet/25 bg-cta-card px-5 py-6 md:flex-row md:items-center md:justify-between md:px-8">
      <div className="flex items-center gap-4">
        <span className="flex size-12 shrink-0 items-center justify-center rounded-full border border-accent-violet/40 bg-accent-violet/10 text-accent-violet-light">
          <TeamIcon className="size-5" />
        </span>
        <div className="flex flex-col gap-3 font-heading lg:gap-5">
          <h2 className="text-xl leading-6 font-semibold text-white lg:text-2xl">{title}</h2>
          <p className="text-sm leading-4 text-soft">{text}</p>
        </div>
      </div>
      <Link href={applyHref} prefetch className={ctaBannerActionClass}>
        {applyLabel}
        <ArrowUpRightIcon data-icon="inline-end" className="rtl:-scale-x-100" />
      </Link>
    </div>
  );
}
