/* ===================================================================
   AIBOOSTER DESIGN TOKENS SYSTEM
   Version: 2.0.0 (Professional Marketing Edition)
   Purpose: Design tokens with theme/font/density/look support
   =================================================================== */

/* ===== DEFAULT TOKENS (Light Theme, Medium Font, Comfortable Density, Material Look) ===== */
:root {
    /* === BRAND IDENTITY === */
    --brand-primary: #6366f1;           /* Indigo — app primary */
    --brand-primary-dark: #4f46e5;
    --brand-primary-light: #818cf8;
    --brand-cta: #e94560;               /* Coral-red — CTA, highlights */
    --brand-cta-dark: #c73652;
    --brand-cta-light: #f06980;

    /* === COLORS === */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    
    --color-secondary: #e94560;
    --color-secondary-light: #f06980;
    --color-secondary-dark: #c73652;
    
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-success-dark: #059669;
    
    --color-warning: #f59e0b;
    --color-warning-light: #fbbf24;
    --color-warning-dark: #d97706;
    
    --color-danger: #ef4444;
    --color-danger-light: #f87171;
    --color-danger-dark: #dc2626;
    
    --color-info: #3b82f6;
    --color-info-light: #60a5fa;
    --color-info-dark: #2563eb;
    
    /* Neutrals */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    
    /* Semantic Colors */
    --color-background: #ffffff;
    --color-surface: #f9fafb;
    --color-text: #1f2937;
    --color-text-secondary: #6b7280;
    --color-border: #e5e7eb;
    
    /* === SPACING === */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    --spacing-3xl: 4rem;      /* 64px */
    
    /* === TYPOGRAPHY === */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-family-display: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    --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 */
    --font-size-5xl: 3rem;        /* 48px */
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* === 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 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* === TRANSITIONS === */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* === Z-INDEX === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    /* === MARKETING BACKGROUNDS === */
    --mkt-dark-bg: #0f0f1a;
    --mkt-dark-surface: #1a1a2e;
    --mkt-dark-border: rgba(255,255,255,0.08);
    --mkt-dark-text: rgba(255,255,255,0.75);
}

/* ===================================================================
   THEME: DARK
   =================================================================== */
:root[data-theme="dark"] {
    --color-primary: #818cf8;
    --color-primary-light: #a5b4fc;
    --color-primary-dark: #6366f1;
    
    --color-secondary: #f472b6;
    --color-secondary-light: #f9a8d4;
    --color-secondary-dark: #ec4899;
    
    --color-success: #34d399;
    --color-success-light: #6ee7b7;
    --color-success-dark: #10b981;
    
    --color-warning: #fbbf24;
    --color-warning-light: #fcd34d;
    --color-warning-dark: #f59e0b;
    
    --color-danger: #f87171;
    --color-danger-light: #fca5a5;
    --color-danger-dark: #ef4444;
    
    --color-info: #60a5fa;
    --color-info-light: #93c5fd;
    --color-info-dark: #3b82f6;
    
    /* Semantic Colors */
    --color-background: #1f2937;
    --color-surface: #374151;
    --color-text: #f9fafb;
    --color-text-secondary: #d1d5db;
    --color-border: #4b5563;
}

/* ===================================================================
   THEME: GRAY
   =================================================================== */
:root[data-theme="gray"] {
    --color-primary: #6b7280;
    --color-primary-light: #9ca3af;
    --color-primary-dark: #4b5563;
    
    --color-secondary: #9ca3af;
    --color-background: #f3f4f6;
    --color-surface: #e5e7eb;
    --color-text: #111827;
    --color-text-secondary: #6b7280;
    --color-border: #d1d5db;
}

/* ===================================================================
   FONT SCALE: SMALL
   =================================================================== */
