@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
}

:root {
  /* Light mode: D3 — Blush White + Burgundy primary + Cream text on buttons */
  --radius: 0.625rem;
  --background: oklch(0.98 0.008 5);            /* #FDF6F6 blush white */
  --foreground: oklch(0.18 0.07 5);             /* #2A0410 deep burgundy text */
  --card: oklch(1 0 0);                          /* pure white cards */
  --card-foreground: oklch(0.18 0.07 5);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.18 0.07 5);
  --primary: oklch(0.38 0.13 10);               /* #8C1A2E rich burgundy */
  --primary-foreground: oklch(0.96 0.01 80);    /* #F5EDD8 cream on burgundy */
  --secondary: oklch(0.94 0.02 5);              /* soft blush secondary */
  --secondary-foreground: oklch(0.18 0.07 5);
  --muted: oklch(0.95 0.01 5);                  /* #F5EAEA light blush muted */
  --muted-foreground: oklch(0.45 0.04 5);       /* muted burgundy-toned grey */
  --accent: oklch(0.92 0.02 5);                 /* very light blush accent */
  --accent-foreground: oklch(0.18 0.07 5);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.88 0.03 5);                /* #E0C0C4 blush pink border */
  --input: oklch(0.90 0.02 5);
  --ring: oklch(0.38 0.13 10);                 /* burgundy ring */
  --chart-1: oklch(0.38 0.13 10);
  --chart-2: oklch(0.62 0.12 75);
  --chart-3: oklch(0.50 0.10 10);
  --chart-4: oklch(0.72 0.13 75);
  --chart-5: oklch(0.28 0.08 5);
  --sidebar: oklch(0.97 0.005 5);
  --sidebar-foreground: oklch(0.18 0.07 5);
  --sidebar-primary: oklch(0.38 0.13 10);
  --sidebar-primary-foreground: oklch(0.96 0.01 80);
  --sidebar-accent: oklch(0.94 0.02 5);
  --sidebar-accent-foreground: oklch(0.18 0.07 5);
  --sidebar-border: oklch(0.88 0.03 5);
  --sidebar-ring: oklch(0.38 0.13 10);
}

.dark {
  /* Dark mode: D3 — Deep Maroon bg + Logo Gold primary */
  --background: oklch(0.10 0.05 5);            /* #180408 deep maroon */
  --foreground: oklch(0.96 0.01 80);            /* #F5EDD8 warm cream */
  --card: oklch(0.13 0.06 5);                   /* #220810 slightly lighter maroon */
  --card-foreground: oklch(0.96 0.01 80);
  --popover: oklch(0.13 0.06 5);
  --popover-foreground: oklch(0.96 0.01 80);
  --primary: oklch(0.72 0.13 75);              /* #C9A84C logo gold */
  --primary-foreground: oklch(0.10 0.05 5);    /* deep maroon on gold */
  --secondary: oklch(0.17 0.07 5);             /* medium maroon */
  --secondary-foreground: oklch(0.96 0.01 80);
  --muted: oklch(0.17 0.06 5);                 /* muted maroon */
  --muted-foreground: oklch(0.68 0.03 80);     /* soft cream grey */
  --accent: oklch(0.19 0.07 5);               /* maroon accent */
  --accent-foreground: oklch(0.72 0.13 75);   /* gold on accent */
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 8%);               /* subtle white border */
  --input: oklch(1 0 0 / 10%);
  --ring: oklch(0.72 0.13 75);               /* gold ring */
  --chart-1: oklch(0.72 0.13 75);
  --chart-2: oklch(0.62 0.11 80);
  --chart-3: oklch(0.52 0.09 75);
  --chart-4: oklch(0.82 0.14 70);
  --chart-5: oklch(0.45 0.07 80);
  --sidebar: oklch(0.08 0.04 5);             /* darkest maroon for sidebar */
  --sidebar-foreground: oklch(0.96 0.01 80);
  --sidebar-primary: oklch(0.72 0.13 75);
  --sidebar-primary-foreground: oklch(0.10 0.05 5);
  --sidebar-accent: oklch(0.13 0.06 5);
  --sidebar-accent-foreground: oklch(0.72 0.13 75);
  --sidebar-border: oklch(1 0 0 / 8%);
  --sidebar-ring: oklch(0.72 0.13 75);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground overflow-x-hidden;
  }
}

/* Utility: hide scrollbar but keep scroll functionality */
@layer utilities {
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
  .safe-area-bottom {
    padding-bottom: max(0.625rem, env(safe-area-inset-bottom));
  }
}
