/* styles.css */

/* Premium Button in Header */
#branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.premium-header-button {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-left: 15px; /* Add space between logo and button */
    font-size: 0.9em; /* Slightly smaller text */
}

.premium-header-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #FFC400, #FF8C00);
    color: #000;
}

.premium-header-button i {
    margin-right: 5px;
    color: #333;
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: 0;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    flex: 1 0 auto;
}

/* Header Styles */
header {
    position: relative;
    z-index: 9999;
    overflow: visible;
    background: #ffffff;
    color: #212529;
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

header .container {
    overflow: visible;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    position: relative;
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header a {
    color: #212529;
    text-decoration: none;
    font-size: 16px;
}

header #branding a {
    text-transform: none;
}

header nav a {
    text-transform: uppercase;
}

header li {
    float: left;
    display: inline;
    padding: 0 20px 0 20px;
}

header #branding {
    float: left;
    margin-left: 20px;
}

header #branding h1 {
    margin: 0;
}

header nav {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

#station-toggle {
    display: flex;
    align-items: center;
    margin-right: 3rem; /* This will push the toggle to the left */
    position: relative;
    left: 0;
}

.toggle-container {
    background: white;
    padding: 5px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header .highlight,
header .current a {
    color: #1d3be8;
    font-weight: bold;
}

header a:hover {
    color: #cccccc;
    font-weight: bold;
}
.header-link {
    text-decoration: none; 
    color: inherit; 
    font-size: inherit; 
}

/* Profile Menu Styles */
.auth-container {
    position: relative;
    z-index: 1001;
    margin-left: 1rem; /* Add space between toggle and auth container */
}

.profile-button i {
    font-size: 1.5rem;
    color: #212529;
}

.profile-menu {
    position: relative;
    display: inline-block;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
    z-index: 10000;
    min-width: 200px;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 20px;
}

.user-info {
    border-bottom: 1px solid #eee;
    cursor: default;
}

.user-info:hover {
    background: none;
}

/* Admin link styles */
.admin-only {
    border-top: 1px solid #eee;
    margin-top: 4px;
    padding-top: 8px;
}

.admin-only i {
    color: #2c3e50;
}

.admin-only:hover {
    background-color: #f8f9fa;
}

.admin-only:hover i {
    color: #e74c3c;
}

/* Station Toggle Styles */
.toggle-container {
    background: white;
    padding: 5px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.switch {
    position: relative;
    width: 80px; /* Width of the switch */
    height: 40px; /* Height of the switch */
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: 7px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.oval {
    position: absolute;
    width: 100%;
    height: 100%;
    background: orange; /* Default color for petrol */
    border-radius: 20px;
    transition: background-color 0.4s;
}

.circle {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch input:checked + .oval {
    background-color: #0056b3;
}

.switch input:checked + .oval + .circle {
    transform: translateX(40px);
}

.icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    transition: opacity 0.4s;
    z-index: 2;
}

.petrol-icon {
    left: 8px;
    opacity: 1;
}

.ev-icon {
    right: 8px;
    opacity: 0;
}

.switch input:checked ~ .petrol-icon {
    opacity: 0;
}

.switch input:checked ~ .ev-icon {
    opacity: 1;
}

/* Hide the "Toggle between" text properly */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none; 
    flex-direction: column;
    cursor: pointer;
    margin-left: auto; 
}

.bar {
    height: 3px;
    width: 25px;
    background-color: white;
    margin: 4px 0;
}

/* Default menu state for larger screens */
#menu {
    display: flex;
    flex-direction: row; 
}

/* Main Content Styles */
#main-content {
    display: flex;
    flex-grow: 1; 
    padding: 0.5rem; 
    flex-wrap: nowrap;  
    gap: 1rem;
    height: calc(100vh - 60px); /* Ensure main content takes up available height */
}

#sidebar {
    width: 300px; 
    background: white;
    padding: 0.5rem; 
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    min-width: 250px; 
    height: calc(100vh - 100px); /* Match map height */
    overflow-y: auto; /* Enable vertical scrolling */
    position: sticky;
    top: 0;
}

#sidebar h2 {
    color: #35424a;
    margin-top: 0;
}

#controls {
    margin-bottom: 1rem;
}

.geocoder {
    width: 280px !important;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

#start-geocoder {
    z-index: 3;
    position: relative;
}

#end-geocoder {
    z-index: 2;
    position: relative;
}

.mapboxgl-ctrl-geocoder {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    z-index: 3 !important;
    margin: 0 !important;
}

.mapboxgl-ctrl-geocoder--suggestion-list {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
}

.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
}

