/* Shared navbar/footer tokens and utilities. */
/* ═══════════════════════════════════════════════════════════════════════════
   🎨 GLOBAL CSS VARIABLES - Blue Theme
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* ─────────────────────────────────────────────────────────────────────
   PRIMARY BLUES - Main Theme
   ───────────────────────────────────────────────────────────────────── */
    --pastel-blue: #7EC8E3;
    --pastel-blue-light: #B8E2F2;
    --pastel-blue-dark: #5BB5D6;
    --pastel-blue-deep: #3A9FC9;
    --pastel-blue-pale: #E8F4FA;
    --pastel-sky: #E3F4FC;
    --pastel-sky-dark: #C5E8F7;
    --pastel-navy: #2E7D9B;
    --pastel-navy-dark: #1F5F7A;
    --pastel-navy-deep: #165066;
    --pastel-cream: #FAFCFD;

    /* ─────────────────────────────────────────────────────────────────────
   Extended Blue Spectrum
   ───────────────────────────────────────────────────────────────────── */
    --pastel-azure: #0EA5E9;
    --pastel-azure-light: #38BDF8;
    --pastel-azure-dark: #0284C7;
    --pastel-cyan: #22D3EE;
    --pastel-cyan-light: #67E8F9;
    --pastel-cyan-dark: #06B6D4;
    --pastel-teal: #14B8A6;
    --pastel-teal-light: #5EEAD4;
    --pastel-teal-dark: #0D9488;
    --pastel-indigo: #6366F1;
    --pastel-indigo-light: #818CF8;
    --pastel-indigo-dark: #4F46E5;
    --pastel-sapphire: #2563EB;
    --pastel-sapphire-light: #3B82F6;
    --pastel-sapphire-dark: #1D4ED8;

    /* ─────────────────────────────────────────────────────────────────────
   Silver/Steel Accents
   ───────────────────────────────────────────────────────────────────── */
    --pastel-steel: #64748B;
    --pastel-steel-light: #94A3B8;
    --pastel-steel-dark: #475569;
    --pastel-silver: #CBD5E1;
    --pastel-silver-light: #E2E8F0;

    /* ─────────────────────────────────────────────────────────────────────
   Gold (Royal Award ONLY - Exception)
   ───────────────────────────────────────────────────────────────────── */
    --gold-primary: #D4AF37;
    --gold-light: #F4E4A6;
    --gold-dark: #B8960C;

    /* ─────────────────────────────────────────────────────────────────────
   Grays
   ───────────────────────────────────────────────────────────────────── */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* ─────────────────────────────────────────────────────────────────────
   Utilities
   ───────────────────────────────────────────────────────────────────── */
    --transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --font-thai: 'Sarabun', 'Noto Serif Thai', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    color-scheme: light;
}

html.dark-mode {
    color-scheme: dark;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🌙 DARK MODE GLOBAL STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
:is(body.dark-mode, html.dark-mode body) {
    background: linear-gradient(135deg, #0a0f1a 0%, #0f172a 50%, #1e293b 100%) !important;
    color: #e2e8f0 !important;

    /* ─────────────────────────────────────────────────────────────────────
   Dark Mode Colors
   ───────────────────────────────────────────────────────────────────── */
    --dark-bg-primary: #0a0f1a;
    --dark-bg-secondary: #0f172a;
    --dark-bg-tertiary: #1e293b;
    --dark-bg-elevated: #293548;
    --dark-bg-card: #1e293b;

    --dark-text-primary: #f1f5f9;
    --dark-text-secondary: #e2e8f0;
    --dark-text-tertiary: #cbd5e1;
    --dark-text-muted: #94a3b8;

    --dark-blue: #7EC8E3;
    --dark-blue-light: #B8E2F2;
    --dark-cyan: #22D3EE;
    --dark-cyan-light: #67E8F9;
    --dark-azure: #38BDF8;
    --dark-sapphire: #3B82F6;
    --dark-indigo: #818CF8;
    --dark-teal: #5EEAD4;

    --dark-border-subtle: #334155;
    --dark-border-default: #475569;
    --dark-border-strong: #64748b;
}

/* Smooth transitions for theme-aware shared components */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tb1-topbar,
.tb1-topbar *,
.tb1-navbar,
.tb1-navbar *,
.premium-footer,
.premium-footer * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🔄 SHARED ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes shimmerBorder {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.15);
    }
}

@keyframes rotateGlow {
    0% {
        filter: blur(8px) hue-rotate(0deg);
    }

    100% {
        filter: blur(8px) hue-rotate(360deg);
    }
}

@keyframes ft-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes ft-status-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes ft-aqi-ring {
    0% {
        transform: scale(0.85);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎨 AQI LEVEL COLORS (Standard - Universal)
   ═══════════════════════════════════════════════════════════════════════════ */
.aqi-excellent,
.ft-aqi-excellent {
    background: linear-gradient(135deg, #00e400, #00c853) !important;
    color: #fff !important;
    border-color: #00e400 !important;
}

.aqi-good,
.ft-aqi-good {
    background: linear-gradient(135deg, #92d050, #7cb342) !important;
    color: #fff !important;
    border-color: #92d050 !important;
}

.aqi-moderate,
.ft-aqi-moderate {
    background: linear-gradient(135deg, #ffd000, #ffc107) !important;
    color: #333 !important;
    border-color: #ffd000 !important;
}

.aqi-unhealthy,
.ft-aqi-unhealthy {
    background: linear-gradient(135deg, #ff7e00, #f57c00) !important;
    color: #fff !important;
    border-color: #ff7e00 !important;
}

.aqi-very-unhealthy,
.ft-aqi-very-unhealthy {
    background: linear-gradient(135deg, #ff0000, #d32f2f) !important;
    color: #fff !important;
    border-color: #ff0000 !important;
}

.aqi-hazardous,
.ft-aqi-hazardous {
    background: linear-gradient(135deg, #99004c, #7b1fa2) !important;
    color: #fff !important;
    border-color: #99004c !important;
}

/* Text Colors */
.aqi-text-excellent,
.ft-aqi-text-excellent {
    color: #00c853 !important;
}

.aqi-text-good,
.ft-aqi-text-good {
    color: #7cb342 !important;
}

.aqi-text-moderate,
.ft-aqi-text-moderate {
    color: #d4a000 !important;
}

.aqi-text-unhealthy,
.ft-aqi-text-unhealthy {
    color: #ff7e00 !important;
}

.aqi-text-very-unhealthy,
.ft-aqi-text-very-unhealthy {
    color: #ff0000 !important;
}

.aqi-text-hazardous,
.ft-aqi-text-hazardous {
    color: #99004c !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ♿ ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🖨️ PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
    :is(body.dark-mode, html.dark-mode body) {
        background: white !important;
        color: black !important;
    }

    :is(body.dark-mode, html.dark-mode body) * {
        background: white !important;
        color: black !important;
        border-color: #ccc !important;
    }
}
