/* ============================================
   Akasa Virtual - Light/Dark Theme System
   Version 1.0
   ============================================ */

/* ============================================
   Theme Toggle Button
   ============================================ */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

/* Moon icon (shown in light mode) */
[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}


/* ============================================
   Light Theme Variables Override
   ============================================ */

[data-theme="light"] {
    /* Background Colors */
    --bg-dark: #F5F5F7;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.06);
    
    /* Border Colors */
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-hover: rgba(0, 0, 0, 0.2);
    
    /* Text Colors */
    --text-primary: #1A1A1F;
    --text-secondary: rgba(0, 0, 0, 0.65);
    --text-muted: rgba(0, 0, 0, 0.45);
    
    /* Brand colors stay the same but with adjusted light variants */
    --color-primary-light: rgba(255, 99, 0, 0.12);
    --color-secondary-light: rgba(92, 15, 217, 0.12);
}

/* ============================================
   Light Theme Specific Overrides
   ============================================ */

/* Navigation */
[data-theme="light"] nav {
    background: rgba(245, 245, 247, 0.85);
}

[data-theme="light"] nav.scrolled {
    background: rgba(245, 245, 247, 0.95);
}

/* Background Animation Orbs - dimmed in light mode */
[data-theme="light"] .bg-gradient-orb {
    opacity: 0.15;
}

/* Cards and Sections */
[data-theme="light"] .stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 245, 0.95));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .stat-card:hover {
    box-shadow: 0 10px 30px rgba(255, 99, 0, 0.12);
}

[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .feature-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Rank Cards */
[data-theme="light"] .rank-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 245, 0.95));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .rank-card:hover {
    box-shadow: 0 8px 25px rgba(255, 99, 0, 0.1);
}

/* Extended Stats */
[data-theme="light"] .extended-stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 245, 0.95));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Partner Logos */
[data-theme="light"] .partner-logo {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .partner-logo:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 25px rgba(255, 99, 0, 0.1);
}

/* Flight Cards */
[data-theme="light"] .flight-card {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .flight-card:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 20px rgba(255, 99, 0, 0.1);
}

[data-theme="light"] .flight-card.selected {
    background: rgba(255, 99, 0, 0.08);
}

/* Map Container */
[data-theme="light"] .map-container {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .map-header {
    background: rgba(255, 255, 255, 0.5);
}

/* EFB Section */
[data-theme="light"] .efb-container {
    background: linear-gradient(135deg, rgba(92, 15, 217, 0.08), rgba(255, 99, 0, 0.08));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .efb-device {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Footer */
[data-theme="light"] footer {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .footer-social a {
    background: rgba(255, 255, 255, 0.8);
}

/* Buttons - outline variant */
[data-theme="light"] .btn-outline {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(255, 255, 255, 1);
}

/* Social Links */
[data-theme="light"] .social-link {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .social-link:hover {
    background: rgba(255, 99, 0, 0.1);
}

/* Hero Badge */
[data-theme="light"] .hero-badge {
    background: rgba(255, 99, 0, 0.08);
}

/* Live Indicator */
[data-theme="light"] .live-indicator {
    background: rgba(34, 197, 94, 0.08);
}


/* ============================================
   Map Page Specific Light Theme
   ============================================ */

[data-theme="light"] .map-page {
    background: var(--bg-dark);
}

[data-theme="light"] .map-page-header {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .flight-sidebar {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .sidebar-header {
    background: transparent;
}

[data-theme="light"] .btn-back {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .btn-back:hover {
    background: rgba(255, 99, 0, 0.1);
}

/* Leaflet Map - Light Tiles (optional - you can keep dark tiles) */
[data-theme="light"] .leaflet-container {
    background: #E0E0E0;
}

[data-theme="light"] #flight-map {
    background: #E0E0E0;
}

[data-theme="light"] .leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.98);
}

/* Leaflet controls in light mode */
[data-theme="light"] .leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .leaflet-control-zoom a:hover {
    background: rgba(255, 255, 255, 1);
}

[data-theme="light"] .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
}

[data-theme="light"] .leaflet-control-attribution a {
    color: var(--color-primary);
}


/* ============================================
   Smooth Theme Transition
   ============================================ */

body,
nav,
.stat-card,
.feature-card,
.rank-card,
.flight-card,
.btn,
.social-link,
footer,
.map-container,
.efb-container,
.efb-device,
.partner-logo,
.extended-stat-card,
.map-page,
.map-page-header,
.flight-sidebar,
.btn-back,
.leaflet-container,
.leaflet-popup-content-wrapper {
    transition: background 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}