/* =========================================================================
   Interactive Features — Premium Redesign
   ========================================================================= */

/* ===== SVG Map ===== */
.map-container svg path {
    fill: var(--gray);
    stroke: var(--bg);
    stroke-width: 1.5;
    transition: fill 0.25s ease, filter 0.25s ease;
    cursor: pointer;
    transform-origin: center;
}

[data-theme="dark"] .map-container svg path {
    fill: #2a2a2a;
    stroke: var(--bg);
}

.map-container svg path:hover {
    fill: #bfdbfe;
    /* blue-200 */
}

[data-theme="dark"] .map-container svg path:hover {
    fill: #1e3a5f;
}

.map-container svg path.active {
    fill: var(--blue);
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.45));
}

[data-theme="dark"] .map-container svg path.active {
    fill: #60a5fa;
    filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.5));
}

/* ===== Traffic Light ===== */
.traffic-light-container {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0 1rem;
}

.traffic-light {
    background: #1a1a1a;
    padding: 12px 14px;
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.bulb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2d2d2d;
    transition: background 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
    opacity: 0.3;
}

.bulb.red.active {
    background: #ef4444;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.8), 0 0 6px rgba(239, 68, 68, 0.4);
    opacity: 1;
}

.bulb.yellow.active {
    background: #f59e0b;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.8), 0 0 6px rgba(245, 158, 11, 0.4);
    opacity: 1;
}

.bulb.green.active {
    background: #10b981;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.8), 0 0 6px rgba(16, 185, 129, 0.4);
    opacity: 1;
}

/* ===== Countdown Display ===== */
.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 1.25rem 0 0.75rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--gray);
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    min-width: 56px;
    border: 1px solid var(--border);
    transition: background 0.3s;
}

[data-theme="dark"] .time-block {
    background: #1d1d1d;
    border-color: #2d2d2d;
}

.time-block .number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.time-block .label {
    font-size: 0.62rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.colon {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--border);
    margin-top: -12px;
    line-height: 1;
    animation: blink 1.2s ease-in-out infinite alternate;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0.15;
    }
}

/* ===== Custom Range Slider ===== */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 99px;
}

[data-theme="dark"] input[type=range]::-webkit-slider-runnable-track {
    background: #333;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
    transition: box-shadow 0.2s, transform 0.15s;
}

input[type=range]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15);
    transform: scale(1.1);
}

/* ===== Bridge Day Result Pulse ===== */
#bridge-result.highlight-result {
    animation: resultPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== Seasonal Themes — accent only ===== */
body.theme-spring {
    --blue: #16a34a;
    --blue-dark: #15803d;
}

[data-theme="dark"] body.theme-spring {
    --blue: #4ade80;
}

body.theme-autumn {
    --blue: #d97706;
    --blue-dark: #b45309;
}

[data-theme="dark"] body.theme-autumn {
    --blue: #fbbf24;
}

body.theme-winter {
    /* Keep default blue accent for winter */
}