/* Trip Naar Lekkerder Weer */

:root {
    --bg: #f0f2f5;
    --sidebar-bg: #ffffff;
    --header-bg: #1a2332;
    --header-text: #ffffff;
    --text: #1a2332;
    --text-muted: #6b7280;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --border: #e5e7eb;
    --input-bg: #f9fafb;
    --input-border: #d1d5db;
    --input-focus: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
    --sidebar-width: 340px;
    --header-height: 48px;
    --transition: 0.2s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

.noscript-box {
    background: #fff8e1;
    color: #5f370e;
    border-bottom: 1px solid #f6c453;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.5;
}

.noscript-box a {
    color: #0f4bbf;
    font-weight: 600;
}

/* ---- Header ---- */
header {
    height: var(--header-height);
    background: var(--header-bg);
    color: var(--header-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

header h1 {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.header-subtitle {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.header-controls select {
    background: rgba(255,255,255,0.12);
    color: var(--header-text);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}
.header-controls select:hover {
    background: rgba(255,255,255,0.2);
}
.header-controls select option {
    background: var(--header-bg);
    color: var(--header-text);
}

.hamburger {
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--transition);
}

.hamburger:hover {
    background: rgba(255,255,255,0.1);
}

/* ---- Main Layout ---- */
main {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ---- Sidebar ---- */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: margin-left var(--transition), opacity var(--transition);
    z-index: 500;
}

#sidebar.closed {
    margin-left: calc(-1 * var(--sidebar-width));
    opacity: 0;
    pointer-events: none;
}

.control-group {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
}

.control-group h2 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.seo-links p {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.seo-links ul {
    list-style: none;
    display: grid;
    gap: 6px;
}

.seo-links a {
    color: #0f4bbf;
    text-decoration: none;
    font-size: 12px;
}

.seo-links a:hover {
    text-decoration: underline;
}

/* ---- Inputs ---- */
.input-row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: var(--text);
    transition: border-color var(--transition);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

input[type="number"] {
    width: 70px;
}

.icon-btn {
    background: #fff;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background var(--transition);
}

.icon-btn:hover {
    background: var(--input-bg);
}

.icon-btn.locating {
    animation: locatePulse 1s ease-in-out infinite;
    background: #eff6ff;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

@keyframes locatePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

/* ---- Suggestions Dropdown ---- */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 6px 6px;
    box-shadow: var(--shadow-lg);
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1100;
}

.suggestions.hidden {
    display: none;
}

.suggestions li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.suggestions li:last-child {
    border-bottom: none;
}

.suggestions li:hover,
.suggestions li.active {
    background: #eff6ff;
}

.suggestions li .suggestion-country {
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 4px;
}

/* ---- Radio Group ---- */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.radio-group label {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* ---- Sliders ---- */
.slider-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.range-display {
    font-weight: 600;
    font-size: 14px;
    min-width: 70px;
    text-align: right;
    white-space: nowrap;
}

/* ---- Date Inputs ---- */
.date-inputs {
    display: flex;
    gap: 8px;
}

.date-inputs label {
    flex: 1;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* ---- Dual Input (Temperature) ---- */
.dual-input {
    display: flex;
    gap: 16px;
}

.dual-input label {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---- Info Text ---- */
.info-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* ---- Scenario Grid ---- */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.scenario-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 12px;
}

.scenario-btn:hover {
    border-color: var(--accent);
    background: var(--card-bg);
}

.scenario-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.scenario-icon {
    font-size: 20px;
    line-height: 1;
}

.scenario-label {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* ---- Primary Button ---- */
.primary-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), opacity var(--transition);
    box-shadow: var(--shadow);
}

.primary-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.primary-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.primary-btn.cancel-btn {
    background: #dc2626;
    animation: cancelPulse 1.5s ease-in-out infinite;
}

.primary-btn.cancel-btn:hover {
    background: #b91c1c;
}

@keyframes cancelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ---- Progress ---- */
#progress-container {
    padding: 8px 0;
}

.progress-section {
    margin-bottom: 6px;
}

.progress-section:last-child {
    margin-bottom: 0;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-fill-routes {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

#progress-fill-hubs {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

#progress-fill-weather {
    background: linear-gradient(90deg, var(--accent), #f97316);
}

.progress-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}

.progress-text.rate-limited {
    color: #d97706;
    font-weight: 500;
}

.progress-fill.rate-limited {
    background: linear-gradient(90deg, #f59e0b, #ef4444) !important;
    animation: pulse-bar 1s ease-in-out infinite;
}

@keyframes pulse-bar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ---- Server Busy Banner ---- */
.server-busy-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
    animation: slide-up-banner 0.4s ease-out;
}

.server-busy-banner button {
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
}

.server-busy-banner button:hover {
    background: rgba(255,255,255,0.35);
}

@keyframes slide-up-banner {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ---- Overpass Retry Dialog ---- */
.overpass-retry-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    animation: fade-in 0.3s ease-out;
}

.overpass-retry-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    text-align: center;
}

.overpass-retry-dialog .retry-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #b45309;
    margin-bottom: 8px;
}

.overpass-retry-dialog .retry-detail {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 16px;
}

.retry-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.retry-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.retry-btn:active {
    transform: scale(0.97);
}

.retry-btn.retry-yes {
    background: #f59e0b;
    color: #fff;
}

.retry-btn.retry-yes:hover {
    background: #d97706;
}

.retry-btn.retry-no {
    background: #e5e7eb;
    color: #374151;
}

.retry-btn.retry-no:hover {
    background: #d1d5db;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.skip-towns-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    padding: 10px 20px;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    animation: fade-in 0.3s ease-out;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.skip-towns-btn:hover {
    background: #d97706;
}

.skip-towns-btn:active {
    transform: translateX(-50%) scale(0.97);
}

/* ---- Map Legend Overlay ---- */
.map-legend {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 800;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    pointer-events: auto;
    max-width: 190px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #1a2332;
    white-space: nowrap;
}

.color-swatch {
    width: 16px;
    height: 11px;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.15);
}

/* ---- Sidebar Footer ---- */
.sidebar-footer {
    padding-top: 8px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.sidebar-footer p {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.sidebar-footer a {
    color: var(--input-focus);
    text-decoration: none;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

/* ---- Top Marker Pins ---- */
.top-marker {
    background: none !important;
    border: none !important;
}
.top-marker-pin {
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    line-height: 1;
    text-align: center;
}

/* ---- Map Area ---- */
#map-area {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ---- Search Animation Overlay ---- */
#search-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 500;
    pointer-events: none;
    display: none;
}
#search-overlay.active {
    display: block;
}
#search-overlay .pulse-ring {
    position: absolute;
    top: var(--pulse-y, 50%); left: var(--pulse-x, 50%);
    width: 60px; height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    border: 3px solid var(--input-focus);
    opacity: 0;
    animation: searchPulse 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
#search-overlay .pulse-ring:nth-child(2) { animation-delay: 0.6s; }
#search-overlay .pulse-ring:nth-child(3) { animation-delay: 1.2s; }
#search-overlay .pulse-ring:nth-child(4) { animation-delay: 1.8s; }

#search-overlay .pulse-dot {
    position: absolute;
    top: var(--pulse-y, 50%); left: var(--pulse-x, 50%);
    width: 14px; height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--input-focus);
    box-shadow: 0 0 12px var(--input-focus);
    animation: dotPulse 1.2s ease-in-out infinite alternate;
}

@keyframes searchPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
        border-color: var(--input-focus);
    }
    100% {
        transform: scale(12);
        opacity: 0;
        border-color: var(--input-focus);
    }
}

