:root { 
    --brand-primary: #0f3cb5; 
    --brand-accent: #1e40af; 
    --brand-sky: #0284c7;
    --dark-green: #0f3cb5; 
    --white: #ffffff; 
    --bg: #ffffff; 
}
html, body {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    font-family: system-ui, -apple-system, sans-serif; 
    background-color: var(--bg); 
    margin: 0; 
    padding: 0; 
    padding-top: 72px; 
    color: #333; 
    position: relative;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}

/* Semi-transparent background watermark */
body::before {
    content: '';
    position: fixed;
    top: 240px;
    left: 0;
    right: 0;
    bottom: 20px;
    background-image: url('background.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: min(900px, 85vw) auto;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}
header, .app-header { 
    background: linear-gradient(115deg, #0a2777 0%, #0f3cb5 45%, #1d4ed8 75%, #0284c7 100%); 
    color: var(--white); 
    padding: 0.85rem 1.25rem; 
    text-align: center;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 2500 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-header-logo {
    position: absolute;
    inset-inline-start: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    padding: 4px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.app-header-logo:hover {
    transform: translateY(-50%) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.header-titles {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: calc(100% - 150px);
}

.header-titles h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: #ffffff;
}

.header-titles p {
    margin: 2px 0 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    line-height: 1.3;
}

#theme-toggle {
    position: absolute;
    inset-inline-end: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--white);
    padding: 0;
    width: 36px;
    height: 36px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.15s;
    margin-bottom: 0;
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.06);
}
.container { max-width: 900px; margin: 2rem auto; display: block; padding: 0 1rem; }
.status-banner { background-color: #1e293b; color: white; text-align: center; padding: 10px; font-size: 0.95rem; display: flex; justify-content: center; align-items: center; }
.card { background: var(--white); padding: 1.5rem; border-radius: 8px; box-shadow: 0 4px 14px rgba(29,78,216,0.08); border-top: 5px solid var(--brand-primary); }
h2 { color: var(--brand-primary); margin-top: 0; }

input, button { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-family: inherit; font-size: 1rem; margin-bottom: 1rem; outline:none;}
button { background: linear-gradient(115deg, #0a2777 0%, #0f3cb5 60%, #1d4ed8 100%); color: var(--white); border: none; cursor: pointer; font-weight: bold; transition: opacity 0.25s, transform 0.15s; }
button:hover { opacity: 0.92; }
        
        /* Permanent indicator lines above From (#origin) and To (#destination) inputs */
        #origin {
            border-top: 3px solid #0f3cb5 !important;
        }
        #origin:focus {
            border-top: 3px solid #0f3cb5 !important;
            border-color: #0f3cb5;
            box-shadow: 0 0 0 2px rgba(15, 60, 181, 0.15);
        }

        #destination {
            border-top: 3px solid #8d5b4c !important; /* Brown */
        }
        #destination:focus {
            border-top: 3px solid #8d5b4c !important;
            border-color: #8d5b4c;
            box-shadow: 0 0 0 2px rgba(141, 91, 76, 0.15);
        }

        .expand-stops-btn:hover {
            background: #e2e8f0 !important;
        }
        
        .autocomplete-container { position: relative; margin-bottom: 1rem; }
        .autocomplete-container input { margin-bottom: 0;  } 
        .suggestions-list { 
            position: absolute; 
            top: calc(100% + 2px); 
            left: 0; 
            right: 0; 
            background: var(--white); 
            border: 1px solid #cbd5e1; 
            border-radius: 8px; 
            box-shadow: 0 6px 16px rgba(0,0,0,0.12); 
            z-index: 1050; 
            display: none; 
            max-height: 220px; 
            overflow-y: auto; 
            -webkit-overflow-scrolling: touch; 
        }
        .suggestion-item { padding: 0.75rem 0.9rem; cursor: pointer; border-bottom: 1px solid #f1f5f9; color: #334155; font-size: 0.92rem; transition: background 0.15s; }
        .suggestion-item:last-child { border-bottom: none; }
        .suggestion-item:hover { background-color: var(--bg); color: var(--dark-green); font-weight: bold; }
        
        .date-time-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
        .date-time-row input { margin-bottom: 0; }

        .trip-card { border: 1px solid #e0e0e0; border-radius: 8px; margin-top: 1.5rem; overflow: hidden; font-family: inherit; transition: box-shadow 0.3s ease, border-color 0.3s ease; }
        .trip-card-focused { border-color: var(--dark-green) !important; box-shadow: 0 0 0 2px var(--dark-green), 0 4px 12px rgba(26, 71, 42, 0.18) !important; }
        .trip-summary { padding: 1rem; background: #fff; cursor: pointer; transition: background 0.2s; position: relative; }
        .trip-summary:hover { background: #fcfdfc; }
        .card-top-walk-badge {
            position: absolute;
            top: 8px;
            inset-inline-end: 10px;
            font-size: 0.70rem;
            color: #64748b;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 2px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            padding: 1px 6px;
            border-radius: 10px;
            line-height: 1.25;
            box-shadow: 0 1px 2px rgba(0,0,0,0.04);
            pointer-events: none;
            white-space: nowrap;
            z-index: 2;
        }
        .night-status-badge { 
            display: inline-flex; 
            align-items: center; 
            gap: 4px; 
            background: #eff6ff; 
            color: #1e40af; 
            border: 1px solid #bfdbfe; 
            padding: 2px 7px; 
            border-radius: 4px; 
            font-size: 0.76rem; 
            font-weight: 600; 
            margin-bottom: 6px; 
            line-height: 1.3; 
            width: fit-content; 
        }
        
        .route-bar-container { 
            display: flex; 
            flex-wrap: wrap; 
            align-items: center; 
            gap: 6px 4px; 
            margin-bottom: 0.65rem; 
            width: 100%;
            box-sizing: border-box;
            padding: 2px 0;
        }

        .route-bar { 
            display: inline-flex; 
            align-items: center; 
            justify-content: center; 
            gap: 4px; 
            padding: 4px 8px; 
            border-radius: 6px; 
            font-weight: 700; 
            font-size: 0.80rem; 
            line-height: 1.2; 
            white-space: nowrap; 
            box-shadow: 0 1px 2px rgba(0,0,0,0.06); 
            transition: transform 0.15s ease, flex 0.2s ease;
            min-width: fit-content;
        }

        .transit-bar { 
            color: #ffffff; 
            border: 1px solid rgba(0,0,0,0.08); 
        }
        
        .walk-bar { 
            background-color: #f1f5f9; 
            color: #475569; 
            border: 1px solid #e2e8f0; 
            font-weight: 600; 
            font-size: 0.76rem; 
        }

        .route-bar-icon {
            font-size: 0.88rem;
            line-height: 1;
            flex-shrink: 0;
        }

        .route-bar-text {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Connecting dash/dot between legs */
        .transfer-indicator { 
            display: inline-flex; 
            align-items: center; 
            justify-content: center; 
            flex-shrink: 0; 
            width: 8px; 
            height: 2px; 
            background-color: #94a3b8; 
            border-radius: 2px; 
            margin: 0 1px;
            user-select: none; 
        }

        .trip-stops { 
            display: flex; 
            justify-content: space-between; 
            align-items: center;
            font-size: 0.78rem; 
            color: #64748b; 
            font-weight: 500; 
            gap: 8px;
            margin-top: 4px;
        }
        .trip-stop-item {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .trip-stop-label {
            color: #475569;
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        .details-btn { 
            text-align: center; 
            color: var(--dark-green); 
            font-size: 0.76rem; 
            margin-top: 0.5rem; 
            display: block; 
            font-weight: 700;
            letter-spacing: 0.2px;
        }
        
        .trip-details {
            max-height: 0;
            overflow: hidden;
            padding: 0 1.2rem;
            background: var(--bg-details, #f9fbf9);
            border-top: 1px solid transparent;
            transition: max-height 0.4s ease, padding 0.3s ease, border-color 0.3s ease;
        }
        .trip-details.open {
            max-height: 2500px;
            padding: 1.5rem 1.2rem;
            border-top: 1px solid var(--border-color, #e0e0e0);
        }
        .timeline { border-right: 3px solid var(--timeline-line, #8e9ca3); margin-right: 15px; padding-right: 20px; position: relative; }
        .timeline-stop { position: relative; margin-bottom: 1.6rem; line-height: 1.4; }
        .timeline-stop::before { content: ''; position: absolute; right: -28.5px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-card, white); border: 3px solid var(--timeline-line, #8e9ca3); }
        .timeline-time { font-weight: bold; font-size: 1.05rem; margin-left: 10px; color: var(--text-highlight, var(--dark-green));}
        .timeline-stop-name { font-size: 1rem; font-weight: bold; color: var(--text-color, #0f172a);}
        .timeline-route-info { margin-top: 8px; font-size: 0.92rem; color: var(--route-info-text, #333); background: var(--route-info-bg, #e8f5e9); display: inline-block; padding: 6px 12px; border-radius: 6px; border-right: 4px solid var(--dark-green);}
        .timeline-transfer { margin: 1rem 0; padding-right: 5px; font-size: 0.88rem; font-weight: bold; position: relative; }
        .timeline-transfer span { display: inline-flex; align-items: center; gap: 4px; background: var(--tag-alight-bg, #fee2e2); color: var(--tag-alight-text, #b91c1c); border: 1px solid var(--tag-alight-border, #fecaca); padding: 4px 10px; border-radius: 12px; }
        .timeline-transfer.timeline-transfer-board span { background: var(--tag-board-bg, #f1f5f9); color: var(--tag-board-text, #475569); border-color: var(--tag-board-border, #e2e8f0); }
        
        .map-link { text-decoration: none; background: #e0e0e0; padding: 2px 5px; border-radius: 4px; margin-right: 8px; font-size: 0.85rem; display: inline-block;}
        .map-link:hover { background: #d0d0d0; }
        .intermediate-stops { padding-right: 0px; margin: 0.8rem 0; }
        .inter-stop { display: flex; align-items: center; font-size: 0.9rem; color: #555; margin-bottom: 0.6rem; position: relative; }
        .inter-stop::before { content: ''; position: absolute; right: -25.5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #8e9ca3; border: 2px solid white; z-index: 2;}

        .status-indicator { display: flex; align-items: center; gap: 10px; font-weight: bold; color: var(--dark-green); margin-bottom: 1rem; }
        .dot { height: 12px; width: 12px; background-color: #2ecc71; border-radius: 50%; display: inline-block; }
        .info-text { font-size: 0.9rem; color: #555; line-height: 1.5; }

        /* --- 3-Column Split Application Layout (Google Maps / Citymapper Style) --- */
        .app-layout-main {
            display: flex;
            flex-direction: row;
            width: 100vw;
            height: calc(100vh - 72px);
            max-height: calc(100vh - 72px);
            overflow: hidden;
            position: relative;
            box-sizing: border-box;
            background: #f1f5f9;
        }

        /* 1. Map Panel (Fills all remaining space on left in RTL / on right in LTR) */
        .map-section-panel {
            flex: 1 1 auto;
            height: 100%;
            position: relative;
            min-width: 250px;
            z-index: 1;
            overflow: hidden;
        }

        #map-container {
            width: 100%;
            height: 100%;
            position: relative;
        }

        #map {
            width: 100%;
            height: 100%;
            border: none;
            box-shadow: none;
            border-radius: 0;
        }

        /* 2. Middle Results Panel */
        .results-sidebar-panel {
            width: 380px;
            min-width: 320px;
            max-width: 440px;
            height: 100%;
            background: #ffffff;
            border-inline: 1px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            z-index: 5;
            box-shadow: -2px 0 12px rgba(0,0,0,0.06);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .results-panel-header {
            padding: 14px 16px 10px;
            border-bottom: 1px solid #f1f5f9;
            background: #ffffff;
            flex-shrink: 0;
        }

        .results-scroll-area {
            flex: 1 1 auto;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 8px 14px 24px;
        }

        .results-empty-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 80%;
        }

        .mobile-results-close-btn,
        .mobile-sidebar-close-btn {
            display: none;
            background: none;
            border: none;
            color: #64748b;
            font-size: 1.1rem;
            cursor: pointer;
            padding: 4px;
            width: auto;
            margin: 0;
        }

        /* 3. Search Widget Sidebar (Far Right in Arabic RTL / Far Left in LTR) */
        .search-widget-sidebar {
            width: 330px;
            min-width: 300px;
            max-width: 360px;
            height: 100%;
            background: linear-gradient(180deg, #092061 0%, #0f3cb5 50%, #1e40af 100%);
            color: #ffffff;
            display: flex;
            flex-direction: column;
            z-index: 10;
            box-shadow: 0 4px 20px rgba(0,0,0,0.25);
            flex-shrink: 0;
            overflow-y: auto;
        }

        .sidebar-header-branding {
            padding: 1.25rem 1.25rem 0.75rem;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .search-widget-inner-form {
            padding: 0 1.25rem 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1 1 auto;
        }

        .planner-inputs-column {
            display: flex;
            flex-direction: column;
            gap: 2px;
            position: relative;
        }

        .planner-inputs-column .autocomplete-container {
            margin-bottom: 0;
            position: relative;
        }

        .input-icon-prefix {
            position: absolute;
            inset-inline-start: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #1e40af;
            pointer-events: none;
            display: flex;
            align-items: center;
            z-index: 2;
        }

        .planner-inputs-column input {
            background: #ffffff;
            color: #1e293b;
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
            padding: 0.75rem 0.85rem;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12);
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .planner-inputs-column input:focus {
            box-shadow: 0 0 0 3px rgba(255,255,255,0.35);
        }

        .planner-inputs-column #origin {
            border-top: 3px solid #0f3cb5 !important;
        }

        .planner-inputs-column #destination {
            border-top: 3px solid #8d5b4c !important;
        }

        #swap-btn {
            background: #ffffff;
            border: 1px solid #cbd5e1;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
            color: #0f3cb5;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s, background 0.2s;
        }

        #swap-btn:hover {
            background: #f8fafc;
            transform: scale(1.08);
        }

        .sidebar-filters-section {
            margin-top: 14px;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.18);
        }

        .sidebar-section-title {
            font-size: 0.84rem;
            font-weight: 700;
            color: rgba(255,255,255,0.9);
            margin-bottom: 8px;
        }

        .sidebar-filters-section .trip-filters-group {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .sidebar-filters-section .trip-filter-checkbox-label {
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.22);
            border-radius: 18px;
            padding: 4px 10px;
            color: #ffffff;
            font-size: 0.78rem;
            cursor: pointer;
            transition: background 0.2s;
            user-select: none;
            display: inline-flex;
            align-items: center;
        }

        .sidebar-filters-section .trip-filter-checkbox-label input {
            display: none;
        }

        .sidebar-filters-section .trip-filter-checkbox-label.active {
            background: #ffffff !important;
            color: #0f3cb5 !important;
            font-weight: 700;
            border-color: #ffffff !important;
        }

        .sidebar-filters-section .trip-filter-checkbox-label.active span {
            color: #0f3cb5 !important;
        }

        .sidebar-footer-links {
            margin-top: auto;
            padding-top: 18px;
            padding-bottom: 6px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
            font-size: 0.88rem;
        }

        .lang-btn-pill {
            cursor: pointer;
            padding: 4px 12px;
            border-radius: 16px;
            color: rgba(255, 255, 255, 0.75) !important;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            font-weight: 500;
            transition: all 0.2s ease;
            user-select: none;
        }

        .lang-btn-pill:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #ffffff !important;
        }

        .lang-btn-pill.active {
            background: #ffffff !important;
            color: #0a2777 !important;
            font-weight: 700;
            border-color: #ffffff !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
        }

        .sidebar-footer-links .lang-separator {
            color: rgba(255, 255, 255, 0.35);
            font-size: 0.8rem;
        }

        /* Mobile Compact Search Trigger Pill (Hidden on desktop) */
        .mobile-compact-search-bar {
            display: none;
        }

        /* Responsive & Directional Layout: Search Widget on Right in RTL (Arabic), Left in LTR (English) */
        /* In RTL: Flex row starts at RIGHT edge. order: 1 = Right, order: 2 = Middle, order: 3 = Left */
        html[dir="rtl"] .search-widget-sidebar,
        [dir="rtl"] .search-widget-sidebar {
            order: 1;
            box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        }
        html[dir="rtl"] .results-sidebar-panel,
        [dir="rtl"] .results-sidebar-panel {
            order: 2;
        }
        html[dir="rtl"] .map-section-panel,
        [dir="rtl"] .map-section-panel {
            order: 3;
        }

        /* In LTR: Flex row starts at LEFT edge. order: 1 = Left, order: 2 = Middle, order: 3 = Right */
        html[dir="ltr"] .search-widget-sidebar,
        [dir="ltr"] .search-widget-sidebar {
            order: 1;
            box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        }
        html[dir="ltr"] .results-sidebar-panel,
        [dir="ltr"] .results-sidebar-panel {
            order: 2;
        }
        html[dir="ltr"] .map-section-panel,
        [dir="ltr"] .map-section-panel {
            order: 3;
        }

        /* Expand Map Button hover & active states */
        #map-expand-btn {
            position: absolute;
            bottom: 85px;
            inset-inline-start: 12px;
            z-index: 1000;
            margin: 0;
            width: 36px;
            height: 36px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.95) !important;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            color: #1e293b;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            border: 1px solid rgba(0,0,0,0.15) !important;
            cursor: pointer;
            outline: none;
            transition: background 0.2s, transform 0.15s;
        }
        #map-expand-btn:hover {
            background: #ffffff !important;
            transform: scale(1.05);
        }
        .map-floating-controls {
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        .map-floating-controls button {
            box-shadow: 0 2px 8px rgba(0,0,0,0.22);
            font-size: 0.72rem !important;
            padding: 5px 9px !important;
            border: 1px solid rgba(255,255,255,0.25) !important;
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
        }
        
        /* Planner Action Row: Side-by-side Go & Nearby Buttons */
        .planner-actions-row {
            display: flex;
            align-items: stretch;
            gap: 8px;
            margin: 16px 0;
            width: 100%;
            box-sizing: border-box;
        }
        #searchBtn {
            flex: 1 1 auto;
            background: linear-gradient(115deg, #0a2777 0%, #0f3cb5 50%, #1d4ed8 100%);
            color: #ffffff;
            border-radius: 8px;
            padding: 0.65rem 1rem;
            font-size: 1.05rem;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(15, 60, 181, 0.35);
            transition: background 0.2s, transform 0.15s, box-shadow 0.2s, opacity 0.2s;
        }
        #searchBtn:hover {
            opacity: 0.94;
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(29, 78, 216, 0.45);
        }
        #nearbyStopsBtn {
            flex: 0 0 auto;
            background-color: #334155;
            color: #ffffff;
            border-radius: 8px;
            padding: 0.65rem 0.95rem;
            font-size: 0.88rem;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0,0,0,0.15);
            transition: background 0.2s, transform 0.15s;
        }
        #nearbyStopsBtn:hover {
            background-color: #1e293b !important;
            transform: translateY(-1px);
        }

        /* Responsive: On very narrow screens (<420px), hide text to keep neat square icon button */
        @media (max-width: 420px) {
            #nearbyStopsBtn {
                padding: 0.65rem 0.8rem;
            }
            #nearbyStopsBtn .nearby-btn-text {
                display: none;
            }
        }
        #map-find-btn {
            background: linear-gradient(115deg, #0a2777 0%, #0f3cb5 50%, #1d4ed8 100%) !important;
        }
        #map-find-btn:hover {
            opacity: 0.92;
            transform: translateY(-1px);
        }
        #offline-map-btn:hover {
            background: #1e2b37 !important;
            transform: translateY(-1px);
        }
        #map-clear-btn:hover {
            background: #c0392b !important;
            transform: translateY(-1px);
        }

        /* --- Full Screen Expanded Map Overlay --- */
        .map-panel.expanded {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            max-width: 100vw !important;
            z-index: 2000 !important;
            margin: 0 !important;
            padding: 0 !important;
            background: #ffffff;
            border-radius: 0 !important;
        }

        .map-panel.expanded #map-container {
            width: 100vw !important;
            height: 100vh !important;
            max-width: 100vw !important;
        }

        .map-panel.expanded #map {
            height: 100vh !important;
            width: 100vw !important;
            border-radius: 0 !important;
            border: none !important;
            box-shadow: none !important;
        }

        .map-panel.expanded #map-instructions-box {
            position: absolute;
            top: 15px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1500;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            min-width: 280px;
        }

        /* Responsive Breakpoint: Mobile View (<950px) */
        @media (max-width: 950px) {
            .app-layout-main {
                flex-direction: column;
                height: calc(100vh - 60px);
                max-height: calc(100vh - 60px);
                position: relative;
            }

            /* Map takes the full screen underneath */
            .map-section-panel {
                width: 100% !important;
                height: 100% !important;
                position: absolute !important;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                z-index: 1;
            }

            /* Floating minimal search trigger bar at top of map */
            .mobile-compact-search-bar {
                display: flex !important;
                align-items: center;
                gap: 8px;
                position: fixed !important;
                top: calc(68px + env(safe-area-inset-top, 0px)) !important;
                left: 12px !important;
                right: 12px !important;
                z-index: 1200 !important;
                pointer-events: auto;
            }

            .mobile-search-pill {
                flex: 1 1 auto;
                min-width: 0;
                background: #ffffff;
                border-radius: 28px;
                padding: 10px 16px;
                display: flex;
                align-items: center;
                gap: 10px;
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
                border: 1px solid #cbd5e1;
                cursor: pointer;
                transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s;
            }

            .mobile-search-pill:active {
                transform: scale(0.98);
                background-color: #f8fafc;
            }

            .mobile-search-icon {
                font-size: 1.1rem;
                color: #0f3cb5;
                flex-shrink: 0;
            }

            .mobile-search-text {
                flex: 1 1 auto;
                font-size: 0.92rem;
                font-weight: 600;
                color: #475569;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .mobile-filter-badge {
                font-size: 0.95rem;
                background: #eff6ff;
                color: #1d4ed8;
                border-radius: 50%;
                width: 26px;
                height: 26px;
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
            }

            /* Quick Nearby Stops pill on mobile */
            .mobile-nearby-btn {
                flex: 0 0 auto;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 6px;
                background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
                color: #ffffff !important;
                border: 1px solid rgba(255, 255, 255, 0.2) !important;
                border-radius: 28px !important;
                padding: 10px 14px !important;
                font-size: 0.86rem !important;
                font-weight: 700 !important;
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
                cursor: pointer;
                margin: 0 !important;
                width: auto !important;
                white-space: nowrap;
                transition: transform 0.15s ease, background 0.2s, box-shadow 0.15s;
            }

            .mobile-nearby-btn:active {
                transform: scale(0.96);
                background: #0f172a !important;
            }

            .mobile-nearby-icon {
                font-size: 1.05rem;
                line-height: 1;
            }

            @media (max-width: 440px) {
                .mobile-compact-search-bar {
                    gap: 6px;
                    left: 8px !important;
                    right: 8px !important;
                }
                .mobile-search-pill {
                    padding: 9px 12px;
                    gap: 8px;
                }
                .mobile-nearby-btn {
                    padding: 9px 12px !important;
                    font-size: 0.8rem !important;
                }
            }

            @media (max-width: 360px) {
                .mobile-nearby-text {
                    display: none;
                }
                .mobile-nearby-btn {
                    padding: 9px !important;
                    border-radius: 50% !important;
                    width: 42px !important;
                    height: 42px !important;
                }
            }

            /* Search sidebar becomes a smooth sliding-down top widget on mobile */
            .mobile-search-backdrop {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.45);
                backdrop-filter: blur(2px);
                -webkit-backdrop-filter: blur(2px);
                z-index: 2550;
                opacity: 0;
                transition: opacity 0.3s ease;
                pointer-events: none;
            }

            .mobile-search-backdrop.open {
                display: block;
                opacity: 1;
                pointer-events: auto;
            }

            .search-widget-sidebar {
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                bottom: auto !important;
                width: 100vw !important;
                max-width: 100vw !important;
                max-height: 82vh !important;
                height: auto !important;
                z-index: 2600 !important;
                display: flex !important;
                flex-direction: column !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch;
                background: linear-gradient(180deg, #092061 0%, #0f3cb5 100%);
                padding-top: calc(10px + env(safe-area-inset-top, 0px));
                padding-bottom: 18px;
                border-radius: 0 0 20px 20px !important;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
                transform: translateY(-105%);
                transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
                pointer-events: none;
            }

            .search-widget-sidebar.open {
                transform: translateY(0);
                pointer-events: auto;
            }

            .mobile-sidebar-close-btn {
                display: block;
                color: #ffffff;
                font-size: 1.4rem;
                padding: 6px;
            }

            /* Results panel becomes a floating bottom drawer on mobile */
            .results-sidebar-panel {
                position: absolute !important;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100% !important;
                max-width: 100% !important;
                height: 52vh;
                max-height: 75vh;
                z-index: 1100;
                border-radius: 18px 18px 0 0;
                box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
                transform: translateY(100%);
                transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            }

            .results-sidebar-panel.open {
                transform: translateY(0);
            }

            .mobile-results-close-btn {
                display: block;
            }

            .results-empty-placeholder {
                display: none;
            }

            .app-header {
                padding: 0.65rem 0.75rem;
                height: 60px;
            }

            body {
                padding-top: 60px;
                height: 100vh;
                max-height: 100vh;
                overflow: hidden;
                box-sizing: border-box;
            }

            .app-header-logo {
                width: 40px;
                height: 40px;
                inset-inline-start: 8px;
            }

            #theme-toggle {
                inset-inline-end: 8px;
                width: 32px;
                height: 32px;
            }

            .header-titles {
                max-width: calc(100% - 96px);
            }

            .header-titles h1 {
                font-size: 1.25rem;
            }

            .header-titles p {
                font-size: 0.74rem;
            }

            /* Hide expand map button on mobile - map is full screen and big enough */
            #map-expand-btn {
                display: none !important;
            }

            /* Position "Go" and "Clear" map controls on the bottom-right corner of map on mobile */
            .map-floating-controls {
                top: auto !important;
                bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
                right: 14px !important;
                left: auto !important;
                flex-direction: column !important;
                align-items: flex-end !important;
                gap: 8px !important;
                z-index: 1050 !important;
            }

            .map-floating-controls button {
                padding: 8px 14px !important;
                font-size: 0.85rem !important;
                border-radius: 24px !important;
                box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
            }
        }
        .view-map-btn, button.view-map-btn { 
            display: inline-block !important; 
            background: #2980b9 !important; 
            color: white !important; 
            border: none !important; 
            padding: 6px 12px !important; 
            border-radius: 4px !important; 
            font-size: 0.82rem !important; 
            cursor: pointer !important; 
            margin: 0 !important; 
            font-weight: bold !important; 
            width: auto !important; 
            transition: background 0.3s !important;
            flex-shrink: 0 !important;
        }
        .view-map-btn:hover, button.view-map-btn:hover { background: #1c5980 !important; }
        
        .custom-transit-pin {
            background: transparent !important;
            border: none !important;
            cursor: grab;
            touch-action: none;
        }
        .custom-transit-pin:active {
            cursor: grabbing;
        }

        /* Trip Filter Checkboxes */
        .trip-filters-group {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin: 12px 0 14px;
            padding: 4px 0;
        }

        .filters-label {
            font-size: 0.92rem;
            font-weight: 700;
            color: #475569;
            margin-inline-end: 4px;
        }

        .trip-filter-checkbox-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            user-select: none;
            margin: 0;
            padding: 4px 6px;
            border-radius: 20px;
            transition: all 0.2s ease;
        }

        .trip-filter-checkbox-label:hover {
            background-color: #f1f5f9;
        }

        .trip-filter-checkbox-label input[type="checkbox"] {
            width: 17px;
            height: 17px;
            margin: 0;
            cursor: pointer;
            accent-color: var(--dark-green);
            vertical-align: middle;
        }

        .filter-badge-content {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            border-radius: 16px;
            font-size: 0.82rem;
            font-weight: 700;
            transition: all 0.2s ease;
            border: 1.5px solid transparent;
        }

        .filter-badge-content.badge-fastest {
            background-color: #e8f5e9;
            color: #2e7d32;
            border-color: #a5d6a7;
        }

        .filter-badge-content.badge-direct {
            background-color: #e3f2fd;
            color: #1565c0;
            border-color: #90caf9;
        }

        .filter-badge-content.badge-less-walking {
            background-color: #fff3e0;
            color: #e65100;
            border-color: #ffcc80;
        }

        .trip-filter-checkbox-label.active .badge-fastest {
            background-color: #2e7d32;
            color: #ffffff;
            border-color: #1b5e20;
            box-shadow: 0 2px 6px rgba(46, 125, 50, 0.35);
        }

        .trip-filter-checkbox-label.active .badge-direct {
            background-color: #1565c0;
            color: #ffffff;
            border-color: #0d47a1;
            box-shadow: 0 2px 6px rgba(21, 101, 192, 0.35);
        }

        .trip-filter-checkbox-label.active .badge-less-walking {
            background-color: #e65100;
            color: #ffffff;
            border-color: #bf360c;
            box-shadow: 0 2px 6px rgba(230, 81, 0, 0.35);
        }

        #swap-btn {
            transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
        }

        #swap-btn:hover {
            background-color: #f4f6f8 !important;
            color: #0031ad !important;
            border-color: #0031ad !important;
            box-shadow: 0 3px 8px rgba(0, 49, 173, 0.2) !important;
        }

        #swap-btn:active {
            transform: scale(0.92);
        }
/* --- Dark Mode --- */
body.dark-mode {
    --brand-primary: #3b82f6;
    --brand-accent: #60a5fa;
    --dark-green: #3b82f6;
    --bg: #0f172a;
    --white: #1e293b;
    --bg-card: #1e293b;
    --bg-details: #0f172a;
    --text-color: #f8fafc;
    --text-highlight: #60a5fa;
    --border-color: #334155;
    --timeline-line: #64748b;
    --route-info-bg: #1e293b;
    --route-info-text: #f1f5f9;
    --tag-alight-bg: #7f1d1d;
    --tag-alight-text: #fecaca;
    --tag-alight-border: #991b1b;
    --tag-board-bg: #334155;
    --tag-board-text: #f8fafc;
    --tag-board-border: #475569;
    background-color: #0f172a;
    color: #f8fafc;
}

body.dark-mode::before {
    opacity: 0.08;
    filter: invert(1) brightness(0.85);
}

/* Card & Main containers */
body.dark-mode .app-layout-main {
    background: #0f172a;
}

body.dark-mode .results-sidebar-panel {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .results-panel-header {
    background: #1e293b !important;
    border-bottom-color: #334155 !important;
}

body.dark-mode .results-panel-header h3 {
    color: #f8fafc !important;
}

body.dark-mode .search-widget-sidebar {
    background: linear-gradient(180deg, #091738 0%, #0c2b7a 50%, #0f3cb5 100%) !important;
}

body.dark-mode .mobile-search-pill {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .mobile-search-text {
    color: #f8fafc !important;
}

body.dark-mode .card {
    background: #1e293b;
    color: #f8fafc;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border-top-color: #3b82f6 !important;
}
body.dark-mode h2 {
    color: #60a5fa !important;
}
body.dark-mode p[data-i18n="planner-instructions"],
body.dark-mode .info-text {
    color: #94a3b8 !important;
}

/* Inputs & Autocomplete */
body.dark-mode input {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}
body.dark-mode input::placeholder {
    color: #64748b !important;
}
body.dark-mode #origin-gps-btn,
body.dark-mode #origin-map-btn,
body.dark-mode #dest-map-btn {
    color: #94a3b8 !important;
}
body.dark-mode .suggestions-list {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .suggestion-item {
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .suggestion-item strong {
    color: #38bdf8 !important;
}
body.dark-mode .suggestion-item:hover {
    background: #0f172a !important;
    color: #34d399 !important;
}

/* Swap button */
body.dark-mode #swap-btn {
    background: #0f172a !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4) !important;
}
body.dark-mode #swap-btn:hover {
    background: #1e293b !important;
    color: #34d399 !important;
    border-color: #34d399 !important;
}

/* Filter Badges */
body.dark-mode .filters-label {
    color: #cbd5e1;
}
body.dark-mode .trip-filter-checkbox-label:hover {
    background-color: #334155;
}
body.dark-mode .filter-badge-content.badge-fastest {
    background-color: rgba(46, 125, 50, 0.25);
    color: #4ade80;
    border-color: #22c55e;
}
body.dark-mode .filter-badge-content.badge-direct {
    background-color: rgba(21, 101, 192, 0.25);
    color: #60a5fa;
    border-color: #3b82f6;
}
body.dark-mode .filter-badge-content.badge-less-walking {
    background-color: rgba(230, 81, 0, 0.25);
    color: #fb923c;
    border-color: #f97316;
}

/* Trip Cards & Summary */
body.dark-mode .trip-card {
    border-color: #334155;
    background: #1e293b;
}
body.dark-mode .trip-summary {
    background: #1e293b;
    color: #f8fafc;
}
body.dark-mode .trip-summary:hover {
    background: #273549;
}
body.dark-mode .trip-duration {
    color: #f8fafc !important;
}
body.dark-mode .trip-frequency-subtext,
body.dark-mode .trip-times div span:last-child {
    color: #94a3b8 !important;
}
body.dark-mode .card-top-walk-badge {
    background: #0f172a;
    color: #cbd5e1;
    border-color: #334155;
}
body.dark-mode .trip-stops {
    color: #cbd5e1;
}
body.dark-mode .trip-stop-label {
    color: #94a3b8;
}
body.dark-mode .details-btn {
    color: #38bdf8;
}

/* Route bars */
body.dark-mode .walk-bar {
    background-color: #0f172a;
    color: #cbd5e1;
    border-color: #334155;
}
body.dark-mode .transfer-indicator {
    background-color: #475569;
}

/* Trip Details & Timeline */
body.dark-mode .trip-details {
    background: #0f172a;
}
body.dark-mode .trip-details.open {
    border-top-color: #334155;
}
body.dark-mode .trip-details h3 {
    color: #f8fafc !important;
}
body.dark-mode .timeline {
    border-right-color: #475569;
}
body.dark-mode .timeline-stop-name {
    color: #f8fafc;
}
body.dark-mode .timeline-stop::before {
    background: #1e293b;
    border-color: #64748b;
}
body.dark-mode .timeline-route-info {
    border-right-color: #3b82f6;
    color: #f8fafc;
    background: #1e293b;
}
body.dark-mode .timeline-route-info span {
    color: #cbd5e1 !important;
}
body.dark-mode .inter-stop {
    color: #94a3b8;
}
body.dark-mode .inter-stop span {
    color: #cbd5e1;
}
body.dark-mode .inter-stop::before {
    background: #475569;
    border-color: #1e293b;
}
body.dark-mode .expand-stops-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
body.dark-mode .map-link {
    background: #1e293b !important;
    color: #38bdf8 !important;
    border-color: #334155 !important;
}

/* Direct Pure Walk Card */
body.dark-mode .pure-walk-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .pure-walk-card div[style*="color: #1e293b"] {
    color: #f8fafc !important;
}
body.dark-mode .pure-walk-card div[style*="color: #64748b"] {
    color: #94a3b8 !important;
}
body.dark-mode .pure-walk-card a {
    background: #0f172a !important;
    border-color: #0284c7 !important;
    color: #38bdf8 !important;
}

/* Notices & Banners */
body.dark-mode #night-notice {
    background-color: #2e1a05 !important;
    border-color: #78350f !important;
    color: #fef08a !important;
}
body.dark-mode .night-status-badge {
    background: #172554;
    color: #93c5fd;
    border-color: #1d4ed8;
}
body.dark-mode #nearby-stops-container {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc;
}
body.dark-mode #nearby-stops-status {
    color: #94a3b8 !important;
}
body.dark-mode .mobile-search-pill {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
}
body.dark-mode .mobile-search-pill:active {
    background: #0f172a !important;
}
body.dark-mode .mobile-search-text {
    color: #cbd5e1 !important;
}
body.dark-mode .mobile-filter-badge {
    background: #1e3a8a !important;
    color: #60a5fa !important;
}
body.dark-mode .mobile-nearby-btn {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}
body.dark-mode .tabs-container .tab-btn {
    background: #1e293b;
    color: #94a3b8;
}
body.dark-mode .tabs-container .tab-btn.active {
    background: #064e3b;
    color: #34d399;
}
body.dark-mode #map-instructions-box {
    background: #1e293b !important;
    border: 1px solid #334155;
    color: #60a5fa !important;
}
body.dark-mode .lang-toggle-container span:first-child {
    border-right-color: #334155 !important;
}

