/* ===================================
   PUNJAB CONTOUR MAP STYLES
   =================================== */

/* Map Section Header */
.punjab-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.punjab-map-title-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.punjab-map-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

/* Section Container */
.punjab-contour-map-section {
    width: 100%;
    /* max-width: 1178px; */
    padding: 0;
    border-radius: 0;
    background: #ffffff;
    /* margin: 0 auto 60px auto; */
}

.punjab-contour-map-container {
    /* max-width: 1178px; */
    margin: 0 auto;
    position: relative;
    padding: 0;
    width: 100%;
}

/* Map Container */
.punjab-map-wrapper {
    position: relative;
    width: 100%;
    height: 675px; /* Increased by 1.5x from 450px */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: transparent; /* No background color */
}

/* Punjab background styling */
#punjabContourMap {
    background: transparent; /* No background color */
}

#punjabContourMap {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Wind particle clipping styles */
.leaflet-velocity-canvas {
    position: absolute !important;
    pointer-events: none !important;
    z-index: 1000 !important;
}

.leaflet-velocity-container {
    position: absolute !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    overflow: hidden !important;
}

/* Data Card Overlay */
.punjab-data-card {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    max-width: calc(100% - 40px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    overflow: hidden;
    display: none; /* Hidden by default */
    transition: opacity 0.3s ease;
}

.punjab-data-card.active {
    display: block;
}

.punjab-data-card-header {
    padding: 16px 18px;
    border-bottom: 1px solid #e6e6e6;
    position: relative;
}

.punjab-data-card-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    padding: 0;
    transition: color 0.2s ease;
}

.punjab-data-card-close:hover {
    color: #333;
}

.punjab-location-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #414141;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.punjab-timestamp {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    color: #31343d;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.punjab-timestamp span {
    font-weight: 400;
}