#routeButton {
    display: block;
    width: 100%;
    padding: 10px;
    background: #1d3be8;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#routeButton:hover {
    background: #2015bd;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

#map-container {
    flex-grow: 1; /* Allow map to take remaining space */
    margin-left: 0.5rem; /* Adjust as needed */
    min-height: 400px; /* Set a minimum height for the map */
    height: 100%; /* Ensure map container takes full height of parent */
    position: relative; /* Needed for absolute positioning of child elements */
}

#map {
    width: 100%;
    height: calc(100vh - 100px); /* Made map taller by reducing subtracted value */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px; /* Add space before footer */
}


/* Footer Styles */
footer {
    padding: 1rem;
    color: #ffffff;
    background-color: #35424a;
    text-align: center;
}

/* Filter Styles */
#filters {
    margin-bottom: 1rem;
}

.filter-group {
    margin-bottom: 0.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
    color: #35424a;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #1d3be8; 
    color: white;
    border-color: #1d3be8;
}

/* EV mode button styles */
.ev-mode .filter-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Hover effects for both modes */
.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Specific hover colors for each mode */
.filter-btn.active:hover {
    background: #d13d15; 
}

.ev-mode .filter-btn.active:hover {
    background: #45a049; 
}

/* Route button container */
.route-button-container {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.route-button-container button {
    width: 100%;
    max-width: 280px;
}

/* Apply filters button */
#apply-filters-button {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Ensure filters container has proper spacing */
#filters-container {
    margin-top: 20px;
}

#filters-container h3 {
    margin-bottom: 15px;
}

/* Map Control Buttons */
.map-controls-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.map-control-btn {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 20px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    visibility: visible;
}

.map-control-btn:hover {
    background-color: #f8f8f8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Clear Route and Save Route Buttons */
.clear-route-btn {
    position: absolute;
    bottom: 30px;
    padding: 10px 20px;
    background-color: #db3434;
    color: rgb(197, 0, 0);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#clearRouteBtn {
    right: 20px;
}

#saveRouteBtn {
    right: 160px;
}

.clear-route-btn:hover {
    background-color: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header li, header nav {
        float: none;
    }
    nav {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    #station-toggle {
        margin-left: -30px; /* Add negative margin to move left */
        position: relative; /* Change to relative positioning */
        left: auto; /* Remove absolute positioning */
        top: auto; /* Remove absolute positioning */
        transform: none; /* Remove transform */
    }
    header #branding {
        float: none;
        text-align: center;
        margin: 0;
    }
    header #branding h1 {
        margin: 10px 0;
    }
    header ul {
        margin: 0;
        padding: 0;
    }
    header #mobile-menu {
        display: block;
        cursor: pointer;
    }
    #menu {
        position: absolute;
        top: 60px;
        right: 0;
        background: #35424a;
        width: 100%;
        padding: 1rem 0;
        z-index: 100;
        display: none;
    }
    header li {
        padding: 10px 20px;
    }
    
    /* Mobile popup styles */
    .station-popup {
        max-width: 280px;
    }
    
    .popup-header {
        padding: 12px;
    }
    
    .popup-brand {
        font-size: 1.1rem;
    }
    
    .popup-address {
        font-size: 0.8rem;
    }
    
    .popup-prices {
        padding: 0 12px 6px;
    }
    
    .price-item {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .price-label {
        font-size: 0.8rem;
    }
    
    .price-value {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .popup-footer {
        padding: 12px;
        gap: 6px;
    }
    
    .popup-action-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .popup-action-btn i {
        font-size: 0.8rem;
    }
    
    .favorite-btn {
        font-size: 1.1rem;
        padding: 6px;
    }
    .mapboxgl-canvas-container {
        position: relative !important;
    }
    .button-group {
        justify-content: flex-start;
    }
    #main-content {
        flex-direction: column;
        position: relative;
    }
    #sidebar {
        width: 100%;
        margin-bottom: 1rem;
        overflow-y: visible;
        height: auto;
        max-height: none;
        order: -1;
        position: relative;
        z-index: 2;
    }
    #map-container {
        margin-left: 0;
        height: calc(100vh - 250px);
        margin-bottom: 20px;
        order: 1;
        position: relative;
        z-index: 1;
    }
    #map {
        height: 100%;
        position: relative;
    }
    header a, #routeButton {
        font-size: 14px;
    }
    .filter-btn {
        font-size: 0.8rem;
    }
    #menu.visible, .menu-toggle {
        display: flex;
    }
    #menu {
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background: #35424a;
        width: 100%;
        padding: 1rem 0;
        z-index: 100;
        display: none;
    }
    header li {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    #station-toggle {
        position: relative;
        left: 0;
        margin: 10px auto;
        top: auto;
        transform: none;
        width: auto;
        display: flex;
        justify-content: center;
        margin-left: 2rem;
        margin-right: 40px;
    }
    
    /* Extra small screen popup styles */
    .station-popup {
        max-width: 240px;
    }
    
    .popup-header {
        padding: 10px;
    }
    
    .popup-brand {
        font-size: 1rem;
    }
    
    .popup-address {
        font-size: 0.75rem;
    }
    
    .popup-prices {
        padding: 0 10px 4px;
    }
    
    .price-item {
        padding: 6px 8px;
        margin-bottom: 4px;
    }
    
    .popup-footer {
        padding: 10px;
        gap: 4px;
    }
    
    .popup-action-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}