/* Tag Badges Dark Mode */
body.dark-mode .trip-tag-badge.tag-fastest {
    background-color: rgba(46, 125, 50, 0.3) !important;
    color: #4ade80 !important;
    border: 1px solid #15803d;
}
body.dark-mode .trip-tag-badge.tag-walk {
    background-color: rgba(217, 119, 6, 0.25) !important;
    color: #fbbf24 !important;
    border: 1px solid #b45309;
}
body.dark-mode .trip-tag-badge.tag-least-walk {
    background-color: rgba(234, 88, 12, 0.25) !important;
    color: #fb923c !important;
    border: 1px solid #c2410c;
}
body.dark-mode .trip-tag-badge.tag-healthiest {
    background-color: rgba(147, 51, 234, 0.25) !important;
    color: #c084fc !important;
    border: 1px solid #7e22ce;
}
body.dark-mode .trip-tag-badge.tag-direct {
    background-color: rgba(2, 132, 199, 0.25) !important;
    color: #38bdf8 !important;
    border: 1px solid #0369a1;
}
body.dark-mode .trip-tag-badge.tag-transfers {
    background-color: rgba(99, 102, 241, 0.25) !important;
    color: #a5b4fc !important;
    border: 1px solid #4338ca;
}
body.dark-mode .trip-tag-badge.tag-default {
    background-color: rgba(20, 184, 166, 0.25) !important;
    color: #2dd4bf !important;
    border: 1px solid #0f766e;
}

