/* TSI Light Theme Override
   Activated when html[data-theme="light"] is set.
   Non-breaking: if this file isn't loaded, dark theme persists. */

[data-theme="light"] {
    /* Backgrounds */
    --bg-dark: #f5f5f0;
    --bg-card: #ffffff;
    --tsi-dark: #f5f5f0;
    --tsi-black: #f5f5f0;
    --tsi-gray-dark: #e8e8e3;

    /* Text */
    --text: #1a1a1a;
    --text-dim: #555555;
    --tsi-white: #1a1a1a;
    --tsi-gray-light: #555555;
    --tsi-gray: #666666;

    /* Primary stays the same */
    --primary: #FF6600;
    --tsi-orange: #FF6600;
    --tsi-orange-dark: #cc5200;
    --tsi-orange-light: #ff8533;

    /* Secondary - darker green for light background contrast */
    --secondary: #228B22;
    --tsi-green: #228B22;
    --tsi-green-dark: #1a6e1a;
    --tsi-green-light: #2da32d;
    --neon-green: #228B22;

    /* Accents */
    --electric-orange: #cc3700;
    --gold: #c5a000;
    --tsi-gold: #c5a000;

    /* Glows - toned down for light theme */
    --glow-orange: rgba(255, 102, 0, 0.3);
    --glow-green: rgba(34, 139, 34, 0.3);
    --glow-neon: rgba(34, 139, 34, 0.4);
    --glow-electric: rgba(204, 55, 0, 0.4);
    --glow-active: rgba(255, 102, 0, 0.3);
    --glow-success: rgba(34, 139, 34, 0.3);
    --glow-error: rgba(244, 67, 54, 0.3);

    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);

    /* Borders */
    --border-color: #e0e0e0;

    /* Shadows - lighter for light theme */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(255, 102, 0, 0.15);
}

/* Smooth transition on theme change */
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Override hard-coded dark backgrounds on common elements */
[data-theme="light"] body {
    background-color: #f5f5f0;
    color: #1a1a1a;
}

/* Cards and panels */
[data-theme="light"] .tsi-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #e0e0e0;
}

/* Override inline background colors on common card patterns */
[data-theme="light"] [style*="background"][style*="#1a1a1a"],
[data-theme="light"] [style*="background"][style*="#0a0a0a"],
[data-theme="light"] [style*="background"][style*="rgb(26"],
[data-theme="light"] [style*="background"][style*="rgb(10"] {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
}

/* Species background overlay - reduce opacity in light mode */
[data-theme="light"] .species-background.active {
    opacity: 0.1;
}

/* Scrollbar styling for light theme */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f0f0f0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c0c0c0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}
