/* Map Container */
#map-container {
    position: relative;
    height: 100%;
    width: calc(100% - 300px);
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

#map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Map Legend */
#map-legend {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

#map-legend h4 {
    margin-bottom: 10px;
    color: #2d3748;
    font-size: 14px;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #4a5568;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
}

/* Mapbox Overrides */
.mapboxgl-popup-content {
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    max-width: 300px;
}

.mapboxgl-popup-content h4 {
    margin-bottom: 10px;
    color: #2d3748;
    font-weight: 600;
}

.mapboxgl-popup-content p {
    margin-bottom: 5px;
    color: #4a5568;
    font-size: 13px;
}

.mapboxgl-popup-close-button {
    font-size: 18px;
    color: #a0aec0;
}

.mapboxgl-popup-close-button:hover {
    color: #2d3748;
}

/* Map Info Panel */
.map-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 300px;
    font-size: 13px;
    z-index: 100;
}

.map-info h4 {
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
}

.map-info p {
    color: #4a5568;
    margin-bottom: 4px;
}

/* Map Loading */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5568;
}

.map-loading .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Responsive Map */
@media (max-width: 768px) {
    #map-container {
        width: 100%;
        height: 60vh;
    }
    
    #map-controls {
        top: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .control-group {
        margin-bottom: 0;
    }
    
    .control-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .map-info {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
}