:root[data-font="sm"] {
    --font-size-xs: 0.625rem;     /* 10px */
    --font-size-sm: 0.75rem;      /* 12px */
    --font-size-base: 0.875rem;   /* 14px */
    --font-size-lg: 1rem;         /* 16px */
    --font-size-xl: 1.125rem;     /* 18px */
    --font-size-2xl: 1.25rem;     /* 20px */
    --font-size-3xl: 1.5rem;      /* 24px */
    --font-size-4xl: 1.875rem;    /* 30px */
    --font-size-5xl: 2.25rem;     /* 36px */
}

/* ===================================================================
   FONT SCALE: LARGE
   =================================================================== */
:root[data-font="lg"] {
    --font-size-xs: 0.875rem;     /* 14px */
    --font-size-sm: 1rem;         /* 16px */
    --font-size-base: 1.125rem;   /* 18px */
    --font-size-lg: 1.25rem;      /* 20px */
    --font-size-xl: 1.5rem;       /* 24px */
    --font-size-2xl: 1.875rem;    /* 30px */
    --font-size-3xl: 2.25rem;     /* 36px */
    --font-size-4xl: 3rem;        /* 48px */
    --font-size-5xl: 4rem;        /* 64px */
}

/* ===================================================================
   DENSITY: COMPACT
   =================================================================== */
:root[data-density="compact"] {
    --spacing-xs: 0.125rem;   /* 2px */
    --spacing-sm: 0.25rem;    /* 4px */
    --spacing-md: 0.5rem;     /* 8px */
    --spacing-lg: 0.75rem;    /* 12px */
    --spacing-xl: 1rem;       /* 16px */
    --spacing-2xl: 1.5rem;    /* 24px */
    --spacing-3xl: 2rem;      /* 32px */
}

/* ===================================================================
   DENSITY: COMFORTABLE (Default - already defined in :root)
   =================================================================== */

/* ===================================================================
   LOOK: MATERIAL (Default - already defined in :root)
   =================================================================== */

/* ===================================================================
   LOOK: IOS
   =================================================================== */
:root[data-look="ios"] {
    --radius-sm: 0.5rem;      /* 8px */
    --radius-md: 0.75rem;     /* 12px */
    --radius-lg: 1rem;        /* 16px */
    --radius-xl: 1.5rem;      /* 24px */
    --radius-2xl: 2rem;       /* 32px */
    
    /* iOS typically has larger touch targets */
    --button-height: 44px;
    --input-height: 44px;
}

:root[data-look="material"] {
    --button-height: 36px;
    --input-height: 36px;
}

/* ===================================================================
   APPLY TOKENS TO BODY
   =================================================================== */
body {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-background);
}

/* ===================================================================
   GRADIENTS (Theme-aware)
   =================================================================== */
:root {
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    --gradient-success: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
    --gradient-warning: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);
    --gradient-danger: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
    --gradient-info: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);
    
    --gradient-brand: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-cta) 100%);
    --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-pink: linear-gradient(135deg, #e94560 0%, #c73652 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* ===================================================================
   GLASS EFFECT
   =================================================================== */
:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

:root[data-theme="dark"] {
    --glass-bg: rgba(31, 41, 55, 0.7);
    --glass-border: rgba(75, 85, 99, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ===================================================================
   UTILITY: Apply theme-aware colors to common elements
   =================================================================== */
a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

hr {
    border-color: var(--color-border);
}

/* ===================================================================
   INITIALIZATION SCRIPT (to be added to _Host.cshtml or index.html)
   =================================================================== */
/* 
<script>
    // Initialize theme from localStorage on page load
    (function() {
        const theme = localStorage.getItem('theme') || 'light';
        const font = localStorage.getItem('font-scale') || 'md';
        const density = localStorage.getItem('density') || 'comfortable';
        const look = localStorage.getItem('look') || 'material';
        
        document.body.setAttribute('data-theme', theme);
        document.body.setAttribute('data-font', font);
        document.body.setAttribute('data-density', density);
        document.body.setAttribute('data-look', look);
    })();
</script>
*/
