/* Santa Tracker - Tactical Map HUD Styles */

/* Import Google Fonts - Fredoka (Chunky, Toy-like) + Nunito (Readable) */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    /* Cozy North Pole Night palette */
    --christmas-red: #dc2626;
    --christmas-dark-red: #991b1b;
    --christmas-crimson: #7f1d1d;
    --christmas-green: #166534;
    --pine-green: #166534;
    --holly-green: #15803d;
    --christmas-gold: #fbbf24;
    --warm-white: #f8fafc;
    --snow-white: #fffafa;
    --ice-blue: #60a5fa;

    /* Night sky gradient */
    --night-deep: #1d1f21;
    --night-mid: #1e1b4b;
    --night-blue: #0a1929;
    
    /* Map background - matches CartoDB Dark Matter tiles */
    --map-background: #1d1f21;

    /* Fonts - Fredoka for headings (Chunky/Toy-like), Nunito for body */
    --font-display: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--night-deep);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Glass Pill Navigation - Fixed Top Center */
.glass-nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgb(255 255 255 / 10%);
    backdrop-filter: blur(12px);
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 9999px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--warm-white);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
    background: rgb(255 255 255 / 15%);
}

.nav-link-active {
    background: rgb(255 255 255 / 20%);
}

/* Full Screen Map */
.map-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.map-fullscreen .map {
    width: 100%;
    height: 100%;
}

/* Note: Dark mode map tiles are now using CartoDB Dark Matter provider.
   CSS filter no longer needed as tiles are natively dark. */

/* Set background color for unloaded map tiles to match dark theme */
.leaflet-container {
    background: var(--night-deep);
}

/* Mission Control Panel - Floating Left (Dark Glass Style) */
.mission-control {
    position: fixed;
    top: 6rem;
    left: 1.5rem;
    width: 320px;
    z-index: 50;
    background: rgb(15 23 42 / 80%);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgb(0 0 0 / 40%);
    border: 1px solid rgb(255 255 255 / 10%);
    overflow: hidden;
}

.panel-header {
    background: linear-gradient(to bottom, var(--christmas-red), var(--christmas-dark-red));
    padding: 1rem 1.25rem;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--warm-white);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Info Boxes - Dark Glass HUD Style */
.info-box {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgb(30 41 59 / 70%);
    transition: transform 0.2s ease;
}

.info-box:hover {
    transform: translateX(4px);
}

.info-box-blue {
    border-left: 4px solid var(--ice-blue);
}

.info-box-green {
    border-left: 4px solid var(--pine-green);
}

.info-box-red {
    border-left: 4px solid var(--christmas-red);
}

.info-box-gold {
    border-left: 4px solid var(--christmas-gold);
}

.info-title {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(148 163 184);
    margin: 0 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: rgb(248 250 252);
    margin: 0;
}

.info-value-large {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--christmas-red);
}

/* Countdown Widget - Top Right */
.countdown-hud {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    background: rgb(255 255 255 / 10%);
    backdrop-filter: blur(12px);
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 16px;
    padding: 0.75rem 1.25rem;
}

.countdown-hud-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--warm-white);
    opacity: 0.8;
    margin: 0 0 0.25rem;
}

.countdown-hud-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--christmas-gold);
}

/* Hide old elements */
.header,
.main-container,
.footer,
.map-section,
.sidebar,
.map-help {
    display: none;
}

/* Responsive Design */
@media (width <= 768px) {
    .mission-control {
        inset: auto 1rem 1rem;
        width: auto;
        max-height: 40vh;
        overflow-y: auto;
    }

    .countdown-hud {
        top: 1rem;
        right: 1rem;
    }

    .glass-nav {
        top: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 3px solid var(--christmas-gold);
    outline-offset: 2px;
}

/* Pre-Flight Panel Styles */
.preflight-panel .panel-header-preflight {
    background: linear-gradient(to bottom, #991b1b, #7f1d1d);
}

/* Status indicator dots */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.status-grounded {
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
}

.status-flying {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.status-landed {
    background: #3b82f6;
    box-shadow: 0 0 8px #3b82f6;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Weather info box style */
.info-box-status {
    border-left: 4px solid #fbbf24;
}

.info-box-weather {
    border-left: 4px solid #60a5fa;
}

/* Liftoff Toast Notification */
.liftoff-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: linear-gradient(135deg, var(--christmas-red), var(--christmas-dark-red));
    border-radius: 20px;
    padding: 2rem 3rem;
    box-shadow: 0 20px 60px rgb(0 0 0 / 60%);
    border: 2px solid var(--christmas-gold);
    animation: toast-appear 0.5s ease-out forwards;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toast-icon {
    font-size: 3rem;
    animation: rocket-shake 0.5s ease-in-out infinite;
}

.toast-message {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warm-white);
    text-shadow: 0 2px 4px rgb(0 0 0 / 30%);
}

@keyframes toast-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes toast-disappear {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@keyframes rocket-shake {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-5px) rotate(5deg);
    }
}

/* Panel visibility styles */
.preflight-panel,
.live-panel {
    transition: opacity 0.5s ease-out;
}

.panel-hidden {
    opacity: 0;
    pointer-events: none;
}