import { MousePointerClick, Package, Scale, Truck } from 'lucide-react';

const benefits = [
  { icon: Scale, text: 'Compare couriers instantly' },
  { icon: MousePointerClick, text: 'Buy labels in one click' },
  { icon: Truck, text: 'Track every parcel' },
] as const;

/** Right-hand brand panel for the auth layout (desktop only). Decorative values are static. */
export function AuthBrandPanel() {
  return (
    <aside className="sticky top-4 hidden h-[calc(100vh-2rem)] p-4 pl-0 lg:block" aria-label="Why ShipHub">
      <div className="relative isolate flex h-full flex-col overflow-hidden rounded-2xl bg-brand-gradient p-10 xl:p-14 text-primary-foreground shadow-lg">
        {/* Decorative layers */}
        <div className="pointer-events-none absolute inset-0 -z-10 hidden bg-[rgb(var(--ink-from)/0.35)] dark:block" aria-hidden="true" />
        <div className="pointer-events-none absolute inset-0 -z-10 bg-mesh opacity-60 [--accent:255_255_255] [--primary:255_255_255]" aria-hidden="true" />
        <div className="pointer-events-none absolute inset-0 -z-10 bg-grid opacity-25 [--border:255_255_255]" aria-hidden="true" />
        <div className="pointer-events-none absolute -right-24 -top-24 -z-10 h-72 w-72 rounded-full bg-primary-foreground/10 blur-2xl" aria-hidden="true" />

        <div className="flex max-w-md flex-1 flex-col justify-center py-6">
          <h2 className="font-display text-[36px] font-extrabold leading-[2.75rem] tracking-[-0.03em] text-primary-foreground">
            Ship smarter, from one dashboard.
          </h2>
          <ul className="mt-8 grid gap-4">
            {benefits.map(({ icon: Icon, text }) => (
              <li key={text} className="flex items-center gap-3 text-[16px] font-medium text-primary-foreground/90">
                <span className="grid h-9 w-9 place-items-center rounded-full bg-primary-foreground/15 ring-1 ring-inset ring-primary-foreground/20">
                  <Icon className="h-4 w-4" aria-hidden="true" />
                </span>
                {text}
              </li>
            ))}
          </ul>

          {/* Floating glass shipment-status mock */}
          <div className="mt-10 motion-safe:animate-[fade-up_400ms_cubic-bezier(0.2,0.8,0.2,1)_200ms_both]" aria-hidden="true">
            <div className="animate-float rounded-xl border border-primary-foreground/20 bg-primary-foreground/[0.12] p-5 shadow-lg backdrop-blur-md [animation-duration:6s]">
              <div className="flex items-center gap-3">
                <span className="grid h-10 w-10 place-items-center rounded-lg bg-primary-foreground/20">
                  <Package className="h-5 w-5" />
                </span>
                <div className="min-w-0 flex-1">
                  <p className="text-small font-semibold">Parcel in transit</p>
                  <p className="font-mono text-caption text-primary-foreground/70">SHP10427781DE</p>
                </div>
                <span className="rounded-pill bg-primary-foreground/20 px-2.5 py-1 text-[11px] font-semibold">65%</span>
              </div>
              <div className="relative mt-4 h-2 overflow-hidden rounded-pill bg-primary-foreground/20">
                <div className="relative h-full w-[65%] overflow-hidden rounded-pill bg-primary-foreground">
                  <span className="absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-transparent via-primary/30 to-transparent motion-safe:animate-[sheen_1.8s_ease-in-out_infinite]" />
                </div>
              </div>
              <div className="mt-3 flex justify-between text-caption text-primary-foreground/75">
                <span>Berlin → Toronto</span>
                <span>
                  Estimated delivery <span className="font-semibold text-primary-foreground">Thursday</span>
                </span>
              </div>
            </div>
          </div>
        </div>

        {/* TODO replace with a real customer quote */}
        <figure className="max-w-md rounded-xl border border-primary-foreground/15 bg-primary-foreground/[0.08] p-5 backdrop-blur-sm">
          <blockquote className="text-small leading-6 text-primary-foreground/90">
            &ldquo;We stopped juggling courier portals. Rates, labels and tracking now live in one place, and the team ships twice as fast.&rdquo;
          </blockquote>
          <figcaption className="mt-4 flex items-center gap-3">
            <span className="grid h-9 w-9 place-items-center rounded-full bg-primary-foreground/20 text-caption font-bold" aria-hidden="true">
              JM
            </span>
            <span>
              <span className="block text-small font-semibold">Jordan Miles</span>
              <span className="block text-caption text-primary-foreground/70">Operations lead, example store</span>
            </span>
          </figcaption>
        </figure>
      </div>
    </aside>
  );
}