.circle {
    position: absolute;
    width: 36px; /* Circle size */
    height: 36px; /* Circle size */
    background: white;
    border-radius: 50%;
    top: 2px; /* Center the circle */
    left: 2px; /* Start position */
    transition: transform 0.4s;
}

/* When checked (for EV) */
input:checked + .oval {
    background: rgb(83, 178, 83); /* Change to green for EV */
}

input:checked + .oval + .circle {
    transform: translateX(40px); /* Move the circle to the right */
}

/* Toggle icons */
.icon {
    position: absolute;
    top: 50%;
    font-size: 18px;
    transform: translateY(-50%);
    color: white;
    transition: opacity 0.4s;
}

/* Petrol icon on the left */
.petrol-icon {
    left: 10px; /* Adjusted positioning */
    opacity: 1; /* Show petrol icon */
}

/* EV icon on the right (hidden initially) */
.ev-icon {
    right: 10px; /* Adjusted positioning */
    opacity: 0; /* Hide EV icon initially */
}

/* When checked (for EV) */
input:checked + .oval .petrol-icon {
    opacity: 0; /* Hide petrol icon */
}

input:checked + .oval .ev-icon {
    opacity: 1; /* Show EV icon */
}

#routeButton.petro-theme {
    background: #e8491d; /* Petrol button color */
}

#routeButton.ev-theme {
    background: #388e3c; /* Green button color */
}

.filter-group.petro-theme {
    background: #e8491d; /* Petrol button color */
}

.filters-group.ev-theme {
    background: #388e3c; /* Green button color */
}

.custom-marker {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    padding: 4px;
    cursor: pointer;
    min-width: 80px;
}


.small-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}


.small-price {
    white-space: nowrap;
    background: #f8f9fa;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.small-price.cheapest {
    background: #4CAF50;
    color: white;
}


.marker-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.marker-content:hover {
    transform: scale(1.15);
    z-index: 1;
}

