/**
 * Design Tokens for noviCEV
 * Mobile-first design system foundation
 * Includes light/dark mode support
 */

:root,
[data-bs-theme="light"] {
  /* ====================================================================
     PRIMARY COLOR SCALE
     Based on the existing primary color #1E9483
     ==================================================================== */
  --color-primary-50: #e6f7f5;
  --color-primary-100: #b3e8e3;
  --color-primary-200: #80d9d1;
  --color-primary-300: #4dcabf;
  --color-primary-400: #26bfb1;
  --color-primary-500: #1E9483;  /* Current primary */
  --color-primary-600: #187a6c;
  --color-primary-700: #125f54;
  --color-primary-800: #0c453c;
  --color-primary-900: #062a24;

  /* ====================================================================
     NEUTRAL COLORS
     ==================================================================== */
  --color-neutral-0: #ffffff;
  --color-neutral-50: #f9fafb;
  --color-neutral-100: #f3f4f6;
  --color-neutral-200: #e5e7eb;
  --color-neutral-300: #d1d5db;
  --color-neutral-400: #9ca3af;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #4b5563;
  --color-neutral-700: #374151;
  --color-neutral-800: #1f2937;
  --color-neutral-900: #111827;

  /* ====================================================================
     SEMANTIC COLORS
     ==================================================================== */
  --color-positive: #10b981;
  --color-positive-light: #ecfdf5;
  --color-positive-border: #86efac;

  --color-negative: #ef4444;
  --color-negative-light: #fef2f2;
  --color-negative-border: #fca5a5;

  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;
  --color-warning-border: #fcd34d;

  --color-info: #3b82f6;
  --color-info-light: #eff6ff;
  --color-info-border: #93c5fd;

  /* ====================================================================
     POLITICAL BIAS COLORS
     Kept for consistency with existing bias badge system
     ==================================================================== */
  --bias-left: #cc3333;
  --bias-left-border: #a32929;
  --bias-lean-left: #dd7755;
  --bias-lean-left-border: #bb5533;
  --bias-neutral: #28a745;
  --bias-neutral-border: #1e7e34;
  --bias-lean-right: #5599dd;
  --bias-lean-right-border: #3377bb;
  --bias-right: #0066cc;
  --bias-right-border: #0052a3;
  --bias-populist: #ff9933;
  --bias-populist-border: #e67300;
  --bias-state: #000000;
  --bias-state-border: #333333;
  --bias-satire: #9966cc;
  --bias-satire-border: #7744aa;
  --bias-unknown: #6c757d;
  --bias-unknown-border: #545b62;

  /* ====================================================================
     SPACING SCALE (8px base unit)
     ==================================================================== */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* ====================================================================
     BORDER RADIUS
     ==================================================================== */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* ====================================================================
     SHADOWS
     ==================================================================== */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* ====================================================================
     TRANSITIONS
     ==================================================================== */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;

  /* Easing functions */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ====================================================================
     TOUCH TARGETS (44px minimum for accessibility - WCAG 2.1 AAA)
     ==================================================================== */
  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;

  /* ====================================================================
     Z-INDEX SCALE
     ==================================================================== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* ====================================================================
     TYPOGRAPHY SCALE
     ==================================================================== */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */

  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ====================================================================
     LAYOUT
     ==================================================================== */
  --container-max-width: 1200px;
  --navbar-height: 64px;
  --navbar-height-mobile: 56px;

  /* ====================================================================
     FOCUS STATES (Accessibility)
     ==================================================================== */
  --focus-ring-color: var(--color-primary-300);
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;

  /* ====================================================================
     SEMANTIC COLORS - Light Mode
     ==================================================================== */
  --bg-primary: var(--color-neutral-0);
  --bg-secondary: var(--color-neutral-50);
  --bg-tertiary: var(--color-neutral-100);
  --text-primary: var(--color-neutral-900);
  --text-secondary: var(--color-neutral-600);
  --text-muted: var(--color-neutral-400);
  --border-color: var(--color-neutral-200);
  --border-color-light: var(--color-neutral-100);
  --card-bg: var(--color-neutral-0);
  --navbar-bg: rgba(255, 255, 255, 0.98);
  --navbar-bg-scrolled: rgba(255, 255, 255, 0.85);
  --navbar-text: var(--color-neutral-900);
  --input-bg: var(--color-neutral-0);
  --input-border: var(--color-neutral-300);
  --dropdown-bg: var(--color-neutral-0);
  --modal-bg: var(--color-neutral-0);
}

/* ====================================================================
   DARK MODE SUPPORT
   ==================================================================== */
[data-bs-theme="dark"] {
  /* Adjusted shadows for dark mode */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.6);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.6);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.7);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.3);

  /* Semantic colors - Dark Mode */
  --bg-primary: #0f1419;
  --bg-secondary: #1a1f29;
  --bg-tertiary: #252d3a;
  --text-primary: #e8eaed;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: #2d3748;
  --border-color-light: #1f2937;
  --card-bg: #1a1f29;
  --navbar-bg: rgba(26, 31, 41, 0.96);         /* slightly translucent card color */
  --navbar-bg-scrolled: rgba(26, 31, 41, 0.92);/* slightly more transparent on scroll */
  --filter-bar-bg: rgba(26, 31, 41, 0.96);     /* filters bar matches navbar */
  --filters-panel-bg: #1a1f29;                 /* filters panel fully blended */
  --navbar-text: #e8eaed;
  --input-bg: #1a1f29;
  --input-border: #374151;
  --dropdown-bg: #1a1f29;
  --modal-bg: #1a1f29;

  /* Adjusted focus ring for dark mode */
  --focus-ring-color: var(--color-primary-400);
}
