:root {
    /* Light theme variables */
    --bg-primary: #ffffff;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.95);
    --bg-input: #ffffff;
    --bg-button: #f8f9fa;
    --bg-button-hover: #e9ecef;
    --bg-button-active: #667eea;
    --bg-item: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #999999;
    --text-input: #333333;
    --border-primary: #e1e5e9;
    --border-secondary: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --accent-primary: #667eea;
    --accent-secondary: #5a6fd8;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-primary: #1a1a1a;
    --bg-secondary: rgba(26, 26, 26, 0.95);
    --bg-panel: rgba(30, 30, 30, 0.95);
    --bg-input: #2d2d2d;
    --bg-button: #2d2d2d;
    --bg-button-hover: #3d3d3d;
    --bg-button-active: #667eea;
    --bg-item: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-input: #ffffff;
    --border-primary: #444444;
    --border-secondary: rgba(255, 255, 255, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --accent-primary: #667eea;
    --accent-secondary: #5a6fd8;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
    text-align: center;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

#map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 30px solid transparent;
    pointer-events: none;
    z-index: 1;
}

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

/* Control Panel Styling */
.control-panel {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    background: var(--bg-panel);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-secondary);
    max-width: 280px;
    overflow: visible;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* POI Styling */
.poi-marker {
    background-color: #ff6b6b !important;
    border: 3px solid #ffffff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1000;
}

.poi-marker::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #ff6b6b;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.poi-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

/* POI Popup Styling */
.poi-popup .mapboxgl-popup-content {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.poi-popup .mapboxgl-popup-tip {
    border-top-color: white;
}

.poi-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 5px;
    margin-bottom: 5px;
}

.poi-btn.primary {
    background: #667eea;
    color: white;
}

.poi-btn.primary:hover {
    background: #5a6fd8;
}

.poi-btn.primary.active {
    background: #e74c3c;
    animation: pulse 1.5s infinite;
}

.poi-btn.secondary {
    background: #6c757d;
    color: white;
}

.poi-btn.secondary:hover {
    background: #5a6268;
}

.poi-list {
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.poi-list-header {
    font-size: 11px;
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.poi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: var(--bg-item);
    border-radius: 4px;
    margin-bottom: 3px;
    font-size: 11px;
    transition: background 0.3s ease;
}

.poi-item-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.poi-item-actions {
    display: flex;
    gap: 3px;
}

.poi-action-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.poi-action-btn:hover {
    background: #5a6fd8;
}

.poi-action-btn.remove {
    background: #e74c3c;
}

.poi-action-btn.remove:hover {
    background: #dc3545;
}

.poi-info {
    margin-top: 8px;
    padding: 6px;
    background: #e7f3ff;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.poi-info small {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.poi-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: fadeInScale 0.3s ease;
}

.notification-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    opacity: 0.7;
}

/* Transit time indicators are now only shown in popups, not on markers */

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

    50% {
        transform: scale(1.05);
    }

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

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

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

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-panel {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-panel:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Show Filters Button (for desktop when panel is hidden) */
.show-filters-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.show-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.panel-section {
    padding: 3px 12px;
    border-bottom: 1px solid var(--border-secondary);
    transition: border-color 0.3s ease;
}

.panel-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

/* Checkbox Styling */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    position: relative;
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-primary);
    background: var(--bg-item);
    text-align: center;
    position: relative;
}

.checkbox-item label::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid var(--border-primary);
    border-radius: 2px;
    background: var(--bg-input);
    margin-right: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked+label::before {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"%3E%3Cpath fill="white" d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/%3E%3C/svg%3E');
    background-size: 10px 10px;
    background-position: center;
    background-repeat: no-repeat;
}

.checkbox-item label:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.checkbox-item input[type="checkbox"]:checked+label {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    font-weight: 500;
}

/* Address Input Styling */
.address-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-input);
    color: var(--text-input);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.address-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.address-input::placeholder {
    color: var(--text-muted);
}

/* Suggestions Dropdown Styling */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-secondary);
    font-size: 14px;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: var(--bg-button-hover);
}

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

.suggestion-item.highlighted {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

#address-container {
    position: relative;
}