@keyframes dotPulse {
    0% { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 1; }
}

#map {
    flex: 1;
    z-index: 1;
}

/* ---- Day Controls ---- */
#day-controls {
    position: absolute;
    bottom: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 800;
    min-width: 320px;
    max-width: 90vw;
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.toggle-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.toggle-btn.active {
    background: var(--header-bg);
    color: #fff;
    border-color: var(--header-bg);
}

.toggle-btn:hover:not(.active) {
    background: var(--input-bg);
}

#day-slider-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-nav-btn {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: background var(--transition);
}

.day-nav-btn:hover {
    background: var(--input-bg);
}

#day-label {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}

.data-source-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
}

.data-source-badge.forecast {
    background: #dbeafe;
    color: #1d4ed8;
}

.data-source-badge.historical {
    background: #fef3c7;
    color: #92400e;
}

/* ---- Hidden utility ---- */
.hidden {
    display: none !important;
}

/* ---- Leaflet Popup Override ---- */
.weather-popup .leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.weather-popup .leaflet-popup-content {
    margin: 10px 14px;
    font-size: 13px;
    line-height: 1.6;
}

.popup-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.popup-row .label {
    color: var(--text-muted);
}

.popup-row .value {
    font-weight: 600;
}

.popup-score {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-weight: 600;
}

.popup-score.excellent {
    color: #d97706;
}

.popup-score.good {
    color: #059669;
}

.popup-score.fair {
    color: #2563eb;
}

.popup-score.poor {
    color: #6b7280;
}

