/* =============================================
   iPumpuj 2.0 – Global Styles & Design System
   ============================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #0d0f14;
    --bg-card: #161a24;
    --bg-card-hover: #1e2333;
    --accent: #f0c040;
    --accent-dim: #c9a030;
    --text-primary: #f0f2f8;
    --text-secondary: #8892a4;
    --text-muted: #555e70;
    --cheap: #3ddc84;
    --medium: #f0c040;
    --expensive: #ff5c5c;
    --border: rgba(255, 255, 255, 0.07);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius: 14px;
    --radius-sm: 8px;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* =============================================
   Loading Overlay
   ============================================= */

#loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 260px;
    width: 90%;
}

.loading-spinner {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(240, 192, 64, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent), #f8e4a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-text {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    min-height: 38px;
}

.loading-bar-track {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 999px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* =============================================
   Stats Bar
   ============================================= */

#stats-bar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(22, 26, 36, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow);
    transition: opacity 0.4s ease;
}

#stats-bar.hidden { display: none; }

.stats-dot { color: var(--text-muted); }

#stats-count {
    color: var(--accent);
    font-weight: 700;
}

/* =============================================
   Map
   ============================================= */

#map {
    height: 100vh;
    width: 100vw;
    z-index: 0;
}

/* =============================================
   Custom Markers
   ============================================= */

.marker-container {
    background: none !important;
    border: none !important;
}

.custom-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-card);
    background-size: 64%;
    background-repeat: no-repeat;
    background-position: center;
    border: 2px solid rgba(255,255,255,0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.custom-marker:hover {
    transform: scale(1.18);
    z-index: 1000 !important;
}

.custom-marker.generic-marker {
    background-color: #1e2333;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glow-cheap {
    box-shadow: 0 0 12px 3px rgba(61, 220, 132, 0.45);
    border-color: rgba(61, 220, 132, 0.5);
}

.glow-medium {
    box-shadow: 0 0 12px 3px rgba(240, 192, 64, 0.45);
    border-color: rgba(240, 192, 64, 0.5);
}

.glow-expensive {
    box-shadow: 0 0 12px 3px rgba(255, 92, 92, 0.4);
    border-color: rgba(255, 92, 92, 0.45);
}

.glow-none {
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.1);
}

/* =============================================
   Cluster Styles Override
   ============================================= */

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-clip: padding-box;
    border-radius: 50%;
}

.marker-cluster-small {
    background-color: rgba(22, 145, 80, 0.7) !important;
    border: 2px solid rgba(61, 220, 132, 0.6) !important;
}

.marker-cluster-small div {
    background-color: rgba(61, 220, 132, 0.85) !important;
}

.marker-cluster-medium {
    background-color: rgba(150, 110, 10, 0.7) !important;
    border: 2px solid rgba(240, 192, 64, 0.6) !important;
}

.marker-cluster-medium div {
    background-color: rgba(240, 192, 64, 0.85) !important;
}

.marker-cluster-large {
    background-color: rgba(140, 40, 40, 0.7) !important;
    border: 2px solid rgba(255, 92, 92, 0.6) !important;
}

.marker-cluster-large div {
    background-color: rgba(255, 92, 92, 0.85) !important;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--bg-dark) !important;
    line-height: 30px !important;
}

/* =============================================
   User Location Dot
   ============================================= */

.user-dot {
    width: 18px;
    height: 18px;
    background: #4a9eff;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(74, 158, 255, 0.25);
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 0 5px rgba(74, 158, 255, 0.25); }
    50% { box-shadow: 0 0 0 10px rgba(74, 158, 255, 0.08); }
}

/* =============================================
   Leaflet Popup Overrides
   ============================================= */

.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    color: var(--text-primary) !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 16px 18px !important;
    min-width: 200px;
}

.leaflet-popup-tip-container .leaflet-popup-tip {
    background: var(--bg-card) !important;
}

.leaflet-popup-close-button {
    color: var(--text-muted) !important;
    font-size: 18px !important;
    top: 8px !important;
    right: 10px !important;
}

.popup-brand {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-dim);
    margin-bottom: 4px;
}

.popup-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.popup-price-container {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 6px;
}

