@import 'tailwindcss';
@import 'tw-animate-css';

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

/*
  Aeroflot Virtual Theme
  - Light (:root) and Dark (.dark) color variables
  - Keeps original variable names so it plugs into existing UI
  - Palette informed by Aeroflot brand: deep blue, bright red, neutral grays
*/

:root {
  /* Base */
  --background: oklch(0.98 0.005 240); /* near white */
  --foreground: oklch(0.12 0.02 240); /* deep text */

  /* Panels / surface */
  --card: oklch(0.99 0.01 240);
  --card-foreground: oklch(0.12 0.02 240);

  /* Brand */
  --primary: #0b3d91;            /* Aeroflot deep blue */
  --primary-foreground: #ffffff;

  --secondary: #d6192a;          /* Aeroflot red */
  --secondary-foreground: #ffffff;

  /* Muted / UI neutrals */
  --muted: oklch(0.94 0.01 240);
  --muted-foreground: oklch(0.45 0.02 240);

  /* Accent for subtle highlights */
  --accent: oklch(0.85 0.03 40);
  --accent-foreground: oklch(0.12 0.02 240);

  /* States */
  --destructive: oklch(0.64 0.21 25);
  --destructive-foreground: #ffffff;

  --success: oklch(0.6 0.12 140);
  --success-foreground: #ffffff;

  /* Controls & outlines */
  --border: oklch(0.88 0.02 240);
  --input: oklch(0.96 0.02 240);
  --ring: var(--primary);

  /* Panels mapping */
  --panel-background: var(--card);
  --panel-foreground: var(--card-foreground);
  --panel-primary: var(--primary);
  --panel-primary-foreground: var(--primary-foreground);
  --panel-accent: var(--secondary);
  --panel-accent-foreground: var(--secondary-foreground);
  --panel-border: var(--border);
  --panel-ring: var(--ring);

  /* Dropdowns / menus */
  --dropdown-background: oklch(0.97 0.008 240);
  --dropdown-foreground: oklch(0.12 0.02 240);

  --nav-hover: oklch(0.95 0 0);
}

/* Dark mode – tuned for legibility with Aeroflot branding */
.dark {
  --background: oklch(0.08 0.02 240); /* near-black */
  --foreground: oklch(0.96 0.005 240); /* near-white */

  --card: oklch(0.12 0.02 240);
  --card-foreground: oklch(0.98 0.005 240);

  /* Brand (lighter blue for readability on dark) */
  --primary: #71a7ff;
  --primary-foreground: #071020;

  /* Secondary stays vibrant red (works on dark background) */
  --secondary: #ff5a66;
  --secondary-foreground: #071020;

  --muted: oklch(0.18 0.02 240);
  --muted-foreground: oklch(0.76 0.01 240);

  --accent: oklch(0.32 0.04 40);
  --accent-foreground: oklch(0.98 0.005 240);

  --destructive: oklch(0.56 0.19 25);
  --destructive-foreground: oklch(0.98 0.005 240);

  --success: oklch(0.6 0.12 140);
  --success-foreground: oklch(0.98 0.005 240);

  --border: oklch(0.24 0.02 240);
  --input: oklch(0.14 0.03 240);
  --ring: var(--primary);

  --panel-background: oklch(0.06 0.01 240);
  --panel-foreground: oklch(0.98 0.005 240);
  --panel-primary: var(--primary);
  --panel-primary-foreground: var(--primary-foreground);
  --panel-accent: oklch(0.28 0.05 40);
  --panel-accent-foreground: var(--panel-accent-foreground);
  --panel-border: oklch(0.18 0.02 240);
  --panel-ring: var(--ring);

  --dropdown-background: oklch(0.08 0.01 240);
  --dropdown-foreground: oklch(0.98 0.005 240);

  --nav-hover: oklch(0.18 0.01 240);
}

/* Inline mapping for libraries that use @theme inline variables */
@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-panel: var(--panel-background);
  --color-panel-foreground: var(--panel-foreground);
  --color-panel-primary: var(--panel-primary);
  --color-panel-primary-foreground: var(--panel-primary-foreground);
  --color-panel-accent: var(--panel-accent);
  --color-panel-accent-foreground: var(--panel-accent-foreground);
  --color-panel-border: var(--panel-border);
  --color-panel-ring: var(--panel-ring);
  --color-dropdown: var(--dropdown-background);
  --color-dropdown-foreground: var(--dropdown-foreground);
  --color-overlay: var(--overlay);
  --color-nav-hover: var(--nav-hover);
}

/* Helpful notes (do not remove):
   - This file preserves your original variable names so components expecting
     --primary, --panel-background etc. continue to work.
   - To enable the Aeroflot theme, add the class `aeroflot-theme` to <html>
     or <body>. For dark mode use `aeroflot-theme dark`.
   - Example: <html class="aeroflot-theme"> or <html class="aeroflot-theme dark">
*/