/* Multiselect Dropdown Styling */
.multiselect-container {
    position: relative;
    width: 100%;
}

.multiselect-dropdown {
    width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    font-size: 13px;
    background-color: var(--bg-input);
    color: var(--text-input);
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.multiselect-dropdown:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.multiselect-dropdown option {
    padding: 8px 12px;
    font-size: 14px;
    background-color: white;
    color: #333;
}

.multiselect-dropdown option:checked {
    background-color: #667eea;
    color: white;
}

.multiselect-dropdown option:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

/* Year Range Styling */
.year-range-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.year-range-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: var(--border-primary);
    border-radius: 20px;
    transition: background-color 0.3s ease;
    margin-right: 8px;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked+.toggle-slider {
    background-color: var(--accent-primary);
}

.toggle-switch input[type="checkbox"]:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.year-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.year-range-inputs.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.year-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.year-input-group label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.year-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-input);
    color: var(--text-input);
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-align: center;
}

.year-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.year-presets {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preset-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.preset-btn {
    padding: 4px 6px;
    background: var(--bg-button);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.preset-btn:hover {
    background: var(--bg-button-hover);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.preset-btn:active {
    background: var(--bg-button-hover);
    transform: translateY(1px);
}

/* Year Pills Styling (keeping for backward compatibility) */
.year-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.year-pill {
    position: relative;
}

.year-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.year-pill label {
    display: block;
    padding: 6px 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
    user-select: none;
    text-align: center;
}

.year-pill label:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.year-pill input[type="checkbox"]:checked+label {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

/* Add styles for the rental amount marker */
.rental-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #000;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.7;
    /* Set the opacity value (0.0 to 1.0) */
}

.address-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: blue;
    color: #000;
    font-weight: bold;
    font-size: x-small;
    cursor: pointer;
    opacity: 0.7;
    /* Set the opacity value (0.0 to 1.0) */
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.mobile-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.mobile-toggle.active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Collapsible Section Styling */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 2px 0;
    margin-bottom: 0;
    transition: all 0.2s ease;
}

.section-header:hover {
    color: #667eea;
}

.section-content {
    transition: all 0.3s ease;
    overflow: hidden;
    padding-bottom: 6px;
}

/* Special handling for search address section to allow dropdown overflow */
#search-address-content {
    overflow: visible;
}

.section-content.collapsed {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
}

.section-toggle {
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
}

.section-toggle.rotated {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .control-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        border-radius: 0 12px 12px 0;
        overflow-y: auto;
        z-index: 999;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .control-panel.open {
        transform: translateX(0);
    }

    .panel-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        font-size: 16px;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-controls {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .theme-toggle {
        background: none;
        border: none;
        color: white;
        font-size: 16px;
        cursor: pointer;
        padding: 0;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .theme-toggle:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

    .close-panel {
        background: none;
        border: none;
        color: white;
        font-size: 20px;
        cursor: pointer;
        padding: 0;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .panel-section {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .section-title {
        font-size: 13px;
        margin-bottom: 0;
    }

    /* Improved checkbox layout for mobile */
    .checkbox-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 12px;
    }

    .checkbox-item label {
        font-size: 13px;
        padding: 10px 8px;
        text-align: center;
        border-radius: 8px;
        border: 1px solid #e1e5e9;
        background: #f8f9fa;
    }

    .checkbox-item input[type="checkbox"]:checked+label {
        background-color: #667eea;
        color: white;
        border-color: #667eea;
    }

    /* Improved year pills for mobile */
    .year-pills {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 12px;
    }

    .year-pill label {
        padding: 10px 8px;
        font-size: 11px;
        text-align: center;
        border-radius: 8px;
    }

    /* Improved date buttons for mobile */
    .date-buttons-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 12px;
    }

    .date-button {
        min-width: auto;
        flex: none;
        padding: 12px;
        font-size: 13px;
    }

    /* Improved address input for mobile */
    .address-input {
        padding: 14px 16px;
        font-size: 16px;
        /* Prevents zoom on iOS */
        margin-top: 12px;
    }

    /* Improved price sliders for mobile */
    .price-sliders {
        margin-top: 12px;
    }

    .slider-group {
        gap: 10px;
    }

    .slider-group label {
        font-size: 12px;
        line-height: 1.4;
    }

    .price-slider {
        height: 8px;
    }

    .price-slider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }

    .price-slider::-moz-range-thumb {
        width: 22px;
        height: 22px;
    }

    .clear-button {
        padding: 12px;
        font-size: 13px;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .control-panel {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 280px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    .panel-section {
        padding: 12px 16px;
    }

    .section-title {
        font-size: 12px;
    }

    .panel-header {
        font-size: 15px;
        padding: 12px 16px;
    }
}


/* Price Controls Button Styling */
.price-controls-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-control-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0;
}

.price-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.price-buttons {
    display: flex;
    gap: 4px;
}

.price-btn {
    flex: 1;
    padding: 4px 8px;
    background: var(--bg-button);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 50px;
}

.price-btn:hover {
    background: var(--bg-button-hover);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.price-btn:active {
    background: var(--bg-button-hover);
    transform: translateY(1px);
}

.price-btn:disabled {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.price-btn:disabled:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    transform: none;
}

/* MRT Toggle Styling */
.mrt-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

/* Zoom Controls Styling */
.zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.zoom-slider-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zoom-slider-container label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.zoom-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-primary);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.3s ease;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #28a745;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
    background: #218838;
    transform: scale(1.1);
}

.zoom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #28a745;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.zoom-slider::-moz-range-thumb:hover {
    background: #218838;
    transform: scale(1.1);
}

.zoom-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
    transition: color 0.3s ease;
}