/* ---- Transit Route in Popup ---- */
.transit-route {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.transit-header {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.transit-legs {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.transit-leg {
    padding: 2px 0;
    border-left: 3px solid var(--accent);
    padding-left: 8px;
    margin-bottom: 3px;
}

.transit-leg.walk {
    border-left-color: #9ca3af;
    color: var(--text-muted);
}

.leg-line {
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 11px;
}

.leg-headsign {
    color: var(--text-muted);
    font-size: 11px;
}

.leg-duration {
    float: right;
    font-size: 11px;
    color: var(--text-muted);
}

.leg-stop {
    font-size: 11px;
    color: var(--text-muted);
    padding-left: 2px;
}

/* ---- Progressive Stain Animation ---- */

/* Stain pane: slight blur for organic look */
.leaflet-stain-pane {
    z-index: 390;
}

/* The growing polygon stain */
.stain-polygon {
    transition: d 0.4s ease-out, fill-opacity 0.5s ease;
}

@keyframes stainColor {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

/* Canvas-based weather heatmap overlay */
.weather-canvas {
    position: absolute;
    pointer-events: none;
}

/* ---- Onboarding Tour ---- */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    transition: opacity 0.3s ease;
}

.onboarding-highlight {
    position: relative;
    z-index: 9999;
    box-shadow: 0 0 0 4px var(--accent), 0 0 20px rgba(245, 158, 11, 0.5);
    border-radius: var(--radius);
    animation: onboardPulse 1.5s ease-in-out infinite;
}

@keyframes onboardPulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--accent), 0 0 20px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 6px var(--accent), 0 0 30px rgba(245, 158, 11, 0.7); }
}

.onboarding-callout {
    position: absolute;
    z-index: 10000;
    background: #fff;
    color: var(--text);
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-width: 260px;
    font-size: 13px;
    line-height: 1.5;
    animation: calloutAppear 0.3s ease-out;
}

@keyframes calloutAppear {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.onboarding-callout::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

.onboarding-callout.arrow-top::before {
    top: -6px;
    left: 20px;
}

.onboarding-callout.arrow-bottom::before {
    bottom: -6px;
    left: 20px;
}

.onboarding-callout .callout-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.onboarding-callout .callout-step {
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 6px;
}

.onboarding-callout .callout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.onboarding-callout .callout-btn {
    padding: 4px 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.onboarding-callout .callout-btn.next {
    background: var(--accent);
    color: #fff;
}

.onboarding-callout .callout-btn.skip {
    background: transparent;
    color: var(--text-muted);
}

.onboarding-callout .callout-btn.flash-btn {
    animation: btnFlash 0.6s ease-out;
}

@keyframes btnFlash {
    0%   { transform: scale(1);   box-shadow: none; }
    25%  { transform: scale(1.15); box-shadow: 0 0 12px rgba(245, 158, 11, 0.7); }
    50%  { transform: scale(1);   box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
    75%  { transform: scale(1.1);  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
    100% { transform: scale(1);   box-shadow: none; }
}

/* ---- Loading Overlay ---- */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Map Progress Overlay (visible on mobile when sidebar is closed) ---- */
#map-progress {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 800;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px 12px;
    min-width: 180px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

#map-progress.hidden {
    display: none !important;
}

#map-progress .progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

#map-progress .progress-fill {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

#map-progress .map-progress-routes .progress-fill {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

#map-progress .map-progress-hubs .progress-fill {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

#map-progress .map-progress-weather .progress-fill {
    background: linear-gradient(90deg, var(--accent), #f97316);
}

#map-progress .progress-text {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100vw;
        --header-height: 44px;
    }

    header h1 {
        font-size: 14px;
    }

    .header-subtitle {
        display: none;
    }

    #sidebar {
        position: absolute;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        z-index: 999;
        box-shadow: var(--shadow-lg);
        transition: transform var(--transition), opacity var(--transition);
    }

    #sidebar.closed {
        transform: translateX(-100%);
        margin-left: 0;
        opacity: 0;
        pointer-events: none;
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #day-controls {
        min-width: unset;
        width: calc(100vw - 32px);
        bottom: 32px;
        bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    }

    .map-legend {
        bottom: 80px;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        max-width: 170px;
        padding: 6px 8px;
    }

    .map-legend .legend-item {
        font-size: 10px;
    }

    .map-legend .color-swatch {
        width: 14px;
        height: 9px;
    }

    .date-inputs {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .radio-group {
        flex-direction: column;
        gap: 4px;
    }

    .dual-input {
        flex-direction: column;
        gap: 6px;
    }
}