/* Timeline Route Info & Walking Directions inline overrides */
body.dark-mode .timeline-route-info {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}
body.dark-mode .timeline-route-info strong {
    color: #f8fafc !important;
}
body.dark-mode .timeline-route-info span {
    color: #cbd5e1 !important;
}
body.dark-mode .timeline-route-info .map-link {
    background: #0f172a !important;
    color: #38bdf8 !important;
    border-color: #334155 !important;
}
body.dark-mode .timeline-stop-name a.map-link {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}
body.dark-mode .timeline-transfer span {
    border-color: #475569 !important;
}
body.dark-mode div[style*="background: #fffbeb"] {
    background: #2e1a05 !important;
    border-color: #78350f !important;
    color: #fef08a !important;
}

/* Map & Leaflet Dark Mode */
body.dark-mode .map-panel {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode #map {
    background: #1a1d21 !important;
    border-color: #334155 !important;
}

/* Dark theme filter for map tiles (Google Maps & OpenStreetMap) */
body.dark-mode .leaflet-tile-pane {
    filter: brightness(0.65) invert(1) contrast(3) hue-rotate(200deg) saturate(0.35) brightness(0.75);
}

/* Keep transit route lines, polylines, and marker pins at full natural color */
body.dark-mode .leaflet-overlay-pane,
body.dark-mode .leaflet-marker-pane,
body.dark-mode .leaflet-shadow-pane,
body.dark-mode .leaflet-popup-pane {
    filter: none !important;
}