.price-label {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin-top: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.station-popup {
    padding: 15px;
    max-width: 250px;
}

.history-link {
    display: block;
    margin-top: 10px;
    color: #0066cc;
    text-decoration: none;
}

.history-link:hover {
    text-decoration: underline;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th, .table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.table th {
    background-color: #f5f5f5;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tr:hover {
    background-color: #f0f0f0;
}

.station-popup {
    padding: 15px;
    max-width: 250px;
}

.marker-content.cheapest-station {
    background: #ffd700;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.cheapest-price {
    color: #2e7d32;
    font-weight: bold;
    background: #e8f5e9;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px 0;
}

.cheapest-label {
    background-color: #4CAF50;  /* Green background */
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 2px;
    font-weight: bold;
    text-align: center;
}

.current-location-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    padding: 0;
    z-index: 3;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-location-btn::before {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M21%203L3%2010.53v.98l6.84%202.65L12.48%2021h.98L21%203z%22%20fill%3D%22%23666%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
}

.current-location-btn:hover::before {
    opacity: 1;
}

.current-location-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

/* Adjust the geocoder input padding to accommodate both buttons */
.mapboxgl-ctrl-geocoder--input {
    padding-right: 60px !important;
}

/* Position the clear button correctly */
.mapboxgl-ctrl-geocoder--button {
    right: 2px !important;
}

/* Make geocoder boxes wider */
.mapboxgl-ctrl-geocoder {
    min-width: 300px !important;
    width: 100% !important;
    max-width: 400px !important;
}

@media (max-width: 640px) {
    .mapboxgl-ctrl-geocoder {
        min-width: 250px !important;
        width: 100% !important;
        max-width: 450px !important;
    }
}

/* Mobile-specific adjustments for geocoder and route button */
@media (max-width: 768px) {
    .mapboxgl-ctrl-geocoder {
        max-width: 90%; /* Constrain width on mobile */
        width: 90%;
        margin: 0 auto; /* Center the geocoder */
    }

    .mapboxgl-ctrl-geocoder--input {
        width: 100%; /* Full width within the constrained container */
        padding-right: 40px !important; /* Reduce right padding */
    }

    #get-route-btn {
        max-width: 90%; /* Constrain route button width */
        margin: 10px auto; /* Center the button and add some vertical spacing */
        display: block;
    }
}

/* Mapbox Popup Styles */
.mapboxgl-popup {
    max-width: 300px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    overflow: hidden !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.mapboxgl-popup-tip {
    border-top-color: #f9fafb !important;
    border-bottom-color: #f9fafb !important;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.popup-content {
    padding: 0;
}

.popup-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.popup-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.popup-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.popup-body {
    margin-bottom: 12px;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.price-info .price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.price-info .fuel-type {
    font-size: 0.9rem;
    color: #666;
}

.price-info .timestamp {
    font-size: 0.8rem;
    color: #999;
}

.popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.popup-actions button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    transition: all 0.2s ease;
}

.popup-actions button:hover {
    background: #f5f5f5;
}

.popup-actions button.primary {
    background: #4A90E2;
    color: white;
    border: none;
}

.popup-actions button.primary:hover {
    background: #357ABD;
}

.popup-actions button i {
    margin-right: 4px;
}

.station-details {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0;
}

.station-details p {
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.station-details i {
    color: #999;
    width: 16px;
}

/* Station Popup Styles */
.station-popup {
    padding: 0;
    max-width: 320px;
    font-family: 'Arial', sans-serif;
}

.popup-title-container {
    flex: 1;
}

.popup-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.popup-brand {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d3be8;
    letter-spacing: -0.02em;
}

.popup-address {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

.favorite-btn {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    margin-right: -8px;
    margin-top: -4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.15);
    background-color: rgba(0,0,0,0.04);
    color: #9ca3af;
}

.favorite-btn.active {
    color: #ffc107;
    text-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.popup-prices {
    padding: 0 16px 8px;
    background-color: #ffffff;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.price-item:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.price-item:last-child {
    margin-bottom: 0;
}

.price-label {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 500;
}

.price-value {
    font-weight: 700;
    color: #111827;
    background: rgba(0,0,0,0.03);
    padding: 4px 8px;
    border-radius: 6px;
}

.price-value.cheapest {
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
}

.popup-footer {
    display: flex;
    gap: 8px;
    padding: 16px;
    background-color: #f9fafb;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.popup-action-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.popup-action-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.popup-action-btn i {
    font-size: 0.9rem;
}

.popup-action-btn.report-price {
    background-color: #1d3be8;
    color: white;
    border: none;
}

.popup-action-btn.report-price:hover {
    background-color: #1631c7;
    box-shadow: 0 4px 12px rgba(29, 59, 232, 0.25);
}

/* Auth Styles */
.auth-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: absolute;
    top: 20px;
    right: 10px;
    z-index: 1001;
}

.btn-google {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-google:hover {
    background-color: #f8f8f8;
}

.btn-google i {
    color: #4285f4;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    color: #333;
    font-size: 1rem;
}

.btn-signout {
    padding: 0.5rem 1rem;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-signout:hover {
    background-color: #d32f2f;
}

/* Auth message styles */
.auth-error,
.auth-success {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-success {
    background-color: #10b981;
}

.auth-error {
    background-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Profile Menu Styles */
.profile-menu {
    position: relative;
    z-index: 1001;
}

.profile-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    margin-top: -10px; /* Added negative margin to move the icon up */
}

.profile-button:hover {
    color: rgba(255, 255, 255, 0.8);
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
    z-index: 10000;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 20px;
}

.user-info {
    border-bottom: 1px solid #eee;
    cursor: default;
}

.user-info:hover {
    background: none;
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    border-top: 4px solid #1d3be8; /* Add RoutePal blue border at the top */
}

.auth-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1d3be8;
}

.auth-modal .close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
}

.auth-modal .close-button:hover {
    color: #333;
}

.auth-modal.show {
    display: flex;
    opacity: 1;
}

/* Hide station toggle when auth modal is shown */
body:has(.auth-modal.show) #station-toggle {
    display: none;
}

/* Ensure auth modal is above everything */
.auth-modal.show {
    z-index: 2000;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.auth-switch p {
    margin: 0;
    color: #666;
}

.text-button {
    background: none;
    border: none;
    color: #1d3be8;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.text-button:hover {
    color: #1631c8;
}

/* Mobile Popup Optimizations */
@media (max-width: 768px) {
    .mapboxgl-popup {
        max-width: 280px !important;
        width: 90vw !important;
    }

    .popup-content {
        padding: 12px;
        font-size: 0.95em;
    }

    .popup-header {
        padding: 10px 12px;
        margin: -12px -12px 10px -12px;
    }

    .popup-brand {
        font-size: 1.1em;
    }

    .popup-address {
        font-size: 0.85em;
        margin: 6px 0 12px 0;
    }

    .popup-prices {
        padding: 8px;
        gap: 6px;
    }

    .price-item {
        padding: 6px 10px;
    }

    .price-value {
        font-size: 1em;
        min-width: 70px;
        padding: 3px 8px;
    }

    .popup-footer {
        margin-top: 12px;
        padding-top: 12px;
        flex-wrap: wrap;
    }

    .popup-action-btn {
        flex: 1;
        justify-content: center;
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .mapboxgl-popup {
        max-width: 260px !important;
    }

    .popup-content {
        padding: 10px;
    }

    .popup-header {
        padding: 8px 10px;
        margin: -10px -10px 8px -10px;
    }

    .popup-brand {
        font-size: 1em;
    }

    .price-item {
        padding: 5px 8px;
    }

    .price-value {
        min-width: 60px;
    }
}

/* Search Mode Toggle Styles */
.search-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
}

.toggle-label {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toggle-label input[type="radio"] {
    display: none;
}

.toggle-label input[type="radio"]:checked + span {
    font-weight: bold;
}

.toggle-label:has(input[type="radio"]:checked) {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Location inputs container */
#location-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Report Price Modal Styles */
.report-price-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-price-modal.show {
    display: flex;
    opacity: 1;
}

.report-price-modal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    transform: none;
    opacity: 1;
}

.report-price-modal .form-group {
    margin-bottom: 15px;
}

.report-price-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.report-price-modal select,
.report-price-modal input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.report-price-modal .form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.report-price-modal .btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.report-price-modal .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.report-price-modal .btn-primary {
    background: #007bff;
    color: white;
    border: none;
}

.report-price-modal .close-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

/* Admin Price Reports Styles */
.report-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.report-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
}

.report-status {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-approved {
    background-color: #dcfce7;
    color: #166534;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.report-details {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
}

.detail-label {
    color: #64748b;
    font-size: 0.875rem;
}

.detail-value {
    color: #1e293b;
    font-weight: 500;
}

.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-approve {
    padding: 0.5rem 1rem;
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-approve:hover {
    background-color: #16a34a;
}

.btn-reject {
    padding: 0.5rem 1rem;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-reject:hover {
    background-color: #dc2626;
}

.no-reports {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-size: 1.125rem;
}

.mapboxgl-ctrl-geocoder--input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.mapboxgl-ctrl-geocoder--input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Auth Messages */
.auth-success,
.auth-error {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-success {
    background-color: #10b981;
}

.auth-error {
    background-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Stations Container */
.stations-container {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    max-height: 400px; /* Set a max height */
    height: calc(100vh - 300px); /* Dynamic height based on viewport */
    overflow: hidden; /* Hide overflow on container */
}

.stations-container h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    position: sticky;
    top: 0;
    background: #fff;
    padding-bottom: 10px;
    z-index: 1;
}

.stations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 5px; /* Add some padding for the scrollbar */
    flex-grow: 1; /* Allow list to grow and fill container */
    height: 100%; /* Take full height of container */
}

/* Customize scrollbar for webkit browsers */
.stations-list::-webkit-scrollbar {
    width: 8px;
}

.stations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.stations-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.stations-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* For Firefox */
.stations-list {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.station-item {
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.station-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.station-brand {
    font-weight: 600;
    color: #2c3e50;
}

.station-price {
    font-weight: 600;
    color: #28a745;
    padding: 4px 8px;
    background: #e8f5e9;
    border-radius: 4px;
}

.station-address {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
}

.station-prices {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.price-item {
    font-size: 0.85em;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
    color: #495057;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-item[data-fuel-type="${selectedFuelType}"] {
    background: #e8f5e9;
    color: #28a745;
}

/* Stations List Styles */
.stations-list {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.station-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    position: relative;
    cursor: pointer;
}

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

.station-item:hover {
    background-color: #f8f9fa;
}

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

.station-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.favorite-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #ffc107;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.station-details {
    font-size: 0.9rem;
    color: #666;
}

.station-distance {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

/* Modern styling for cheapest stations list */
.stations-list-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}
.cheapest-station {
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

/* Make sure the premium features don't break the original styling */
.station-item.premium-blur {
    filter: blur(3px);
}

/* Premium overlay base styling - used in other contexts */
.premium-overlay {
    border-radius: 0;
    z-index: 5;
}

.first-station {
    background-color: #f8fdff;
    border-radius: 8px;
    border: 1px solid #d0e8ff;
    position: relative;
}

.first-station::before {
    content: '🏆 Best Price';
    position: absolute;
    top: -10px;
    right: 10px;
    background: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Scrollbar Styles */
.stations-list::-webkit-scrollbar {
    width: 8px;
}

.stations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.stations-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.stations-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Station badges */
.badge {
    background-color: #10B981;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.favorite-card.cheapest {
    border-color: #10B981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Auth Form Styles */
.auth-modal .form-group {
    margin-bottom: 20px;
}

.forgot-password-container {
    text-align: right;
    margin-top: 5px;
    font-size: 0.85em;
}

.forgot-password-link {
    background: none;
    border: none;
    color: #1d3be8;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    font-size: inherit;
    text-decoration: underline;
}

.forgot-password-link:hover {
    color: #1631c8;
}

.auth-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.auth-modal .form-group input[type="email"],
.auth-modal .form-group input[type="password"],
.auth-modal .form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-modal .form-group input:focus {
    outline: none;
    border-color: #1d3be8;
    box-shadow: 0 0 0 2px rgba(29, 59, 232, 0.1);
}

.auth-modal .btn-primary {
    width: 100%;
    padding: 0.75rem;
    background-color: #1d3be8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.auth-modal .btn-primary:hover {
    background-color: #1631c8; /* Slightly darker shade of RoutePal blue */
}

.auth-modal .btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.auth-modal .password-input-container {
    position: relative;
}

.auth-modal .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
}

.auth-modal .password-toggle:hover {
    color: #333;
}

.auth-modal .google-signin-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: white;
    color: #333;
    border: 1px solid #d1d7ff; /* Light blue border to match theme */
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: background-color 0.2s ease;
}

.auth-modal .google-signin-btn:hover {
    background-color: #f8f9ff; /* Very light blue background */
    border-color: #1d3be8; /* RoutePal blue border on hover */
}

.auth-modal .google-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem;
    background-color: #1d3be8; /* RoutePal blue background */
    color: white; /* White text for contrast */
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(29, 59, 232, 0.2); /* Subtle shadow */
}

.auth-modal .google-auth-btn:hover {
    background-color: #1631c8; /* Slightly darker shade of RoutePal blue */
    box-shadow: 0 4px 8px rgba(29, 59, 232, 0.3); /* Enhanced shadow on hover */
}

.auth-modal .google-auth-btn i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    color: white; /* White icon to match text */
}

.auth-modal .divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-modal .divider::before,
.auth-modal .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #d1d7ff; /* Light blue to match theme */
}

.auth-modal .divider span {
    padding: 0 10px;
    color: #666;
    font-size: 0.9rem;
}

.auth-modal .social-auth-buttons {
    margin-top: 1rem;
}

/* Radius Slider Styles */
#radius-filter-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.radius-slider {
    width: 100%;
    margin: 8px 0;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
    position: relative;
}

.radius-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4A90E2;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: -6px; /* Center the thumb on the track */
}

.radius-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4A90E2;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: -6px; /* Center the thumb on the track */
}

.radius-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.radius-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.radius-slider:focus {
    outline: none;
}

.radius-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #ddd;
    border-radius: 2px;
}

.radius-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #ddd;
    border-radius: 2px;
}

/* Fix for Firefox to ensure thumb is centered */
.radius-slider::-moz-range-progress {
    height: 4px;
    background: #4A90E2;
    border-radius: 2px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .geocoder {
        width: 100% !important;
    }

    .mapboxgl-ctrl-geocoder {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .mapboxgl-ctrl-geocoder--suggestion-list {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input {
        width: calc(100% - 40px) !important;
        min-width: auto !important;
        max-width: none !important;
    }
}

/* Add styles for country indicator in station cards */
.country-indicator {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Premium Feature Styles */
.station-item.premium-blur {
    position: relative;
    filter: blur(2px);
    pointer-events: none;
    overflow: hidden;
    opacity: 0.85;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

.station-item .premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(29, 59, 232, 0.85), rgba(25, 25, 112, 0.9));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.premium-message {
    color: white;
    text-align: center;
    padding: 1.5rem;
    max-width: 90%;
    animation: fadeIn 0.5s ease-out;
}

.premium-message h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #FFD700; /* Gold color */
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.premium-button {
    background: linear-gradient(to bottom, #FFD700, #FFC107);
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.premium-button:hover {
    background: linear-gradient(to bottom, #FFC107, #FFB300);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.premium-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 4px;
    margin: 5px 0;
    font-weight: bold;
}

.premium-upgrade-message {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px;
    margin: 5px 0;
    font-size: 0.9em;
    text-align: center;
}

.premium-link {
    display: inline-block;
    background: #1d3be8;
    color: white;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 0.8em;
    transition: background-color 0.2s ease;
}

.premium-link:hover {
    background: #1631c7;
    text-decoration: none;
}

/* Premium Route Overlay */
.premium-route-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.premium-route-overlay.active {
    opacity: 1;
    visibility: visible;
}

.premium-route-modal {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    width: 450px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
}

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

.premium-route-header {
    background: linear-gradient(135deg, #1d3be8, #1631c7);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.premium-route-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.premium-route-header p {
    margin: 10px 0 0;
    font-size: 1rem;
    opacity: 0.9;
}

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

.premium-features-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.premium-features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #333;
}

.premium-features-list li:before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    width: 24px;
    height: 24px;
    background: #e6f0ff;
    color: #1d3be8;
    border-radius: 50%;
    font-weight: bold;
}

.premium-price {
    text-align: center;
    margin: 20px 0;
    font-size: 1.2rem;
    color: #333;
}

.premium-price strong {
    font-size: 1.5rem;
    color: #1d3be8;
}

.premium-route-footer {
    display: flex;
    padding: 20px;
    border-top: 1px solid #eee;
    justify-content: space-between;
}

.premium-route-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.premium-route-btn.primary {
    background: linear-gradient(135deg, #1d3be8, #1631c7);
    color: white;
    flex-grow: 1;
    margin-left: 10px;
}

.premium-route-btn.primary:hover {
    background: linear-gradient(135deg, #1631c7, #0f2aa8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 59, 232, 0.25);
}

.premium-route-btn.secondary {
    background: #f5f5f5;
    color: #666;
}

.premium-route-btn.secondary:hover {
    background: #e9e9e9;
    color: #333;
}

.premium-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.premium-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .premium-route-modal {
        width: 90%;
        max-width: 400px;
    }
    
    .premium-route-header h2 {
        font-size: 1.3rem;
    }
    
    .premium-route-header p {
        font-size: 0.9rem;
    }
    
    .premium-features-list li {
        font-size: 0.9rem;
    }
    
    .premium-price {
        font-size: 1.1rem;
    }
    
    .premium-route-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .premium-route-modal {
        width: 95%;
        max-width: 320px;
    }
    
    .premium-route-header {
        padding: 15px;
    }
    
    .premium-route-header h2 {
        font-size: 1.1rem;
    }
    
    .premium-route-content {
        padding: 15px;
    }
    
    .premium-features-list li {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .premium-features-list li:before {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    
    .premium-route-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .premium-route-btn {
        width: 100%;
        margin: 0;
    }
    
    .premium-route-btn.primary {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Style for French stations to make them visually distinct */
.station-item .station-brand:has(.country-indicator) {
    color: #0066cc; /* Blue color for French stations */
}

/* Specific styling for French price items */
/* Modern, subtle styling for fuel type price items */
.price-item {
    background-color: #f8f9fa;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.price-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.price-item[data-fuel-type="E85"] {
    border-left-color: #4caf50; /* Green for E85 */
}

.price-item[data-fuel-type="LPG"] {
    border-left-color: #2196f3; /* Blue for LPG */
}

.price-item[data-fuel-type="Diesel"] {
    border-left-color: #ff9800; /* Orange for Diesel */
}

.price-item[data-fuel-type="SP98"] {
    border-left-color: #f44336; /* Red for premium petrol */
}

.price-item[data-fuel-type="SP95"] {
    border-left-color: #ff5722; /* Deep orange for SP95 */
}

.price-item[data-fuel-type="E10"] {
    border-left-color: #ff5722; /* Deep orange for E10 */
}

/* Style for equivalent fuel types in UK data */
.price-item[data-fuel-type="E5"] {
    border-left-color: #ff5722; /* Same color as SP95 to show equivalence */
}

.price-item[data-fuel-type="B7"] {
    border-left-color: #ff9800; /* Same color as Diesel to show equivalence */
}

/* Add a small indicator for equivalent fuel types */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.price-item.fuel-equivalent {
    border-right: 3px solid #3b82f6; /* Blue border on right to indicate equivalence */
    font-weight: 500;
}

.apple-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #000;
    border-radius: 4px;
    background-color: #000;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.apple-auth-btn:hover {
    background-color: #333;
}

.apple-auth-btn i {
    margin-right: 10px;
    font-size: 18px;
}

.download-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #000;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.download-app-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.download-app-btn i {
    font-size: 1.2em;
}

@media (max-width: 768px) {
    #branding {
        gap: 8px;
    }
    
    .download-app-btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    .download-app-btn i {
        font-size: 1em;
    }
}

.app-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.download-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #000;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
    white-space: nowrap;
}

.download-app-btn.google-play {
    background-color: #3DDC84;  /* Google Play green */
    color: #000;  /* Black text for better contrast */
}

.download-app-btn.google-play:hover {
    background-color: #2EC06D;  /* Slightly darker green on hover */
}

.download-app-btn.google-play i {
    color: #000;  /* Black icon for better contrast */
}

.download-app-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.download-app-btn i {
    font-size: 1.2em;
}

@media (max-width: 768px) {
    #branding {
        gap: 8px;
    }
    
    .app-buttons {
        gap: 2px;
    }
    
    .download-app-btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    .download-app-btn i {
        font-size: 1em;
    }
}

/* Floating app download popups */
.download-app-popup {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    min-width: 260px;
    max-width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    padding: 18px 20px 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideIn 0.5s;
    font-size: 1em;
    margin-bottom: 0;
    transition: transform 0.2s, opacity 0.2s;
}
.download-app-popup.google {
    bottom: 100px;
}
.download-app-popup .popup-icon {
    font-size: 2.2em;
    margin-right: 10px;
}
.download-app-popup .popup-content {
    flex: 1;
}
.download-app-popup .popup-title {
    font-weight: bold;
    font-size: 1.08em;
    margin-bottom: 2px;
}
.download-app-popup .popup-desc {
    font-size: 0.97em;
    color: #555;
    margin-bottom: 6px;
}
.download-app-popup .popup-link {
    display: inline-block;
    margin-top: 2px;
    color: #1d3be8;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.download-app-popup .popup-link:hover {
    color: #2015bd;
    text-decoration: underline;
}
.download-app-popup .popup-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.3em;
    cursor: pointer;
    margin-left: 2px;
    margin-top: -8px;
    align-self: flex-start;
    transition: color 0.2s;
}
.download-app-popup .popup-close:hover {
    color: #ef4444;
}

/* Mobile responsive styles for app popup */
@media (max-width: 768px) {
    .download-app-popup {
        right: 16px;
        bottom: 16px;
        min-width: 240px;
        max-width: calc(100vw - 32px);
        padding: 16px 18px 14px 18px;
        gap: 12px;
    }
    .download-app-popup .popup-icon {
        font-size: 1.8em;
        margin-right: 8px;
    }
    .download-app-popup .popup-title {
        font-size: 1em;
    }
    .download-app-popup .popup-desc {
        font-size: 0.9em;
    }
    .download-app-popup .popup-close {
        font-size: 1.1em;
        margin-left: 1px;
        margin-top: -4px;
        padding: 4px;
    }
    .download-app-popup .popup-content > div:last-child {
        flex-direction: column;
        gap: 8px;
    }
    .download-app-popup .popup-content > div:last-child > * {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .download-app-popup {
        right: 12px;
        bottom: 12px;
        min-width: 220px;
        padding: 14px 16px 12px 16px;
        gap: 10px;
    }
    .download-app-popup .popup-icon {
        font-size: 1.6em;
        margin-right: 6px;
    }
    .download-app-popup .popup-close {
        font-size: 1em;
        margin-left: 0px;
        margin-top: -2px;
        padding: 2px;
    }
}

/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #333;
}

.cookie-text p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.cookie-text small {
    font-size: 0.8rem;
    color: #888;
}

.cookie-text a {
    color: #1d3be8;
    text-decoration: none;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn.primary {
    background: #1d3be8;
    color: white;
}

.cookie-btn.primary:hover {
    background: #1529b3;
}

.cookie-btn.secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.cookie-btn.secondary:hover {
    background: #e9ecef;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-settings-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e0e0e0;
}

.cookie-settings-header h3 {
    margin: 0;
    color: #333;
}

.cookie-settings-body {
    padding: 20px;
}

.cookie-category {
    margin-bottom: 30px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.cookie-status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.cookie-status.required {
    background: #e9ecef;
    color: #6c757d;
}

.cookie-category p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-category ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 0.9rem;
}

.cookie-category li {
    margin-bottom: 5px;
}

.cookie-settings-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Switch styles for cookie settings */
.cookie-settings-modal .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-settings-modal .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-settings-modal .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cookie-settings-modal .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cookie-settings-modal input:checked + .slider {
    background-color: #1d3be8;
}

.cookie-settings-modal input:checked + .slider:before {
    transform: translateX(26px);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .cookie-settings-content {
        margin: 20px;
        max-height: 90vh;
    }
    
    .cookie-settings-footer {
        flex-direction: column;
    }
    
    .cookie-settings-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 15px;
    }
    
    .cookie-text h3 {
        font-size: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.85rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 10px 16px;
    }
}
