/* Otori — shadcn semantic layer.
   Loaded AFTER fig-tokens.css, so the re-alias block below wins the cascade.

   How it works:
   1. shadcn tokens (--primary, --secondary, …) are declared here with Otori's
      actual visual values (Figma is source of truth: primary = corporate red).
   2. The Figma-side tokens the materialized components reference (--logo-red,
      --base-primary, …) are re-pointed AT the shadcn tokens.
   → Consumers restyle everything by overriding the shadcn tokens only:
      :root { --primary: oklch(0.62 0.21 260); }  ← all red CTAs follow. */

:root {
  --radius: 0.65rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* ---- shadcn tokens (defaults = Otori's shipped visuals) ---- */
  --background: oklch(1 0 0);
  --foreground: oklch(0.141 0.005 285.823);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.141 0.005 285.823);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.141 0.005 285.823);
  --primary: rgb(227,30,37);              /* Otori corporate red (Figma --logo-red) */
  --primary-foreground: rgb(255,255,255);
  --secondary: oklch(0.967 0.001 286.375);
  --secondary-foreground: oklch(0.21 0.006 285.885);
  --muted: oklch(0.967 0.001 286.375);
  --muted-foreground: oklch(0.552 0.016 285.938);
  --accent: oklch(0.967 0.001 286.375);
  --accent-foreground: oklch(0.21 0.006 285.885);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.92 0.004 286.32);
  --input: oklch(0.92 0.004 286.32);
  --ring: rgb(163,163,163);               /* focus ring seen in the kit */
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.141 0.005 285.823);
  --sidebar-border: oklch(0.92 0.004 286.32);

  /* Link color — the codebase runtime primary (blue-600); kept separate from
     --primary so re-theming CTAs doesn't recolor links unless you want it to. */
  --link: oklch(0.623 0.214 259.815);
  --link-hover: oklch(0.546 0.245 262.881);

  /* ---- re-alias: Figma tokens the components reference → shadcn tokens ---- */
  --logo-red: var(--primary);
  --base-primary: var(--primary);
  --base-primary-2: var(--primary);
  --base-primary-foreground: var(--primary-foreground);
  --base-primary-foreground-2: var(--primary-foreground);
  --base-secondary: var(--secondary);
  --base-secondary-2: var(--secondary);
  --base-secondary-foreground: var(--secondary-foreground);
  --base-secondary-foreground-2: var(--secondary-foreground);
  --base-accent: var(--accent);
  --base-accent-2: var(--accent);
  --base-accent-foreground: var(--accent-foreground);
  --base-accent-foreground-2: var(--accent-foreground);
  --base-background: var(--background);
  --base-background-2: var(--background);
  --base-foreground: var(--foreground);
  --base-foreground-2: var(--foreground);
  --base-card: var(--card);
  --base-card-foreground: var(--card-foreground);
  --base-popover: var(--popover);
  --base-popover-foreground: var(--popover-foreground);
  --base-muted: var(--muted);
  --base-muted-2: var(--muted);
  --base-muted-foreground: var(--muted-foreground);
  --base-muted-foreground-2: var(--muted-foreground);
  --base-destructive: var(--destructive);
  --base-border: var(--border);
  --base-border-2: var(--border);
  --base-input: var(--input);
  --base-input-2: var(--input);
  --base-ring: var(--ring);
  --base-ring-2: var(--ring);
  --base-ring-offset: var(--background);
  --base-ring-offset-2: var(--background);
  --base-sidebar-border: var(--sidebar-border);
  --base-sidebar-foreground: var(--sidebar-foreground);

  /* CRM global header — theme color (tenant-themable; not always navy) */
  --header-bg: rgb(52,72,104);
  --header-fg: rgba(255,255,255,0.95);

  /* Booking-status palette seen throughout the Figma calendar screens */
  --status-request-bg: rgb(254,242,242);   /* red-50  */
  --status-request-border: rgb(254,202,202); /* red-200 */
  --status-request-fg: rgb(220,38,38);     /* red-600 */
  --status-confirmed-bg: rgb(236,253,245); /* emerald-50 */
  --status-confirmed-border: rgb(167,243,208);
  --status-pending-bg: rgb(255,247,237);   /* orange-50 */
  --status-pending-border: rgb(254,215,170);
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 4px; }