.popup-price {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.popup-currency {
    font-size: 12px;
    color: var(--text-secondary);
}

.price-cheap { color: var(--cheap); }
.price-medium { color: var(--medium); }
.price-expensive { color: var(--expensive); }
.price-none { color: var(--text-muted); font-size: 14px !important; }

.popup-price-diesel {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.popup-distance {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.popup-no-price {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-style: italic;
}

.popup-btn {
    display: block;
    width: 100%;
    padding: 9px 14px;
    background: linear-gradient(135deg, #c9a030, #f0c040);
    color: #0d0f14;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.popup-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

/* =============================================
   Bottom Panel
   ============================================= */

#bottom-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(22, 26, 36, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 22px;
    min-width: 260px;
    box-shadow: var(--shadow);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#bottom-panel.hidden {
    display: none;
}

.panel-header {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.panel-content { }

#best-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.panel-metrics {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

#best-price {
    color: var(--cheap);
    font-weight: 700;
    font-size: 20px;
}

.panel-currency { color: var(--text-muted); font-size: 11px; }
.panel-dot { color: var(--text-muted); }

/* =============================================
   Badge
   ============================================= */

.badge-best {
    background: var(--accent);
    color: var(--bg-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* =============================================
   Modal
   ============================================= */

#add-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#add-modal.hidden { display: none; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    width: 340px;
    max-width: 90vw;
    position: relative;
    box-shadow: var(--shadow);
    animation: modal-in 0.25s ease;
}

@keyframes modal-in {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    padding-right: 24px;
}

.modal-brand-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-dim);
    margin-bottom: 20px;
}

#close-modal {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

#close-modal:hover { color: var(--text-primary); }

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.optional-label {
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
}

.form-group select option { background: var(--bg-card); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* =============================================
   Sidebar & Navigation Drawer
   ============================================= */

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 380px;
    z-index: 1500;
    background: rgba(13, 17, 24, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

#sidebar.sidebar-closed {
    transform: translateX(-100%);
}

#sidebar.sidebar-open {
    transform: translateX(0);
}

.sidebar-toggle-btn {
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    width: 30px;
    height: 64px;
    background: rgba(13, 17, 24, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 2px 10px rgba(0,0,0,0.3);
    outline: none;
    transition: background 0.2s, color 0.2s;
}

.sidebar-toggle-btn:hover {
    background: var(--bg-card-hover);
    color: #fff;
}

.toggle-icon {
    font-size: 14px;
    font-weight: 800;
}

.sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =============================================
   Sidebar Header & Brand
   ============================================= */

.sidebar-header {
    padding: 24px 20px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    font-size: 26px;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent), #f8e4a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.version-tag {
    font-size: 10px;
    font-weight: 600;
    background: rgba(240, 192, 64, 0.12);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(240, 192, 64, 0.2);
}

/* =============================================
   Search Bar
   ============================================= */

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    padding: 11px 36px 11px 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

#search-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.15);
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.search-clear-btn:hover {
    color: var(--text-primary);
}

/* =============================================
   Fuel Toggle Buttons
   ============================================= */

.fuel-selector-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.selector-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.fuel-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px;
}

.fuel-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fuel-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(240, 192, 64, 0.3);
}

/* =============================================
   Horizontal Brand Filters Pills
   ============================================= */

.brand-filters-scroll {
    padding: 0 20px 14px 20px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.brand-filters-scroll::-webkit-scrollbar {
    display: none; /* Safari & Chrome */
}

#brand-filters {
    display: flex;
    gap: 8px;
    white-space: nowrap;
    width: max-content;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    padding: 6px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.filter-pill.active {
    background: rgba(240, 192, 64, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   Results and Sort Controls
   ============================================= */

.sort-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-secondary);
}

.results-count {
    font-weight: 600;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 6px;
}

#sort-select {
    background: none;
    border: none;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

#sort-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 500;
}

/* =============================================
   Station Card List Container
   ============================================= */

.station-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.no-results p {
    font-size: 13px;
}

/* =============================================
   Station List Item Cards
   ============================================= */

.station-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.station-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.2s;
}

.station-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Glowing Left border per price category */
.station-card.glow-card-cheap::before { background: var(--cheap); }
.station-card.glow-card-medium::before { background: var(--medium); }
.station-card.glow-card-expensive::before { background: var(--expensive); }

