/* Theme CSS Variables - Centralized Theme Color Definitions */

/* Dark Theme (Default - Current Theme) */
:root[data-theme="dark"],
:root:not([data-theme]) {
    /* Background Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --bg-hover: #2a2a2a;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #6c757d;
    
    /* Border Colors */
    --border-color: #3a3a3a;
    --border-light: #2a2a2a;
    
    /* Accent Colors */
    --accent-primary: #9ca3af;
    --accent-secondary: #6b7280;
    
    /* Semantic Colors */
    --success-color: #22c55e; /* More vibrant green */
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --info-color: #0ea5e9;
    
    /* Low-Contrast Semantic Colors for Results Page */
    --success-low-contrast: #66BB6A;
    --error-low-contrast: #EF9A9A;
    --success-bg-low-contrast: rgba(102, 187, 106, 0.3);
    --error-bg-low-contrast: rgba(239, 154, 154, 0.3);
    --success-text-low-contrast: #4CAF50;
    --error-text-low-contrast: #E57373;
    
    /* Logo Blue Colors for Test Mode Selection */
    --logo-blue: #4a90e2;
    --logo-blue-dark: #2c5282;
    
    /* IndianRed Color for Wrong Answer Highlighting */
    --indian-red: #CD5C5C;
    --indian-red-dark: #8B3A3A;
    
    /* Status Message Color (Yellow Ochre for Dark Theme) */
    --status-message-color: #CC7722;
    
    /* Surface Colors */
    --surface-color: #2d2d2d;
    --surface-hover: #3a3a3a;
    
    /* Table Colors */
    --table-lines: #3a3a3a;
    --table-striped: #2a2a2a;
    
    /* Input Colors */
    --input-bg: #1a1a1a;
    --input-border: #4a4a4a;
    --input-focus: #9ca3af;
    
    /* Gray Scale */
    --gray-default: #4a4a4a;
    --gray-light: #6a6a6a;
    --gray-lighter: #8a8a8a;
    
    /* AppBar & Drawer */
    --appbar-bg: #1D1D1D;
    --appbar-text: #ffffff;
    --drawer-bg: #1A1A1A;
    --drawer-text: #ffffff;
    --drawer-header-bg: #212122;
}

/* Light Theme */
:root[data-theme="light"] {
    /* Background Colors (more contrast between levels) */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --bg-hover: #d8d8d8; /* Darker hover for visibility */
    
    /* Text Colors (stronger contrast) */
    --text-primary: #1a1a1a;
    --text-secondary: #3d4852;
    --text-muted: #5a6168;
    
    /* Border Colors (slightly darker) */
    --border-color: #ced4da;
    --border-light: #dee2e6;
    
    /* Accent Colors (Maintain brand colors) */
    --accent-primary: #9ca3af;
    --accent-secondary: #6b7280;
    
    /* Semantic Colors */
    --success-color: #22c55e; /* More vibrant green */
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --info-color: #0ea5e9;
    
    /* Low-Contrast Semantic Colors for Results Page */
    --success-low-contrast: #C8E6C9;
    --error-low-contrast: #FFCDD2;
    --success-bg-low-contrast: rgba(200, 230, 201, 0.3);
    --error-bg-low-contrast: rgba(255, 205, 210, 0.3);
    --success-text-low-contrast: #2E7D32;
    --error-text-low-contrast: #C62828;
    
    /* Logo Blue Colors for Test Mode Selection */
    --logo-blue: #4a90e2;
    --logo-blue-dark: #2c5282;
    
    /* IndianRed Color for Wrong Answer Highlighting */
    --indian-red: #CD5C5C;
    --indian-red-dark: #8B3A3A;
    
    /* Status Message Color (Green for Light Theme) */
    --status-message-color: var(--mud-palette-success);
    
    /* Surface Colors (better contrast) */
    --surface-color: #f8f9fa;
    --surface-hover: #e2e6ea;
    
    /* Table Colors */
    --table-lines: #dee2e6;
    --table-striped: #f8f9fa;
    
    /* Input Colors */
    --input-bg: #ffffff;
    --input-border: #adb5bd;
    --input-focus: #9ca3af;
    
    /* Gray Scale (significantly darker for icon visibility) */
    --gray-default: #6c757d;
    --gray-light: #868e96;
    --gray-lighter: #adb5bd;
    
    /* AppBar & Drawer */
    --appbar-bg: #ffffff;
    --appbar-text: #1a1a1a;
    --drawer-bg: #ffffff;
    --drawer-text: #1a1a1a;
    --drawer-header-bg: #f8f9fa;
}

/* Smooth Theme Transitions */
* {
    transition: background-color 2s ease-in-out, color 2s ease-in-out, border-color 2s ease-in-out;
}

/* Disable transitions for theme switching to prevent flash */
body.theme-switching * {
    transition: none !important;
}