/* Leaflet Zoom & Layers Controls Dark Mode */
body.dark-mode .leaflet-control-zoom a,
body.dark-mode .leaflet-control-layers,
body.dark-mode .leaflet-bar a {
    background-color: rgba(30, 41, 59, 0.92) !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.dark-mode .leaflet-control-zoom a:hover,
body.dark-mode .leaflet-bar a:hover {
    background-color: #334155 !important;
    color: #38bdf8 !important;
}

body.dark-mode .leaflet-control-layers-expanded {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #f8fafc !important;
    border: 1px solid #475569 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

body.dark-mode .leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.75) !important;
    color: #94a3b8 !important;
}

body.dark-mode .leaflet-control-attribution a {
    color: #60a5fa !important;
}

/* Leaflet Popups Dark Mode */
body.dark-mode .leaflet-popup-content-wrapper {
    background: #1e293b !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5) !important;
    border: 1px solid #475569;
}

body.dark-mode .leaflet-popup-tip {
    background: #1e293b !important;
}

/* Expanded Map Dark Mode */
body.dark-mode .map-panel.expanded {
    background: #0f172a !important;
}

body.dark-mode #map-expand-btn {
    background: rgba(30, 41, 59, 0.92) !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

body.dark-mode #map-expand-btn:hover {
    background: #334155 !important;
    color: #38bdf8 !important;
}