.zoom-label-left,
.zoom-label-right {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zoom-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.zoom-button {
    padding: 6px 8px;
    background: var(--bg-button);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.zoom-button:hover {
    background: var(--bg-button-hover);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.zoom-button:active {
    background: var(--bg-button-hover);
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .zoom-controls {
        margin-top: 12px;
    }

    .zoom-button {
        padding: 10px 8px;
        font-size: 11px;
    }

    .zoom-slider {
        height: 8px;
    }

    .zoom-slider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }

    .zoom-slider::-moz-range-thumb {
        width: 22px;
        height: 22px;
    }
}

/* Clear Button Styling */
.clear-button {
    width: 100%;
    padding: 6px 10px;
    margin-top: 6px;
    background-color: var(--bg-button);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-button:hover {
    background-color: var(--bg-button-hover);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.clear-button:active {
    background-color: #dee2e6;
    transform: translateY(1px);
}

/* Date Button Styling */
.date-buttons-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.date-button {
    padding: 6px 8px;
    background: var(--bg-button);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.date-button:hover {
    background: var(--bg-button-hover);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.date-button.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.date-button.active:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

@media (max-width: 768px) {
    .date-buttons-container {
        flex-direction: column;
    }

    .date-button {
        min-width: auto;
        flex: none;
    }
}

/* Custom styles for Mapbox Geolocate Control */
.mapboxgl-ctrl-bottom-right {
    bottom: 60px !important;
}

/* Copyright Notice Styling */
.copyright-notice {
    position: absolute;
    bottom: 30px;
    right: 15px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-secondary);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .copyright-notice {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .copyright-notice {
        bottom: 15px;
        right: 10px;
        font-size: 10px;
        padding: 6px 10px;
    }
}

#chart-container {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 500px;
    height: 300px;
    background: var(--bg-panel);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-secondary);
    z-index: 2;
    padding: 15px;
    box-sizing: border-box;
    transition: background 0.3s ease, border-color 0.3s ease;
}

#chart-container.hidden {
    display: none;
}

/* Custom Popup Styling */
.mrt-popup .mapboxgl-popup-content,
.mapboxgl-popup-content {
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border: none;
    overflow: hidden;
    background: transparent;
}

.mrt-popup .mapboxgl-popup-tip,
.mapboxgl-popup-tip {
    border-top-color: transparent;
    border-width: 8px 8px 0 8px;
}

/* Remove default Mapbox popup background */
.mapboxgl-popup-content-wrapper {
    background: transparent;
    box-shadow: none;
}

.mapboxgl-popup-close-button {
    display: none;
}

/* Add animation for popups */
.mrt-popup .mapboxgl-popup-content,
.mapboxgl-popup-content {
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}