/*
 * CyberEthix Design System Tokens
 * Single source of truth for all design decisions
 * Version: 1.0.0
 */

:root {
    /* ===================================
       COLOR PALETTE
       =================================== */
    
    /* Primary Brand Colors */
    --color-primary-50: #fee2e2;
    --color-primary-100: #fecaca;
    --color-primary-200: #fca5a5;
    --color-primary-300: #f87171;
    --color-primary-400: #ef4444;
    --color-primary-500: #D20103;
    --color-primary-600: #a80102;
    --color-primary-700: #7f0101;
    --color-primary-800: #560101;
    --color-primary-900: #2d0000;
    
    /* Neutral Colors - Grayscale Palette */
    --color-neutral-50: #f8f9fa;
    --color-neutral-100: #e9ecef;
    --color-neutral-200: #dee2e6;
    --color-neutral-300: #ced4da;
    --color-neutral-400: #adb5bd;
    --color-neutral-500: #6c757d;
    --color-neutral-600: #495057;
    --color-neutral-700: #343a40;
    --color-neutral-800: #212529;
    --color-neutral-900: #0a0b0d;
    
    /* Light Theme Text Colors (WCAG AA Compliant on white) */
    --text-light-primary: #212529;        /* 16.1:1 contrast on white */
    --text-light-secondary: #495057;      /* 9.4:1 contrast on white */
    --text-light-muted: #6c757d;          /* 4.5:1 contrast on white (AA minimum) */
    --text-light-heading: #1a1d23;        /* 17.9:1 contrast on white */
    
    /* Dark Theme Text Colors */
    --text-dark-primary: #f8f9fa;
    --text-dark-secondary: #adb5bd;
    --text-dark-muted: #6c757d;
    
    /* Semantic Colors */
    --color-success: #28a745;
    --color-success-light: #34ce57;
    --color-success-dark: #1e7e34;
    
    --color-warning: #ffc107;
    --color-warning-light: #ffcd39;
    --color-warning-dark: #d39e00;
    
    --color-danger: #dc3545;
    --color-danger-light: #e4606d;
    --color-danger-dark: #bd2130;
    
    --color-info: #17a2b8;
    --color-info-light: #3fc1d4;
    --color-info-dark: #117a8b;
    
    /* ===================================
       SEMANTIC SURFACES & BACKGROUNDS
       =================================== */
    
    /* Light Theme Surfaces */
    --surface-light-primary: var(--color-neutral-50);
    --surface-light-secondary: #ffffff;
    --surface-light-card: #ffffff;
    --surface-light-modal: #ffffff;
    --surface-light-navbar: #ffffff;
    --surface-light-table: #ffffff;
    --surface-light-hover: var(--color-neutral-100);
    
    /* Dark Theme Surfaces */
    --surface-dark-primary: var(--color-neutral-900);
    --surface-dark-secondary: var(--color-neutral-800);
    --surface-dark-card: #141619;
    --surface-dark-modal: #141619;
    --surface-dark-navbar: #242831;
    --surface-dark-table: #141619;
    --surface-dark-hover: #242831;
    
    /* Alert Backgrounds (Light Theme) */
    --alert-light-info-bg: #d1ecf1;
    --alert-light-info-border: #bee5eb;
    --alert-light-info-text: #0c5460;
    
    --alert-light-success-bg: #d4edda;
    --alert-light-success-border: #c3e6cb;
    --alert-light-success-text: #155724;
    
    --alert-light-warning-bg: #fff3cd;
    --alert-light-warning-border: #ffeeba;
    --alert-light-warning-text: #856404;
    
    --alert-light-danger-bg: #f8d7da;
    --alert-light-danger-border: #f5c6cb;
    --alert-light-danger-text: #721c24;
    
    /* Alert Backgrounds (Dark Theme) */
    --alert-dark-info-bg: rgba(23, 162, 184, 0.2);
    --alert-dark-info-border: rgba(23, 162, 184, 0.4);
    --alert-dark-info-text: var(--color-info-light);
    
    --alert-dark-success-bg: rgba(40, 167, 69, 0.2);
    --alert-dark-success-border: rgba(40, 167, 69, 0.4);
    --alert-dark-success-text: var(--color-success-light);
    
    --alert-dark-warning-bg: rgba(255, 193, 7, 0.2);
    --alert-dark-warning-border: rgba(255, 193, 7, 0.4);
    --alert-dark-warning-text: var(--color-warning-light);
    
    --alert-dark-danger-bg: rgba(220, 53, 69, 0.2);
    --alert-dark-danger-border: rgba(220, 53, 69, 0.4);
    --alert-dark-danger-text: var(--color-danger-light);
    
    /* ===================================
       TYPOGRAPHY
       =================================== */
    
    /* Font Families */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: "Courier New", Courier, monospace;
    
    /* Font Sizes - Modular Scale (1.250 - Major Third) */
    --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.563rem;    /* 25px */
    --font-size-3xl: 1.953rem;    /* 31px */
    --font-size-4xl: 2.441rem;    /* 39px */
    --font-size-5xl: 3.052rem;    /* 49px */
    --font-size-6xl: 3.815rem;    /* 61px */
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* Letter Spacing */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0em;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    
    /* ===================================
       SPACING - 8px Grid System
       =================================== */
    
    --spacing-0: 0;
    --spacing-1: 0.5rem;   /* 8px */
    --spacing-2: 1rem;     /* 16px */
    --spacing-3: 1.5rem;   /* 24px */
    --spacing-4: 2rem;     /* 32px */
    --spacing-5: 2.5rem;   /* 40px */
    --spacing-6: 3rem;     /* 48px */
    --spacing-8: 4rem;     /* 64px */
    --spacing-10: 5rem;    /* 80px */
    --spacing-12: 6rem;    /* 96px */
    --spacing-16: 8rem;    /* 128px */
    
    /* ===================================
       BORDERS
       =================================== */
    
    --border-width-thin: 1px;
    --border-width-medium: 2px;
    --border-width-thick: 4px;
    
    --border-radius-none: 0;
    --border-radius-sm: 0.25rem;    /* 4px */
    --border-radius-base: 0.5rem;   /* 8px */
    --border-radius-md: 0.75rem;    /* 12px */
    --border-radius-lg: 1rem;       /* 16px */
    --border-radius-xl: 1.5rem;     /* 24px */
    --border-radius-2xl: 2rem;      /* 32px */
    --border-radius-full: 9999px;
    
    /* ===================================
       SHADOWS
       =================================== */
    
    --shadow-none: none;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.15), 0 4px 8px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.2), 0 6px 12px -2px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px -4px rgba(0, 0, 0, 0.25), 0 12px 24px -4px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 30px 60px -6px rgba(0, 0, 0, 0.3);
    
    /* Focus Shadows */
    --shadow-focus-primary: 0 0 0 3px rgba(210, 1, 3, 0.25);
    --shadow-focus-success: 0 0 0 3px rgba(40, 167, 69, 0.25);
    --shadow-focus-warning: 0 0 0 3px rgba(255, 193, 7, 0.25);
    --shadow-focus-danger: 0 0 0 3px rgba(220, 53, 69, 0.25);
    
    /* ===================================
       TRANSITIONS
       =================================== */
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ===================================
       Z-INDEX SCALE
       =================================== */
    
    --z-index-dropdown: 1000;
    --z-index-sticky: 1020;
    --z-index-fixed: 1030;
    --z-index-modal-backdrop: 1040;
    --z-index-modal: 1050;
    --z-index-popover: 1060;
    --z-index-tooltip: 1070;
}

/* ===================================
   DARK THEME OVERRIDES
   =================================== */

[data-theme="dark"] {
    /* Semantic shadows for dark mode */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.4);
    --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.6), 0 4px 8px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.7), 0 6px 12px -2px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px -4px rgba(0, 0, 0, 0.8), 0 12px 24px -4px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 30px 60px -6px rgba(0, 0, 0, 0.9);
}

/* ===================================
   LIGHT THEME OVERRIDES
   =================================== */

[data-theme="light"] {
    /* Keep default light shadows */
}
