/*
 * Wonder Platform - Theme System
 * Industrial Design Language - CSS Custom Properties
 * Version: 1.0
 */

/* ============================================
   ROOT VARIABLES - DARK THEME (DEFAULT)
   ============================================ */

:root, [data-theme="dark"] {
    /* Background Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;

    /* Text Colors */
    --text-primary: #e8e8e8;
    --text-secondary: #a8a8a8;
    --text-muted: #686868;

    /* Border Colors */
    --border-subtle: #2a2a2a;
    --border-strong: #404040;

    /* Industrial Accent Colors */
    --accent-sentinel: #00D4FF;
    --accent-wise: #9B59B6;
    --accent-mentor: #FF6B6B;

    /* Status Colors - ANSI Standard */
    --status-operational: #00C896;
    --status-warning: #FFB800;
    --status-critical: #FF3E3E;
    --status-offline: #505050;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;

    /* Type Scale */
    --text-xs: 0.75rem;      /* 12px - labels */
    --text-sm: 0.875rem;     /* 14px - secondary */
    --text-base: 1rem;       /* 16px - body */
    --text-lg: 1.125rem;     /* 18px - emphasized */
    --text-xl: 1.5rem;       /* 24px - section headers */
    --text-2xl: 2rem;        /* 32px - page headers */
    --text-3xl: 3rem;        /* 48px - hero metrics */

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Spacing Scale */
    --space-xs: 0.25rem;     /* 4px */
    --space-sm: 0.5rem;      /* 8px */
    --space-md: 1rem;        /* 16px */
    --space-lg: 1.5rem;      /* 24px */
    --space-xl: 2rem;        /* 32px */
    --space-2xl: 3rem;       /* 48px */

    /* Border Radius - Minimal for industrial look */
    --radius-sharp: 0px;
    --radius-sm: 2px;
    --radius-md: 4px;

    /* Shadows - Subtle industrial elevation */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);

    /* Transitions - Professional, not playful */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* ============================================
   LIGHT THEME
   ============================================ */

[data-theme="light"] {
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #ffffff;

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #8a8a8a;

    /* Border Colors */
    --border-subtle: #e0e0e0;
    --border-strong: #b0b0b0;

    /* Shadows - Adjusted for light theme */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

    /* Industrial Accents - Stay the same */
    /* Status colors - Stay the same */
    /* Typography - Stays the same */
}

/* ============================================
   THEME TRANSITION
   ============================================ */

html {
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Apply smooth color transitions to all elements */
* {
    transition: color var(--transition-base),
                background-color var(--transition-base),
                border-color var(--transition-base);
}

/* Disable transitions on theme change for instant switch */
html.theme-transitioning * {
    transition: none !important;
}