/* AQI Display Section */
.punjab-aqi-display {
    background: linear-gradient(to right, #4ba9ff 75px, #8cd2f4 75px);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 70px;
}

.punjab-aqi-icon-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.punjab-aqi-icon {
    width: 50px;
    height: 50px;
}

.punjab-aqi-value-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.punjab-aqi-value {
    font-family: 'Roboto', sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: #1882ff;
    line-height: 1;
    margin-bottom: 4px;
}

.punjab-aqi-label {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    color: #1882ff;
    letter-spacing: 0.5px;
}

.punjab-aqi-status-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.punjab-aqi-status-text {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1882ff;
}

.punjab-pm-reading {
    background: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #1882ff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Weather Info Row */
.punjab-weather-info {
    padding: 12px 18px;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.punjab-weather-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.punjab-weather-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.punjab-weather-value {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    color: #31343d;
    white-space: nowrap;
}

/* Forecast Section */
.punjab-forecast-container {
    padding: 12px 18px 16px;
    display: flex;
    gap: 0;
}

.punjab-forecast-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    border-right: 1px solid #c6c6dc;
}

.punjab-forecast-day:last-child {
    border-right: none;
}

.punjab-forecast-day-name {
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #3c3c3c;
    text-align: center;
    margin: 0;
}

.punjab-forecast-aqi-badge {
    position: relative;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.punjab-forecast-aqi-badge.good {
    background: #eec732;
    border: 1px solid #eec732;
}

.punjab-forecast-aqi-badge.moderate {
    background: #1882ff;
    border: 1px solid #1882ff;
}

.punjab-forecast-aqi-badge.unhealthy {
    background: #b33fba;
    border: 1px solid #b33fba;
}

.punjab-forecast-aqi-icon {
    width: 18px;
    height: 18px;
}

.punjab-forecast-aqi-number {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.punjab-forecast-temps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.punjab-forecast-temp-high,
.punjab-forecast-temp-low {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    margin: 0;
}

.punjab-forecast-temp-high {
    color: #3c3c3c;
}

.punjab-forecast-temp-low {
    color: #7d90a8;
}

.punjab-forecast-weather-icon {
    width: 18px;
    height: 18px;
}

/* Map Buttons Container */
.punjab-map-buttons-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    z-index: 10;
    align-items: center;
}

/* Map View Button */
.punjab-map-view-button {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: none; /* Hidden on desktop as per user request */
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.punjab-map-view-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.punjab-map-view-button:active {
    transform: translateY(0);
}

.punjab-map-view-text {
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    color: #31343d;
}

.punjab-map-view-icon {
    width: 14px;
    height: 14px;
}

/* Fullscreen Button */
.punjab-map-fullscreen-button {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

/* GPS Button */
.punjab-map-gps-button {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.punjab-map-fullscreen-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.punjab-map-gps-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.punjab-map-fullscreen-button:active {
    transform: translateY(0);
}

.punjab-map-fullscreen-text {
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    color: #31343d;
}

.punjab-map-fullscreen-icon {
    width: 16px;
    height: 16px;
    color: #31343d;
}

/* Compass Component */
.punjab-map-compass {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2000;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Custom Zoom Controls Position */
.leaflet-control-zoom {
    position: absolute !important;
    top: 130px !important; /* 30px below compass (20px compass top + 80px compass height + 30px gap) */
    left: 20px !important;
    z-index: 2000 !important;
}

/* Responsive Zoom Controls */
@media (max-width: 768px) {
    .leaflet-control-zoom {
        top: 120px !important; /* Adjusted for tablet */
        left: 15px !important;
    }
}

@media (max-width: 480px) {
    .leaflet-control-zoom {
        top: 110px !important; /* Adjusted for mobile */
        left: 12px !important;
    }
}

.compass-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.compass-rose {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-needle {
    position: absolute;
    width: 2px;
    height: 20px;
    background: #dc3545;
    border-radius: 1px;
    transform-origin: bottom center;
    transition: transform 0.3s ease;
    z-index: 2;
}

.compass-needle::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -2px;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 6px solid #dc3545;
}

.compass-directions {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.compass-n,
.compass-e,
.compass-s,
.compass-w {
    position: absolute;
    font-family: 'Arial', sans-serif;
    font-size: 10px;
    font-weight: bold;
    color: #495057;
    line-height: 1;
}

.compass-n {
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
}

.compass-e {
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-s {
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
}

.compass-w {
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-direction-text {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Arial', sans-serif;
    font-size: 10px;
    font-weight: bold;
    color: #495057;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 20px;
    text-align: center;
}

/* Fullscreen mode styles */
.punjab-map-wrapper.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    background: transparent; /* No background color */
}

.punjab-map-wrapper.fullscreen #punjabContourMap {
    width: 100% !important;
    height: 100% !important;
}

/* Hide other elements when in fullscreen */
body.map-fullscreen {
    overflow: hidden;
}

body.map-fullscreen .punjab-contour-map-section-spacing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    background: #e8f4f8;
    padding: 0;
}

body.map-fullscreen .ah-container {
    width: 100%;
    height: 100%;
    padding: 0;
}

body.map-fullscreen .punjab-contour-map-section {
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

body.map-fullscreen .punjab-contour-map-container {
    width: 100%;
    height: 100%;
    padding: 0;
}

/* Wind Toggle Button - Inside Data Card */
.punjab-data-card-wind-toggle {
    margin: 16px 0;
    display: flex;
    justify-content: center;
}

.punjab-data-card .wind-toggle-button {
    background: #4ba9ff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    max-width: 200px;
}

.punjab-data-card .wind-toggle-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
    background: #3a98ee;
}

.punjab-data-card .wind-toggle-button:active {
    transform: translateY(0);
}

.punjab-data-card .wind-toggle-button.active {
    background: #31343d;
    color: white;
}

/* AQI Heatmap Toggle Button */
.aqi-heatmap-button {
    position: absolute;
    top: 20px;
    right: 260px;
    background: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    z-index: 10;
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    color: #31343d;
}

.aqi-heatmap-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.aqi-heatmap-button:active {
    transform: translateY(0);
}

.aqi-heatmap-button.active {
    background: #05DF72;
    color: white;
}

/* Custom Map Markers */
.punjab-aqi-marker {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

/* Wind Arrow Markers */
.wind-arrow {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1000;
}

.wind-arrow:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* User Location Marker */
.user-location-marker {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1500;
}

.user-location-marker:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.punjab-aqi-cluster {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: white;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.punjab-aqi-marker:hover .punjab-aqi-cluster {
    transform: scale(1.1);
}

/* AQI color classes */
.punjab-aqi-cluster.good {
    background: #00e400;
    border: 2px solid #00b800;
}

.punjab-aqi-cluster.moderate {
    background: #ffff00;
    border: 2px solid #cccc00;
    color: #333;
}

.punjab-aqi-cluster.usg {
    background: #ff7e00;
    border: 2px solid #cc6500;
}

.punjab-aqi-cluster.unhealthy {
    background: #ff0000;
    border: 2px solid #cc0000;
}

.punjab-aqi-cluster.very-unhealthy {
    background: #8f3f97;
    border: 2px solid #6f2f77;
}

.punjab-aqi-cluster.hazardous {
    background: #7e0023;
    border: 2px solid #5e0018;
}

/* Info Window */
.punjab-info-window {
    padding: 8px;
    max-width: 200px;
}

.punjab-info-title {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #414141;
    margin: 0 0 6px 0;
}

.punjab-info-aqi {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    color: #31343d;
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .punjab-map-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .punjab-map-title {
        font-size: 24px;
    }
    
    .punjab-contour-map-section {
        padding: 0;
    }
    
    .punjab-map-wrapper {
        height: 600px; /* Increased by 1.5x from 400px */
    }
    
    .punjab-data-card {
        width: 280px;
        top: 12px;
        left: 12px;
    }
    
    .punjab-map-buttons-container {
        top: 12px;
        right: 12px;
        flex-direction: column;
        gap: 6px;
    }
    
    .punjab-map-view-button {
        padding: 8px 14px;
        font-size: 11px;
    }
    
    .punjab-map-fullscreen-button {
        padding: 8px;
        width: 36px;
        height: 36px;
    }
    
    .punjab-map-gps-button {
        padding: 8px;
        width: 36px;
        height: 36px;
    }
    
    .map-toggle-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .aqi-heatmap-button {
        top: 12px;
        right: 240px;
        padding: 8px 14px;
    }
    
    .punjab-data-card-wind-toggle {
        margin: 12px 0;
    }
    
    .punjab-data-card .wind-toggle-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .punjab-forecast-container {
        padding: 10px 12px 14px;
    }
    
    .punjab-forecast-day {
        padding: 0 2px;
    }
    
    .punjab-forecast-aqi-badge {
        min-width: 52px;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .punjab-map-header {
        margin-bottom: 16px;
    }
    
    .punjab-map-title {
        font-size: 20px;
    }
    
    .punjab-map-wrapper {
        height: 525px; /* Increased by 1.5x from 350px */
    }
    
    .punjab-data-card {
        width: calc(100% - 24px);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        left: 12px;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .punjab-data-card-close {
        width: 32px;
        height: 32px;
        font-size: 24px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 100;
    }
    
    .punjab-weather-info {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .punjab-weather-item {
        flex: 0 0 calc(50% - 3px);
    }
    
    .punjab-forecast-day-name {
        font-size: 9px;
    }
    
    .punjab-forecast-aqi-badge {
        min-width: 48px;
        padding: 4px 6px;
    }
    
    .punjab-forecast-aqi-number {
        font-size: 9px;
    }
    
    .punjab-map-buttons-container {
        top: 8px;
        right: 8px;
        gap: 4px;
    }
    
    .punjab-map-view-button {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .punjab-map-fullscreen-button {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .map-toggle-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .punjab-map-fullscreen-text,
    .punjab-map-view-text {
        font-size: 10px;
    }
    
    .punjab-map-compass {
        top: 12px;
        left: 12px;
        width: 70px;
        height: 70px;
        padding: 6px;
        z-index: 2000;
    }
    
    /* Adjust zoom controls for mobile compass */
    .leaflet-control-zoom {
        top: 100px !important; /* Adjusted for mobile compass (12px + 70px + 18px gap) */
        left: 12px !important;
    }
    
    .compass-rose {
        width: 50px;
        height: 50px;
    }
    
    .compass-needle {
        height: 16px;
    }
    
    .compass-n,
    .compass-e,
    .compass-s,
    .compass-w {
        font-size: 9px;
    }
    
    .compass-direction-text {
        font-size: 9px;
        bottom: -18px;
    }
}

/* Loading State */
.punjab-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #31343d;
    z-index: 5;
}

/* Error State */
.punjab-map-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #ff0000;
    text-align: center;
    z-index: 5;
}

/* ===================================
   LEAFLET MAP CONTROLS & LEGEND
   =================================== */

/* Toggle Buttons */
.map-toggle-btn {
    background: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    white-space: nowrap;
}

.map-toggle-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.map-toggle-btn.hidden {
    display: none;
}

/* Layer Controls Panel */
.punjab-map-layer-controls {
    position: absolute;
    top: 80px; /* 20px below buttons container */
    right: 10px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-family: 'Montserrat', sans-serif;
    min-width: 200px;
    max-height: 200px; /* Limit height to prevent overlap */
    overflow-y: auto;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.punjab-map-layer-controls.hidden {
    display: none;
}

.punjab-map-layer-controls h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    transition: color 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close-btn:hover {
    color: #1f2937;
}

.layer-control-item {
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.layer-control-item label {
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.layer-control-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.layer-control-item input[type="range"] {
    width: 100%;
    margin-top: 5px;
    cursor: pointer;
}

.opacity-value {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
    text-align: center;
}

/* AQI Legend */
.punjab-map-aqi-legend {
    position: absolute;
    top: 300px; /* Position well below the controls with proper gap */
    right: 10px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-family: 'Montserrat', sans-serif;
    min-width: 220px;
    max-width: 280px;
    max-height: calc(100% - 320px);
    overflow-y: auto;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.punjab-map-aqi-legend.hidden {
    display: none;
}

/* Wind Speed Legend */
.punjab-map-windspeed-legend {
    position: absolute;
    top: 300px; /* Position well below the controls with proper gap */
    right: 10px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-family: 'Montserrat', sans-serif;
    min-width: 220px;
    max-width: 280px;
    max-height: calc(100% - 320px);
    overflow-y: auto;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.punjab-map-windspeed-legend.hidden {
    display: none;
}

.punjab-map-aqi-legend h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
}

.punjab-map-aqi-legend::-webkit-scrollbar {
    width: 6px;
}

.punjab-map-aqi-legend::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.punjab-map-aqi-legend::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.punjab-map-aqi-legend::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments for controls */
@media (max-width: 768px) {
    .punjab-map-layer-controls {
        top: 80px; /* 20px below buttons container */
        right: 10px;
        min-width: 180px;
        max-height: 180px; /* Smaller height for tablet */
        padding: 12px;
    }

    .punjab-map-layer-controls h3 {
        font-size: 13px;
    }

    .layer-control-item label {
        font-size: 12px;
    }

    .punjab-map-aqi-legend {
        top: 280px; /* Adjusted for tablet with proper gap below controls */
        right: 10px;
        min-width: 180px;
        max-width: 200px;
        padding: 10px;
        max-height: calc(100% - 300px);
    }

    .punjab-map-aqi-legend h4 {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .punjab-map-layer-controls {
        top: 80px; /* 20px below buttons container */
        left: 10px;
        right: auto;
        min-width: 160px;
        max-width: 180px;
        max-height: 160px; /* Smaller height for mobile */
        padding: 10px;
    }

    .punjab-map-layer-controls h3 {
        font-size: 12px;
    }

    .layer-control-item label {
        font-size: 11px;
    }

    .punjab-map-aqi-legend {
        top: 80px; /* On mobile, position below buttons since controls are on left */
        right: 10px;
        min-width: 160px;
        max-width: 180px;
        padding: 10px;
        max-height: calc(100% - 100px);
    }

    .punjab-map-aqi-legend h4 {
        font-size: 10px;
    }
}

/* ===================================
   GOOGLE MAPS STYLES (DEPRECATED - COMMENTED OUT)
   =================================== */
/* Old Google Maps styles moved to Leaflet implementation above */
/* Keeping this section for reference in case rollback is needed */
