/* Map specific styles */
.map-container {
    position: relative;
    /* Remove the temporary border once map is working */
    /* border: 2px dashed #3498db; */
}

#map {
    background: #f8f9fa;
    position: relative;
}

/* Remove the loading message - map is working now */
/*
.map-container::before {
    content: "Loading map...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
    font-weight: 500;
    color: #666;
}

.map-container.map-ready::before {
    display: none;
}
*/

/* Custom Leaflet overrides */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.leaflet-popup-tip {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mountain cluster markers */
.mountain-cluster-marker {
    transition: transform 0.2s ease;
}

.mountain-cluster-marker:hover {
    transform: scale(1.1);
    z-index: 1000;
}

/* Custom popup styles */
.popup-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.cluster-popup .popup-header {
    color: #3498db;
    border-bottom-color: #3498db;
}

.popup-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.popup-stat {
    text-align: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.popup-stat-number {
    font-weight: bold;
    font-size: 1.2rem;
    color: #e74c3c;
    display: block;
}

.popup-stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.2rem;
}

.popup-footer {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* Map controls */
.leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.leaflet-control-zoom a {
    background: white;
    color: #495057;
    border: none;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.2s;
}

.leaflet-control-zoom a:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    font-size: 0.75rem;
    border-radius: 4px;
    margin: 0.5rem;
}

/* Loading state for map */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
}

.map-loading.hidden {
    display: none;
}

/* Mobile map adjustments */
@media (max-width: 768px) {
    .leaflet-popup-content {
        margin: 0.75rem;
        font-size: 0.8rem;
    }
    
    .popup-header {
        font-size: 1rem;
    }
    
    .popup-stats {
        gap: 0.375rem;
    }
    
    .popup-stat {
        padding: 0.375rem;
    }
    
    .popup-stat-number {
        font-size: 1rem;
    }
    
    .leaflet-control-zoom a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 16px;
    }
}