/* Design tokens adapted from elastask-frontend/src/styles/tokens.scss */
/* Semantic design tokens - Material Design 3 based system */

/* ============================================================================
   LIGHT THEME (Default)
   ============================================================================ */
:root,
.theme-light {
  /* Colors - Material Design 3 Vibrant Orange Theme (Seed: #EF6C00) */
  --color-primary: rgb(239 108 0);
  --color-on-primary: rgb(255 255 255);
  --color-surface: rgb(255 251 248);
  --color-on-surface: rgb(32 26 22);
  --color-surface-variant: rgb(243 223 209);
  --color-on-surface-muted: rgb(82 68 58);
  --color-outline: rgb(132 116 105);
  --color-error: rgb(186 26 26);
  --color-on-error: rgb(255 255 255);

  /* Semantic Status Colors */
  --color-success: #2e7d32;
  --color-on-success: #ffffff;
  --color-warning: #ed6c02;
  --color-info: #0288d1;

  /* Spacing - T-shirt sizing */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 0.75rem;  /* 12px */
  --space-lg: 1rem;     /* 16px */
  --space-xl: 1.5rem;   /* 24px */
  --space-2xl: 2rem;    /* 32px */
  --space-3xl: 3rem;    /* 48px */
  --space-4xl: 4rem;    /* 64px */

  /* Typography */
  --font-sans: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Font Sizes - T-shirt sizing */
  --text-xs: 0.75rem;   /* 12px */
  --text-sm: 0.875rem;  /* 14px */
  --text-md: 1rem;      /* 16px */
  --text-lg: 1.25rem;   /* 20px */
  --text-xl: 1.5rem;    /* 24px */
  --text-2xl: 2rem;     /* 32px */
  --text-3xl: 2.5rem;   /* 40px */
  --text-4xl: 3rem;     /* 48px */

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Border Radius - T-shirt sizing */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 40px;
  --radius-full: 999px;

  /* Shadows - T-shirt sizing */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.14);

  /* Motion */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-emphasized: cubic-bezier(0.4, 0, 0.2, 1);

  /* Effects */
  --opacity-disabled: 0.38;
  --opacity-hover: 0.08;
  --opacity-focus: 0.12;
  --opacity-muted: 0.6;

  /* Layout */
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-tooltip: 1600;
  --size-interactive-min: 2.75rem; /* 44px touch target */

  /* Container widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* Icon sizes */
  --icon-size-sm: 1.5rem;   /* 24px */
  --icon-size-md: 2.5rem;   /* 40px */
  --icon-size-lg: 3rem;     /* 48px */

  /* Content widths */
  --content-max-sm: 300px;
  --content-max-md: 600px;
  --content-max-lg: 800px;
  --content-max-xl: 900px;

  /* Grid */
  --card-min-width: 280px;

  /* Layout components */
  --header-height: 60px;
  --sidebar-width: 250px;
}

/* ============================================================================
   DARK THEME
   ============================================================================ */
.theme-dark {
  /* Colors - Material Design 3 Vibrant Orange Theme (Dark) */
  --color-primary: rgb(255 184 128);
  --color-on-primary: rgb(98 43 0);
  --color-surface: rgb(24 20 16);
  --color-on-surface: rgb(238 227 218);
  --color-surface-variant: rgb(82 68 58);
  --color-on-surface-muted: rgb(214 195 181);
  --color-outline: rgb(159 143 131);
  --color-error: rgb(255 180 171);
  --color-on-error: rgb(105 0 5);

  /* Semantic Status Colors - Lighter for dark theme */
  --color-success: #81c784;
  --color-on-success: #000000;
  --color-warning: #ffb74d;
  --color-info: #4fc3f7;

  /* Shadows - Heavier for dark theme */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.55);
}

/* Auto dark theme based on system preference */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    /* Colors */
    --color-primary: rgb(255 184 128);
    --color-on-primary: rgb(98 43 0);
    --color-surface: rgb(24 20 16);
    --color-on-surface: rgb(238 227 218);
    --color-surface-variant: rgb(82 68 58);
    --color-on-surface-muted: rgb(214 195 181);
    --color-outline: rgb(159 143 131);
    --color-error: rgb(255 180 171);
    --color-on-error: rgb(105 0 5);

    /* Semantic Status Colors */
    --color-success: #81c784;
    --color-on-success: #000000;
    --color-warning: #ffb74d;
    --color-info: #4fc3f7;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.55);
  }
}