.list-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: 64%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.list-brand-logo.generic-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background-color: #1e2333;
}

.card-details {
    flex: 1;
    min-width: 0; /* truncate text if needed */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-brand {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-dim);
    text-transform: uppercase;
}

.card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.list-distance {
    white-space: nowrap;
    font-weight: 500;
}

.card-other-price {
    color: var(--text-muted);
}

.card-price-box {
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 68px;
    flex-shrink: 0;
}

.card-price {
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.card-currency {
    font-size: 9px;
    font-weight: 600;
}

/* Card Price box backgrounds */
.price-bg-cheap {
    background: rgba(61, 220, 132, 0.12) !important;
    border: 1px solid rgba(61, 220, 132, 0.25);
    color: var(--cheap) !important;
}

.price-bg-medium {
    background: rgba(240, 192, 64, 0.12) !important;
    border: 1px solid rgba(240, 192, 64, 0.25);
    color: var(--medium) !important;
}

.price-bg-expensive {
    background: rgba(255, 92, 92, 0.12) !important;
    border: 1px solid rgba(255, 92, 92, 0.25);
    color: var(--expensive) !important;
}

.price-bg-none {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border);
    color: var(--text-muted) !important;
}

/* =============================================
   Locate Me Floating Button
   ============================================= */

#locate-btn {
    position: fixed;
    right: 20px;
    bottom: 96px; /* Above the standard leaflet control / bottom-panel */
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(22, 26, 36, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.2s ease, transform 0.1s ease;
    outline: none;
}

#locate-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
    transform: scale(1.08);
}

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

#locate-btn.loading svg {
    animation: rotateGPS 1.2s linear infinite;
    color: var(--accent);
}

@keyframes rotateGPS {
    0% { transform: rotate(0deg) scale(0.9); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(0.9); }
}

/* Adjust zoom buttons position to align neatly */
.leaflet-bottom.leaflet-right {
    margin-bottom: 10px;
    margin-right: 6px;
}

/* =============================================
   Marker Price Badge
   ============================================= */

.marker-price-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    padding: 2px 4px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: none;
}

/* =============================================
   Popup Grid Upgrades
   ============================================= */

.popup-prices-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    border: 1px solid var(--border);
}

.popup-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
}

.popup-fuel-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.popup-price-row .popup-price {
    font-size: 13px;
    font-weight: 800;
}

.popup-price-row .popup-currency {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
}

.popup-price-row .popup-no-price {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0;
}

/* =============================================
   Responsive Design (Mobile Devices)
   ============================================= */

@media (max-width: 768px) {
    #sidebar {
        width: 100vw;
        height: 60vh;
        top: auto;
        bottom: 0;
        border-right: none;
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
        border-radius: var(--radius) var(--radius) 0 0;
    }

    #sidebar.sidebar-closed {
        transform: translateY(calc(100% - 64px)); /* Shows only the top header part */
    }

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

    /* Make toggle button a drag handle bar at the top of drawer */
    .sidebar-toggle-btn {
        top: 0;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 60px;
        height: 8px;
        border-radius: 99px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        margin-top: 8px;
        box-shadow: none;
    }

    .sidebar-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.35);
    }

    .toggle-icon {
        display: none; /* Hide the arrow, make it look like a pure swipe bar */
    }

    .sidebar-header {
        padding: 22px 16px 10px 16px;
    }

    .brand-container {
        justify-content: center;
        margin-bottom: 2px;
    }

    .brand-logo {
        font-size: 22px;
    }

    .brand-name {
        font-size: 18px;
    }

    .brand-filters-scroll {
        padding: 0 16px 10px 16px;
    }

    .sort-container {
        padding: 6px 16px;
    }

    .station-list-container {
        padding: 10px 16px 20px 16px;
    }

    /* Shift locate button up when sidebar is open */
    #locate-btn {
        right: 16px;
        bottom: 74px; /* default above closed drawer */
        transition: bottom 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }

    body:has(#sidebar.sidebar-open) #locate-btn {
        bottom: calc(60vh + 16px);
    }

    /* Hide the stats bar and bottom panel on mobile since sidebar replaces them beautifully */
    #stats-bar {
        display: none !important;
    }

    #bottom-panel {
        display: none !important;
    }
}

