/**
 * PetrolMate Map Styles - Modern & Simple
 * Clean, minimalistic design similar to Google Maps/Waze
 */

/* Map Container */
.map-section {
    width: 100%;
    min-height: 700px; /* Ensure section doesn't collapse */
    margin: 0;
    position: relative;
    background: #f0f0f0;
}

.map-container {
    width: 100%;
    height: 700px;
    position: relative;
    background: #e5e5e5;
}

/* Loading State */
.map-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 183, 0, 0.3);
    border-radius: 50%;
    border-top-color: #FFB700;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

.map-container.loading::after {
    content: 'Loading map...';
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 14px;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Map Controls */
.map-locate-btn {
    position: absolute;
    top: 148px;
    right: 10px;
    z-index: 10;
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-locate-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-locate-btn:active {
    transform: scale(0.95);
}

/* Highlighted locate button - shown when using approximate (IP-based) location */
.map-locate-btn.highlight-gps {
    background: linear-gradient(135deg, #FFB700 0%, #F59E0B 100%);
    color: #000;
    box-shadow:
        0 2px 8px rgba(255, 183, 0, 0.5),
        0 0 0 3px rgba(255, 183, 0, 0.25);
    animation: pulse-gps 2s ease-in-out infinite;
}

.map-locate-btn.highlight-gps:hover {
    background: linear-gradient(135deg, #FFC933 0%, #FFB700 100%);
    transform: scale(1.05);
}

.map-locate-btn.highlight-gps svg {
    color: #000;
}

@keyframes pulse-gps {
    0%, 100% {
        box-shadow:
            0 2px 8px rgba(255, 183, 0, 0.5),
            0 0 0 3px rgba(255, 183, 0, 0.25);
    }
    50% {
        box-shadow:
            0 2px 12px rgba(255, 183, 0, 0.7),
            0 0 0 6px rgba(255, 183, 0, 0.15);
    }
}

/* Dark mode support for highlighted locate button */
[data-theme="dark"] .map-locate-btn.highlight-gps {
    background: linear-gradient(135deg, #FFB700 0%, #E5A500 100%);
    color: #000;
    box-shadow:
        0 2px 8px rgba(255, 183, 0, 0.4),
        0 0 0 3px rgba(255, 183, 0, 0.2);
}

.map-info {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.3;
    pointer-events: none;
}

.map-info.loading {
    color: #FFB700;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.3;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Map Notifications */
.map-notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.map-notification.success {
    background: #10B981;
    color: white;
}

.map-notification.error {
    background: #EF4444;
    color: white;
}

.map-notification.info {
    background: #3B82F6;
    color: white;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Modern Popup Styles */
.modern-popup .maplibregl-popup-content {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    max-width: 320px;
}

.station-popup {
    background: white;
}

.popup-logo {
    padding: 16px 20px 8px;
    text-align: center;
    background: white;
}

.popup-logo img {
    height: 48px;
    max-width: 140px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.popup-header {
    padding: 8px 20px;
    text-align: center;
}

.popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.popup-fuel-type {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 20px 8px;
}

.popup-price {
    padding: 20px;
    text-align: center;
    font-size: 48px;
    font-weight: 900;
    color: #10B981;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -1px;
}

.price-unit {
    font-size: 16px;
    font-weight: 600;
    color: #059669;
    margin-left: 4px;
}

.popup-price.no-price {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    background: #f5f5f5;
    padding: 16px;
}

.popup-details {
    padding: 16px 20px;
    background: white;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-text {
    flex: 1;
}

.detail-text p {
    margin: 0;
    line-height: 1.4;
}

.detail-text .address {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.detail-text .location {
    font-size: 13px;
    color: #666;
}

.detail-text .brand-name {
    font-size: 14px;
    font-weight: 600;
    color: #FFB700;
}

.detail-text .updated {
    font-size: 13px;
    color: #999;
}

.popup-actions {
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 24px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

/* ===== COMPACT STATION POPUP STYLES ===== */

/* Compact header with inline logo */
.popup-header-compact {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
}

.popup-logo-inline {
    flex-shrink: 0;
}

.popup-logo-inline img {
    height: 36px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
}

.header-divider {
    color: #ddd;
    font-size: 20px;
    font-weight: 300;
    flex-shrink: 0;
}

.station-name-inline {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

/* Compact price with fuel type inline */
.popup-price-compact {
    padding: 14px 16px;
    text-align: center;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.price-large {
    font-size: 36px;
    font-weight: 900;
    color: #10B981;
    line-height: 1;
    letter-spacing: -1px;
}

.price-divider {
    color: #34D399;
    font-size: 20px;
    font-weight: 600;
}

.fuel-type-label {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
    text-transform: capitalize;
}

.popup-price-compact.no-price {
    background: #f5f5f5;
}

.popup-price-compact.no-price .no-price-text {
    font-size: 16px;
    font-weight: 600;
    color: #999;
}

.popup-price-compact.no-price .price-divider,
.popup-price-compact.no-price .fuel-type-label {
    color: #bbb;
}

/* Compact details section */
.popup-details-compact {
    padding: 12px 16px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row-compact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-icon-compact {
    flex-shrink: 0;
    color: #666;
    margin-top: 2px;
}

.detail-text-compact {
    flex: 1;
    min-width: 0;
}

.address-line,
.updated-line {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.address-line {
    color: #1a1a1a;
}

/* Navigation button styles */
.btn-nav {
    flex: 1;
    min-width: 90px;
    padding: 12px 10px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: white;
}

.nav-icon {
    font-size: 20px;
    line-height: 1;
}

.nav-text {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Apple Maps - Dark gray/black */
.btn-apple {
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.btn-apple:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

/* Google Maps - Google blue */
.btn-google {
    background: linear-gradient(135deg, #4285F4 0%, #3574E2 100%);
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.3);
}

.btn-google:hover {
    background: linear-gradient(135deg, #3574E2 0%, #2A5FD1 100%);
    box-shadow: 0 3px 8px rgba(66, 133, 244, 0.4);
    transform: translateY(-1px);
}

/* Waze - Waze blue */
.btn-waze {
    background: linear-gradient(135deg, #33CCFF 0%, #00B8E6 100%);
    box-shadow: 0 2px 6px rgba(51, 204, 255, 0.3);
}

.btn-waze:hover {
    background: linear-gradient(135deg, #00B8E6 0%, #00A3CC 100%);
    box-shadow: 0 3px 8px rgba(51, 204, 255, 0.4);
    transform: translateY(-1px);
}

.btn-nav:active {
    transform: translateY(0);
}

/* Navigation buttons - matching list view style */
.popup-actions .nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    position: relative;
}

.popup-actions .nav-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.popup-actions .nav-button:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.popup-actions .nav-button:active {
    transform: scale(1.05);
}

/* Source Attribution - inline with updated time */
.source-inline {
    font-size: 9px;
    color: #999;
    margin-left: 3px;
}

.dark-mode .source-inline,
.station-popup.dark-mode .source-inline {
    color: #666;
}

/* Old button styles (keep for backwards compatibility) */
.btn-navigate {
    width: 100%;
    padding: 14px 20px;
    background: #4285F4;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.btn-navigate:hover {
    background: #3574E2;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
    transform: translateY(-1px);
}

.btn-navigate:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 18px;
    line-height: 1;
}

.btn-text {
    font-size: 16px;
    font-weight: 700;
}

/* MapLibre Control Customization */
.maplibregl-ctrl-group {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    overflow: hidden;
}

.maplibregl-ctrl-group button {
    background: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
}

.maplibregl-ctrl-group button:hover {
    background: #f5f5f5 !important;
}

.maplibregl-ctrl-group button + button {
    border-top: 1px solid #e5e5e5 !important;
}

.maplibregl-popup-close-button {
    font-size: 24px;
    padding: 4px 8px;
    color: #666;
}

.maplibregl-popup-close-button:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: white;
}


/* Error State */
.map-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
    padding: 40px;
}

.map-error-state .error-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.map-error-state h3 {
    color: #333;
    margin-bottom: 10px;
}

.retry-button {
    margin-top: 20px;
    padding: 10px 24px;
    background: #FFB700;
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.retry-button:hover {
    background: #F59E0B;
}

/* Ultra-Compact Pin Markers */
.maplibregl-marker {
    width: auto !important;
    height: auto !important;
}

.pin-marker {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    transition: transform 0.15s ease;
    margin: 0;
    /* Add padding to increase touch target area without changing visual size */
    padding: 10px;
    background: transparent;
    /* Ensure minimum 44x44px touch target for mobile (26px logo + 20px padding) */
}

.pin-marker:hover {
    transform: scale(1.15);
    z-index: 1000;
}

.pin-marker:active {
    transform: scale(1.05);
}

/* Touch feedback */
.pin-marker.touching {
    transform: scale(1.2);
    z-index: 10000 !important;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Increase touch target on mobile */
@media (max-width: 768px) {
    .pin-marker {
        padding: 12px; /* 50x50px total touch area on mobile */
    }
}

.pin-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    background: white;
    border-radius: 3px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.pin-logo-fallback {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 3px;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    padding: 0;
}

.pin-price {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    text-shadow:
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 0 2px white,
        0 0 4px white;
    letter-spacing: -0.3px;
}

/* User Location Marker - Yellow dot with pulsing background */
.user-marker {
    /* Minimal container - MapLibre positions this at GPS coordinates */
    width: 0;
    height: 0;
    position: absolute;
    overflow: visible !important;
    pointer-events: none;
}

.user-marker-dot {
    width: 20px;
    height: 20px;
    background: #FFB700; /* App primary color */
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    position: absolute;
    /* Center 20px dot on GPS point using negative margins */
    top: 0;
    left: 0;
    margin-top: -10px;   /* -height/2 */
    margin-left: -10px;  /* -width/2 */
    z-index: 2;
    pointer-events: none;
}

.user-marker-pulse {
    width: 40px;
    height: 40px;
    background: rgba(255, 183, 0, 0.3); /* Yellow pulse matching brand */
    border-radius: 50%;
    position: absolute;
    /* Center 40px pulse on GPS point using negative margins */
    top: 0;
    left: 0;
    margin-top: -20px;   /* -height/2 */
    margin-left: -20px;  /* -width/2 */
    animation: pulse 2s ease-out infinite;
    transform-origin: 20px 20px; /* Scale from center of element (width/2, height/2) */
    z-index: 1;
    pointer-events: none;
}

/* Dark Mode */
.dark-mode .map-section {
    background: #1a1a1a;
}

.dark-mode .pin-logo {
    background: #2a2a2a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.dark-mode .pin-logo-fallback {
    background: #2a2a2a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* User marker dark mode - darker border */
:root[data-theme="dark"] .user-marker-dot,
.dark-mode .user-marker-dot {
    border-color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.dark-mode .pin-price {
    text-shadow:
        -1px -1px 0 #1a1a1a,
        1px -1px 0 #1a1a1a,
        -1px 1px 0 #1a1a1a,
        1px 1px 0 #1a1a1a,
        0 0 3px #1a1a1a;
}

.dark-mode .map-container {
    background: #2a2a2a;
}

.dark-mode .map-locate-btn {
    background: #333;
    color: #f0f0f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.dark-mode .map-locate-btn:hover {
    background: #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dark-mode .map-info {
    background: #333;
    color: #bbb;
}

.dark-mode .modern-popup .maplibregl-popup-content,
.popup-dark .maplibregl-popup-content,
.station-popup.dark-mode ~ .maplibregl-popup-content {
    background: #2a2a2a;
}

/* Popup tip colors for all anchor positions - Light mode */
.popup-light .maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: white !important;
}

.popup-light .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: white !important;
}

.popup-light .maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: white !important;
}

.popup-light .maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: white !important;
}

.popup-light .maplibregl-popup-anchor-top-left .maplibregl-popup-tip {
    border-bottom-color: white !important;
}

.popup-light .maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
    border-bottom-color: white !important;
}

.popup-light .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip {
    border-top-color: white !important;
}

.popup-light .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
    border-top-color: white !important;
}

/* Popup tip colors for all anchor positions - Dark mode */
.popup-dark .maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: #2a2a2a !important;
}

.popup-dark .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: #2a2a2a !important;
}

.popup-dark .maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: #2a2a2a !important;
}

.popup-dark .maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: #2a2a2a !important;
}

.popup-dark .maplibregl-popup-anchor-top-left .maplibregl-popup-tip {
    border-bottom-color: #2a2a2a !important;
}

.popup-dark .maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
    border-bottom-color: #2a2a2a !important;
}

.popup-dark .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip {
    border-top-color: #2a2a2a !important;
}

.popup-dark .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
    border-top-color: #2a2a2a !important;
}

.dark-mode .station-popup,
.station-popup.dark-mode {
    background: #2a2a2a;
}

.dark-mode .popup-logo,
.station-popup.dark-mode .popup-logo {
    background: #2a2a2a;
}

.dark-mode .popup-logo img,
.station-popup.dark-mode .popup-logo img {
    filter: brightness(1.1) drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.dark-mode .popup-header h3,
.station-popup.dark-mode .popup-header h3 {
    color: #f0f0f0;
}

.dark-mode .popup-fuel-type,
.station-popup.dark-mode .popup-fuel-type {
    color: #bbb;
}

.dark-mode .popup-price,
.station-popup.dark-mode .popup-price {
    background: linear-gradient(135deg, #1a3a2a 0%, #164e2d 100%);
}

.dark-mode .price-unit,
.station-popup.dark-mode .price-unit {
    color: #34D399;
}

.dark-mode .popup-details,
.station-popup.dark-mode .popup-details {
    background: #2a2a2a;
}

.dark-mode .detail-text .address,
.station-popup.dark-mode .detail-text .address {
    color: #f0f0f0;
}

.dark-mode .detail-text .location,
.station-popup.dark-mode .detail-text .location {
    color: #bbb;
}

.dark-mode .detail-text .brand-name,
.station-popup.dark-mode .detail-text .brand-name {
    color: #FFB700;
}

.dark-mode .detail-text .updated,
.station-popup.dark-mode .detail-text .updated {
    color: #888;
}

.dark-mode .popup-actions,
.station-popup.dark-mode .popup-actions {
    background: #1a1a1a;
    border-top-color: #444;
}

.dark-mode .maplibregl-ctrl-group {
    background: #333 !important;
}

.dark-mode .maplibregl-ctrl-group button {
    background: #333 !important;
    color: #f0f0f0 !important;
}

.dark-mode .maplibregl-ctrl-group button:hover {
    background: #444 !important;
}

.dark-mode .maplibregl-ctrl-group button + button {
    border-top-color: #555 !important;
}

.dark-mode .maplibregl-popup-close-button {
    color: #bbb;
}

/* ===== COMPACT POPUP DARK MODE ===== */

.dark-mode .popup-header-compact,
.station-popup.dark-mode .popup-header-compact {
    background: #2a2a2a;
}

.dark-mode .station-name-inline,
.station-popup.dark-mode .station-name-inline {
    color: #f0f0f0;
}

.dark-mode .header-divider,
.station-popup.dark-mode .header-divider {
    color: #444;
}

.dark-mode .popup-price-compact,
.station-popup.dark-mode .popup-price-compact {
    background: linear-gradient(135deg, #1a3a2a 0%, #164e2d 100%);
}

.dark-mode .popup-price-compact.no-price,
.station-popup.dark-mode .popup-price-compact.no-price {
    background: #1a1a1a;
}

.dark-mode .popup-details-compact,
.station-popup.dark-mode .popup-details-compact {
    background: #2a2a2a;
}

.dark-mode .detail-icon-compact,
.station-popup.dark-mode .detail-icon-compact {
    color: #888;
}

.dark-mode .address-line,
.station-popup.dark-mode .address-line {
    color: #f0f0f0;
}

.dark-mode .updated-line,
.station-popup.dark-mode .updated-line {
    color: #888;
}

.dark-mode .maplibregl-popup-close-button:hover {
    background: #333;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .map-section {
        min-height: 560px; /* Increased - more space now filters removed from map view */
    }

    .map-container {
        height: 560px;
    }

    .modern-popup .maplibregl-popup-content {
        min-width: 260px;
        max-width: 280px;
        border-radius: 12px;
    }

    .popup-logo {
        padding: 10px 12px 4px;
    }

    .popup-logo img {
        height: 32px;
        max-width: 100px;
    }

    .popup-header {
        padding: 4px 12px;
    }

    .popup-header h3 {
        font-size: 15px;
    }

    .popup-fuel-type {
        font-size: 10px;
        padding: 2px 12px 4px;
    }

    .popup-price {
        padding: 12px;
        font-size: 36px;
    }

    .price-unit {
        font-size: 13px;
    }

    .popup-details {
        padding: 10px 12px;
    }

    .detail-row {
        gap: 8px;
        margin-bottom: 8px;
    }

    .detail-icon {
        font-size: 14px;
    }

    .detail-text .address {
        font-size: 12px;
    }

    .detail-text .location {
        font-size: 11px;
    }

    .detail-text .brand-name {
        font-size: 12px;
    }

    .detail-text .updated {
        font-size: 11px;
    }

    .popup-actions {
        padding: 10px 12px;
    }

    .btn-navigate {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 8px;
    }

    .btn-icon {
        font-size: 16px;
    }

    .btn-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .map-section {
        min-height: 520px; /* Increased - more space now filters removed from map view */
    }

    .map-container {
        height: 520px;
    }

    .map-locate-btn {
        top: 138px;
    }

    .map-info {
        bottom: 20px;
        right: 8px;
    }

    .modern-popup .maplibregl-popup-content {
        min-width: 240px;
        max-width: 260px;
        border-radius: 10px;
    }

    .popup-logo {
        padding: 8px 10px 2px;
    }

    .popup-logo img {
        height: 28px;
        max-width: 90px;
    }

    .popup-header h3 {
        font-size: 14px;
    }

    .popup-fuel-type {
        font-size: 9px;
        padding: 2px 10px 3px;
    }

    .popup-price {
        padding: 10px;
        font-size: 32px;
    }

    .price-unit {
        font-size: 12px;
    }

    .popup-details {
        padding: 8px 10px;
    }

    .detail-row {
        gap: 6px;
        margin-bottom: 6px;
    }

    .detail-icon {
        font-size: 13px;
    }

    .detail-text .address {
        font-size: 11px;
    }

    .detail-text .location {
        font-size: 10px;
    }

    .detail-text .brand-name {
        font-size: 11px;
    }

    .detail-text .updated {
        font-size: 10px;
    }

    .popup-actions {
        padding: 8px 10px;
    }

    .btn-navigate {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 6px;
    }

    .btn-icon {
        font-size: 14px;
    }

    .btn-text {
        font-size: 13px;
    }
}

/* Custom Attribution Control Styling to match logo */
.maplibregl-ctrl-attrib-inner {
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* Light mode - amber/gold color */
.maplibregl-ctrl-attrib a,
.maplibregl-ctrl-attrib-inner {
    color: #C49000 !important;
}

/* Dark mode - black text with yellow period */
[data-theme="dark"] .maplibregl-ctrl-attrib a,
[data-theme="dark"] .maplibregl-ctrl-attrib-inner {
    color: #1a1a1a !important;
}

/* Add subtle emphasis to Petrolmate text */
.maplibregl-ctrl.maplibregl-ctrl-attrib {
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] .maplibregl-ctrl.maplibregl-ctrl-attrib {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Style the period to be oversized and yellow like the logo */
.maplibregl-ctrl-attrib-inner::after {
    content: '.';
    color: #FFB700;
    font-size: 18px;
    font-weight: 700;
    line-height: 0;
    vertical-align: baseline;
    margin-left: -2px;
}

/* Remove the period from the actual text since we're adding it with ::after */
.maplibregl-ctrl-attrib {
    letter-spacing: -0.3px;
}

/* ========================================
   ROUTE NAVIGATION FEATURE
   ======================================== */

/* Navigate Button */
.map-navigate-btn {
    position: absolute;
    top: 198px; /* Below locate button (148 + 40 + 10) */
    right: 10px;
    z-index: 10;
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-navigate-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-navigate-btn:active {
    transform: scale(0.95);
}

.map-navigate-btn.active {
    background: #FFB700;
    color: white;
}

/* Route Panel */
.route-panel {
    display: none; /* Hidden by default */
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 100;
    background: var(--surface, white);
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    max-height: 180px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.route-panel.open {
    display: block; /* Show when open */
}

.route-panel-content {
    padding: 20px;
}

.route-panel-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.3px;
}

/* Route Input Mode */
.route-input-group {
    margin-bottom: 16px;
    position: relative;
}

.route-input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #555);
}

.route-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-primary, #1a1a1a);
    background: var(--input-bg, white);
    transition: all 0.2s ease;
    font-family: inherit;
}

.route-input.has-button {
    padding-right: 48px; /* Make room for button */
}

.route-input:focus {
    outline: none;
    border-color: #FFB700;
    box-shadow: 0 0 0 4px rgba(255, 183, 0, 0.12);
    background: var(--surface, white);
}

.route-input-group .use-location-btn {
    position: absolute;
    right: 6px;
    top: 36px; /* Label (22px) + margin (8px) + border (2px) + vertical center offset (4px) */
    width: 36px;
    height: 36px;
    background: var(--card-bg, #f5f5f5);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary, #333);
    transition: all 0.2s ease;
}

.route-input-group .use-location-btn:hover {
    background: var(--hover-bg, #e8e8e8);
    border-color: #FFB700;
    transform: scale(1.05);
}

.route-input-group .use-location-btn:active {
    transform: scale(0.98);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.1s ease;
    display: block;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item.selected {
    background: rgba(255, 183, 0, 0.08);
}

.autocomplete-content {
    width: 100%;
}

.autocomplete-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.autocomplete-address {
    font-size: 13px;
    color: #6c6c70;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.autocomplete-loading {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary, #666);
    font-size: 14px;
}

.autocomplete-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary, #666);
    font-size: 14px;
}

/* Dark mode autocomplete */
[data-theme="dark"] .autocomplete-dropdown {
    background: #2a2a2c;
    border-color: #3a3a3c;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .autocomplete-item {
    border-bottom-color: #3a3a3c;
}

[data-theme="dark"] .autocomplete-item:hover {
    background: #323234;
}

[data-theme="dark"] .autocomplete-item.selected {
    background: rgba(255, 183, 0, 0.12);
}

[data-theme="dark"] .autocomplete-name {
    color: #ffffff;
}

[data-theme="dark"] .autocomplete-address {
    color: #9a9a9d;
}

/* Detour Control */
.detour-control {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--card-bg, #f8f9fa);
    border-radius: 12px;
    border: 1px solid var(--border, #e5e7eb);
}

.detour-control label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.detour-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.detour-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFB700;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.detour-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFB700;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#detour-value,
#detour-value-active {
    font-weight: 600;
    color: #FFB700;
}

/* Route Actions */
.route-actions {
    display: flex;
    gap: 10px;
}

.calculate-route-btn,
.clear-route-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    letter-spacing: -0.2px;
}

.calculate-route-btn {
    background: linear-gradient(135deg, #FFB700 0%, #FF9500 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.25);
}

.calculate-route-btn:hover {
    background: linear-gradient(135deg, #E6A500 0%, #E68600 100%);
    box-shadow: 0 6px 20px rgba(255, 183, 0, 0.35);
    transform: translateY(-1px);
}

.calculate-route-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 183, 0, 0.3);
}

.calculate-route-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.cancel-route-btn {
    background: var(--card-bg, #f5f5f5);
    color: var(--text-secondary, #666);
    border: 2px solid var(--border, #e5e7eb);
}

.cancel-route-btn:hover {
    background: var(--hover-bg, #e8e8e8);
    border-color: #d1d5db;
}

.clear-route-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.clear-route-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.clear-route-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Active Route Mode */
.route-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.route-stat {
    padding: 14px;
    background: var(--card-bg, #f8f9fa);
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border, #e5e7eb);
}

.stat-icon {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.2px;
}

/* Cheapest Price Display */
.route-cheapest {
    padding: 20px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 14px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.cheapest-label {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cheapest-details {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.cheapest-price {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.cheapest-station {
    font-size: 15px;
    font-weight: 600;
    opacity: 0.95;
}

/* Dark Mode */
[data-theme="dark"] .map-navigate-btn {
    background: #2a2a2a;
    color: #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .map-navigate-btn:hover {
    background: #3a3a3a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .map-navigate-btn.active {
    background: #FFB700;
    color: white;
}

[data-theme="dark"] .route-panel {
    background: #2a2a2a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border: 1px solid #3a3a3a;
}

[data-theme="dark"] .route-panel-title {
    color: #f0f0f0;
}

[data-theme="dark"] .route-input-group label,
[data-theme="dark"] .detour-control label {
    color: #c0c0c0;
}

[data-theme="dark"] .route-input {
    background: #1a1a1a;
    border-color: #3a3a3a;
    color: #f0f0f0;
}

[data-theme="dark"] .route-input:focus {
    border-color: #FFB700;
    box-shadow: 0 0 0 4px rgba(255, 183, 0, 0.2);
    background: #222;
}

[data-theme="dark"] .route-input-group .use-location-btn {
    background: #3a3a3a;
    color: #e0e0e0;
}

[data-theme="dark"] .route-input-group .use-location-btn:hover {
    background: #4a4a4a;
}

[data-theme="dark"] .detour-control {
    background: #1a1a1a;
    border-color: #3a3a3a;
}

[data-theme="dark"] .cancel-route-btn {
    background: #3a3a3a;
    color: #c0c0c0;
    border-color: #4a4a4a;
}

[data-theme="dark"] .cancel-route-btn:hover {
    background: #4a4a4a;
    border-color: #5a5a5a;
}

[data-theme="dark"] .route-stat {
    background: #1a1a1a;
    border-color: #3a3a3a;
}

[data-theme="dark"] .stat-value {
    color: #f0f0f0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .route-panel {
        right: 10px;
        left: 10px;
        border-radius: 12px;
    }

    .route-panel-content {
        padding: 16px;
    }

    .route-panel-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .route-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .route-stat {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 12px;
    }

    .stat-icon {
        margin-bottom: 0;
        font-size: 20px;
    }

    .stat-value {
        font-size: 13px;
    }

    .cheapest-details {
        flex-direction: column;
        gap: 4px;
    }

    .cheapest-price {
        font-size: 24px;
    }

    .cheapest-station {
        font-size: 14px;
    }

    .map-navigate-btn {
        top: 198px;
    }

    .calculate-route-btn,
    .clear-route-btn,
    .cancel-route-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .route-input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .detour-control {
        padding: 12px;
    }
}
/* ========================================
   COMPACT ROUTE PANEL REDESIGN
   ======================================== */

/* Compact Route Header */
.route-header-compact {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.route-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.route-title-compact {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}

.clear-route-btn-compact {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.clear-route-btn-compact:hover {
    background: var(--border, #e5e7eb);
    color: var(--text-primary, #1a1a1a);
}

.route-info-inline {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-bottom: 10px;
}

.route-info-inline span {
    font-weight: 600;
}

.detour-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detour-compact label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.detour-slider-compact {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border, #e5e7eb);
    border-radius: 2px;
    outline: none;
}

.detour-slider-compact::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary, #FFB700);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.detour-slider-compact::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.detour-slider-compact::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary, #FFB700);
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

.detour-slider-compact::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Route Stations List */
.route-stations-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.route-station-card {
    background: var(--card-bg, #f8f9fa);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.route-station-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary, #FFB700);
}

.route-station-card.cheapest {
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.08), rgba(255, 152, 0, 0.08));
    border: 2px solid var(--primary, #FFB700);
}

.route-station-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.route-station-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    flex: 1;
    line-height: 1.3;
}

.route-station-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary, #FFB700);
    background: rgba(255, 183, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 8px;
}

.route-station-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.route-station-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.route-price-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary, #1a1a1a);
}

.route-price-cents {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #666);
}

.route-station-detour {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #666);
    background: var(--surface, white);
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.route-nav-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
}

.route-nav-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: var(--surface, white);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.route-nav-btn:hover {
    background: var(--primary, #FFB700);
    border-color: var(--primary, #FFB700);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.route-nav-btn img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* Empty state for route stations */
.route-stations-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-secondary, #666);
}

.route-stations-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.route-stations-empty-text {
    font-size: 13px;
    font-weight: 600;
}

/* Dark theme support */
[data-theme="dark"] .route-header-compact {
    border-bottom-color: #3a3a3a;
}

[data-theme="dark"] .route-title-compact {
    color: #f0f0f0;
}

[data-theme="dark"] .route-station-card {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

[data-theme="dark"] .route-station-name,
[data-theme="dark"] .route-price-value {
    color: #f0f0f0;
}

[data-theme="dark"] .route-nav-btn {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #f0f0f0;
}

[data-theme="dark"] .route-station-detour {
    background: #1a1a1a;
}

/* ========================================
   BOTTOM HORIZONTAL ROUTE PANEL
   ======================================== */

/* Override compact header for horizontal bottom layout */
.route-header-compact {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.route-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.route-title-compact {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}

.route-info-inline {
    font-size: 12px;
    color: var(--text-secondary, #666);
    margin-bottom: 0;
    white-space: nowrap;
}

.detour-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 200px;
}

.detour-compact label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.clear-route-btn-compact {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Horizontal scrolling station list */
.route-stations-list {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    display: flex;
    gap: 10px;
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.route-stations-list::-webkit-scrollbar {
    height: 6px;
}

.route-stations-list::-webkit-scrollbar-track {
    background: transparent;
}

.route-stations-list::-webkit-scrollbar-thumb {
    background: var(--border, #e5e7eb);
    border-radius: 3px;
}

.route-stations-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #666);
}

/* Horizontal station cards */
.route-station-card {
    background: var(--card-bg, #f8f9fa);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 0;
    transition: all 0.2s ease;
    min-width: 200px;
    max-width: 220px;
    flex-shrink: 0;
}

.route-station-card.cheapest {
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.12), rgba(255, 152, 0, 0.12));
    border: 2px solid var(--primary, #FFB700);
}

.route-station-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.route-station-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    flex: 1;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-station-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--primary, #FFB700);
    background: rgba(255, 183, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 6px;
}

.route-station-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.route-station-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.route-price-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary, #1a1a1a);
}

.route-price-cents {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #666);
}

.route-station-detour {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #666);
    background: var(--surface, white);
    padding: 3px 6px;
    border-radius: 5px;
    white-space: nowrap;
}

.route-nav-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
}

.route-nav-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 5px;
    background: var(--surface, white);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.route-nav-btn:hover {
    background: var(--primary, #FFB700);
    border-color: var(--primary, #FFB700);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Empty state - horizontal center */
.route-stations-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary, #666);
    width: 100%;
}

.route-stations-empty-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.route-stations-empty-text {
    font-size: 12px;
    font-weight: 600;
}

/* Mobile responsive - keep at bottom */
@media (max-width: 768px) {
    .route-panel {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-height: 160px;
    }

    .route-header-compact {
        padding: 8px 12px;
        gap: 12px;
    }

    .route-station-card {
        min-width: 180px;
        max-width: 200px;
    }

    .detour-compact {
        max-width: 150px;
    }
}

/* ========================================
   SEPARATE INPUT VS ACTIVE POSITIONING
   ======================================== */

/* Input mode stays at top-left (original position) */
.route-input-mode {
    /* Keep existing styles - stays in top-left panel */
}

/* Active mode goes to bottom as horizontal bar */
.route-active-mode {
    /* Inherits bottom positioning from parent .route-panel */
}

/* Override panel positioning for input mode */
.route-panel:has(.route-input-mode:not([style*="display: none"])) {
    top: 10px;
    bottom: auto;
    left: 10px;
    right: 60px;
    max-height: none;
    width: auto;
    max-width: 500px;
}

/* Panel at bottom only when active mode is showing */
.route-panel:has(.route-active-mode:not([style*="display: none"])) {
    bottom: 10px;
    top: auto;
    left: 10px;
    right: 10px;
    max-height: 180px;
}


/* ========================================
   BOTTOM BAR IMPROVEMENTS (v1.119)
   ======================================== */

/* Override previous route-nav-btn styles with improved version */
.route-nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    border: 1.5px solid var(--border, #e5e7eb) !important;
    border-radius: 8px !important;
    background: var(--surface, white) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex: 1 !important;
    min-width: 60px !important;
}

.route-nav-btn:hover {
    background: var(--surface-hover, #f8f9fa) !important;
    border-color: var(--primary, #FFB700) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

.route-nav-btn:active {
    transform: translateY(0) !important;
}

.route-nav-btn img {
    width: 26px !important;
    height: 26px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Force horizontal scrolling on desktop */
.route-stations-list {
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 12px !important;
    display: flex !important;
    gap: 12px !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Better scrollbar for desktop */
.route-stations-list::-webkit-scrollbar {
    height: 8px !important;
}

.route-stations-list::-webkit-scrollbar-track {
    background: var(--surface-elevated, #f8f9fa) !important;
    border-radius: 4px !important;
}

.route-stations-list::-webkit-scrollbar-thumb {
    background: var(--border, #d1d5db) !important;
    border-radius: 4px !important;
}

.route-stations-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #9ca3af) !important;
}

/* Better slider styling */
.detour-slider-compact {
    flex: 1 !important;
    height: 6px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: var(--surface-elevated, #f3f4f6) !important;
    border-radius: 3px !important;
    outline: none !important;
    cursor: pointer !important;
}

.detour-slider-compact::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: var(--primary, #FFB700) !important;
    cursor: grab !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.detour-slider-compact::-webkit-slider-thumb:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25) !important;
}

.detour-slider-compact::-webkit-slider-thumb:active {
    cursor: grabbing !important;
    transform: scale(0.95) !important;
}

.detour-slider-compact::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: var(--primary, #FFB700) !important;
    cursor: grab !important;
    border: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.detour-slider-compact::-moz-range-thumb:hover {
    transform: scale(1.1) !important;
}

.detour-slider-compact::-moz-range-thumb:active {
    cursor: grabbing !important;
}

/* Station card improvements */
.route-station-card {
    min-width: 220px !important;
    max-width: 240px !important;
}

.route-nav-buttons {
    display: flex !important;
    gap: 6px !important;
    justify-content: space-between !important;
}

/* Detour time badge improvements */
.route-station-detour {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
}


/* ========================================
   COMPREHENSIVE MOBILE OPTIMIZATION (v1.120)
   ======================================== */

/* Mobile: 768px and below */
@media (max-width: 768px) {
    /* Bottom bar height optimization */
    .route-panel {
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 45vh !important; /* Use viewport height instead of fixed pixels */
        border-radius: 16px 16px 0 0 !important; /* Only round top corners */
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2) !important;
    }

    /* Compact header for mobile */
    .route-header-compact {
        padding: 10px 12px !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    .route-title-compact {
        font-size: 13px !important;
    }

    .route-info-inline {
        font-size: 11px !important;
        flex: 1 1 100% !important; /* Take full width on new line */
        order: 3 !important;
        margin-top: 6px !important;
    }

    .detour-compact {
        flex: 1 1 auto !important;
        max-width: none !important;
        min-width: 120px !important;
    }

    .detour-compact label {
        font-size: 10px !important;
    }

    .clear-route-btn-compact {
        font-size: 20px !important;
        width: 24px !important;
        height: 24px !important;
    }

    /* Station cards optimization */
    .route-stations-list {
        padding: 10px !important;
        gap: 10px !important;
    }

    .route-station-card {
        min-width: 160px !important;
        max-width: 170px !important;
        padding: 8px 10px !important;
    }

    .route-station-name {
        font-size: 11px !important;
    }

    .route-station-badge {
        font-size: 8px !important;
        padding: 2px 4px !important;
    }

    .route-price-value {
        font-size: 18px !important;
    }

    .route-price-cents {
        font-size: 11px !important;
    }

    .route-station-detour {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }

    /* Navigation buttons - larger touch targets */
    .route-nav-buttons {
        gap: 5px !important;
        margin-top: 6px !important;
    }

    .route-nav-btn {
        padding: 8px !important;
        min-width: 48px !important; /* Minimum touch target 48px */
    }

    .route-nav-btn img {
        width: 22px !important;
        height: 22px !important;
    }

    /* Slider optimization */
    .detour-slider-compact {
        height: 8px !important;
    }

    .detour-slider-compact::-webkit-slider-thumb {
        width: 24px !important;
        height: 24px !important;
    }

    .detour-slider-compact::-moz-range-thumb {
        width: 24px !important;
        height: 24px !important;
    }

    /* Better scrollbar on mobile */
    .route-stations-list::-webkit-scrollbar {
        height: 6px !important;
    }
}

/* Small mobile: 480px and below */
@media (max-width: 480px) {
    .route-panel {
        max-height: 50vh !important; /* Slightly taller on small screens */
    }

    .route-header-compact {
        padding: 8px 10px !important;
    }

    .route-title-compact {
        font-size: 12px !important;
    }

    .route-info-inline {
        font-size: 10px !important;
    }

    .route-station-card {
        min-width: 140px !important;
        max-width: 150px !important;
    }

    .route-nav-btn {
        padding: 6px !important;
        min-width: 44px !important;
    }

    .route-nav-btn img {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Portrait orientation specific */
@media (max-width: 768px) and (orientation: portrait) {
    .route-panel {
        max-height: 40vh !important; /* Less height in portrait to see more map */
    }
}

/* Landscape orientation - can show more */
@media (max-width: 768px) and (orientation: landscape) {
    .route-panel {
        max-height: 60vh !important; /* More height in landscape */
    }
}

/* ========================================
   FULL-SCREEN NAVIGATION MODE
   ======================================== */

/* Full-Screen Mode - Hide all UI except map */
body.fullscreen-nav {
    overflow: hidden; /* Prevent body scroll */
}

body.fullscreen-nav .header,
body.fullscreen-nav .search-button,
body.fullscreen-nav .input-row,
body.fullscreen-nav .location-toggle,
body.fullscreen-nav .results-header,
body.fullscreen-nav .country-toggle {
    display: none !important; /* Hide all UI except map */
}

body.fullscreen-nav #map-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    margin: 0;
}

body.fullscreen-nav #map-container {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
}

/* Close Button for Full-Screen Mode */
.fullscreen-close-btn {
    display: none !important; /* Hidden by default */
    position: fixed !important;
    top: 20px !important;
    left: 20px !important; /* Top-left to avoid conflicts with controls */
    z-index: 10000 !important;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #FFB700;
    color: #333;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

body.fullscreen-nav .fullscreen-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.fullscreen-close-btn:hover {
    background: #FFB700;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fullscreen-close-btn:active {
    transform: scale(0.95);
}

/* Dark mode support for close button */
body.dark-theme .fullscreen-close-btn {
    background: rgba(30, 30, 30, 0.95);
    color: #FFB700;
    border-color: #FFB700;
}

body.dark-theme .fullscreen-close-btn:hover {
    background: #FFB700;
    color: #1e1e1e;
}

/* ========== FULLSCREEN MODAL - MOBILE-FIRST iOS DESIGN ========== */

/* === MODAL BASE - CENTERED COMPACT DESIGN === */
body.fullscreen-nav .route-panel,
body.fullscreen-nav .route-panel.open {
    /* Force positioning - CENTERED */
    display: block !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    bottom: auto !important;
    right: auto !important;
    width: 90% !important;
    max-width: 420px !important;
    margin: 0 !important;
    z-index: 10000 !important;

    /* Very compact */
    max-height: none !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;

    /* Rounded all corners */
    border-radius: 16px !important;

    /* Fade in animation */
    animation: fadeInCenter 0.2s ease-out !important;

    /* Remove any backdrop effects */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    /* LIGHT MODE: Clean white with shadow */
    background-color: #ffffff !important;
    background: #ffffff !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
}

@keyframes fadeInCenter {
    from {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* === DARK MODE: Correct selector for [data-theme="dark"] system === */
[data-theme="dark"] body.fullscreen-nav .route-panel,
[data-theme="dark"] body.fullscreen-nav .route-panel.open,
body.dark-theme.fullscreen-nav .route-panel,
body.dark-theme.fullscreen-nav .route-panel.open {
    background-color: #1a1a1c !important;
    background: #1a1a1c !important;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.9) !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* === SCROLLBAR STYLING === */
body.fullscreen-nav .route-panel::-webkit-scrollbar {
    width: 4px;
}

body.fullscreen-nav .route-panel::-webkit-scrollbar-track {
    background: transparent;
}

body.fullscreen-nav .route-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

[data-theme="dark"] body.fullscreen-nav .route-panel::-webkit-scrollbar-thumb,
body.dark-theme.fullscreen-nav .route-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* === VERY COMPACT CONTENT PADDING === */
body.fullscreen-nav .route-panel-content {
    padding: 20px !important;
}

/* === TITLE - SMALLER === */
body.fullscreen-nav .route-panel-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 16px 0 !important;
    letter-spacing: -0.3px !important;
    color: #000000 !important;
}

/* DARK MODE: Title */
[data-theme="dark"] body.fullscreen-nav .route-panel-title,
body.dark-theme.fullscreen-nav .route-panel-title {
    color: #ffffff !important;
}

/* === LABELS - INLINE === */
body.fullscreen-nav .route-input-group label {
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 0 !important;
    margin-right: 10px !important;
    min-width: 45px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    color: #6c6c70 !important;
    vertical-align: middle !important;
}

/* DARK MODE: Labels */
[data-theme="dark"] body.fullscreen-nav .route-input-group label,
body.dark-theme.fullscreen-nav .route-input-group label {
    color: #8e8e93 !important;
}

/* === INPUT GROUPS - INLINE LAYOUT === */
body.fullscreen-nav .route-input-group {
    position: relative !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
}

/* === INPUT FIELDS - INLINE WITH LABEL === */
body.fullscreen-nav .route-input {
    flex: 1 !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    font-weight: 400 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: none !important;
    background-color: #f5f5f7 !important;
    background: #f5f5f7 !important;
    color: #000000 !important;
}

body.fullscreen-nav .route-input::placeholder {
    color: #a8a8ad !important;
}

body.fullscreen-nav .route-input:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 183, 0, 0.3) !important;
    border-color: transparent !important;
}

/* DARK MODE: Inputs */
[data-theme="dark"] body.fullscreen-nav .route-input,
body.dark-theme.fullscreen-nav .route-input {
    background-color: #2a2a2c !important;
    background: #2a2a2c !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] body.fullscreen-nav .route-input::placeholder,
body.dark-theme.fullscreen-nav .route-input::placeholder {
    color: #6c6c70 !important;
}

[data-theme="dark"] body.fullscreen-nav .route-input:focus,
body.dark-theme.fullscreen-nav .route-input:focus {
    border-color: rgba(255, 183, 0, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(255, 183, 0, 0.2) !important;
}

/* === DETOUR CONTROL - VERY COMPACT === */
body.fullscreen-nav .detour-control {
    margin-bottom: 12px !important;
    padding: 0 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
}

body.fullscreen-nav .detour-control label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    margin-right: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    color: #6c6c70 !important;
}

/* DARK MODE: Detour labels */
[data-theme="dark"] body.fullscreen-nav .detour-control label,
body.dark-theme.fullscreen-nav .detour-control label {
    color: #8e8e93 !important;
}

body.fullscreen-nav #detour-value {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #FFB700 !important;
}

body.fullscreen-nav .detour-slider {
    width: 100% !important;
    margin-top: 8px !important;
}

/* === BUTTONS - SMALLER === */
body.fullscreen-nav .route-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 16px !important;
}

body.fullscreen-nav .calculate-route-btn {
    flex: 1 !important;
    padding: 11px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    background-color: #FFB700 !important;
    background: #FFB700 !important;
    color: #000000 !important;
}

body.fullscreen-nav .calculate-route-btn:active {
    transform: scale(0.98) !important;
}

body.fullscreen-nav .cancel-route-btn {
    padding: 11px 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    background-color: #f5f5f7 !important;
    background: #f5f5f7 !important;
    color: #000000 !important;
}

/* DARK MODE: Cancel button */
[data-theme="dark"] body.fullscreen-nav .cancel-route-btn,
body.dark-theme.fullscreen-nav .cancel-route-btn {
    background-color: #2a2a2c !important;
    background: #2a2a2c !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.fullscreen-nav .cancel-route-btn:active {
    transform: scale(0.98) !important;
}

/* === USE LOCATION BUTTON - INLINE === */
body.fullscreen-nav .route-input-group .use-location-btn {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
    z-index: 10 !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    background-color: #FFB700 !important;
    color: #000000 !important;
}

body.fullscreen-nav .route-input-group:first-of-type .route-input {
    padding-right: 12px !important; /* Normal padding */
}

/* === MAP CONTROLS IN FULLSCREEN - PROPERLY ALIGNED === */
body.fullscreen-nav .maplibregl-ctrl-top-right {
    position: fixed !important;
    right: 16px !important;
    left: auto !important;
    top: 80px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body.fullscreen-nav .maplibregl-ctrl-top-right .maplibregl-ctrl {
    margin: 0 !important;
}

body.fullscreen-nav .map-locate-btn {
    position: fixed !important;
    top: 216px !important;
    right: 16px !important;
}

body.fullscreen-nav .map-navigate-btn {
    display: none !important; /* Hidden in nav mode */
}

/* === DESKTOP - SLIGHTLY LARGER === */
@media (min-width: 769px) {
    body.fullscreen-nav .route-panel {
        max-width: 460px !important;
    }
}

