/**
 * Map Container Styles
 * Main map wrapper and Leaflet customizations
 */

.main-content {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    padding-bottom: 3rem;
}

.map-wrapper {
    position: relative;
    height: calc(100vh - 200px);
    min-height: 500px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    background: var(--white);
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    animation: fadeIn 0.6s ease-out;
}

.map-wrapper:hover {
    box-shadow: 0 25px 70px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

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

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--dark-color);
    font-weight: 500;
    font-size: 1rem;
}

/* Leaflet Customizations */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
}

.custom-popup .leaflet-popup-content-wrapper {
    background: var(--white);
}

.leaflet-popup-tip {
    display: none;
}

.leaflet-control-layers {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: none;
    max-height: 450px;
    overflow-y: auto;
    background: var(--white);
}

.leaflet-control-layers-toggle {
    width: 44px;
    height: 44px;
    background-size: 60%;
}

.leaflet-control-zoom {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 20px;
    border: none;
    transition: var(--transition);
}

.leaflet-control-zoom a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.leaflet-control-scale {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: none;
}

.custom-marker {
    background: transparent;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        margin: 1rem auto;
        padding: 0 0.75rem;
        padding-bottom: 0;
    }
    
    .map-wrapper {
        height: calc(100vh - 220px);
        border-radius: var(--radius-lg);
        min-height: 400px;
        border-width: 2px;
    }
    
    .map-wrapper:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0 0.5rem;
        margin: 0.75rem auto;
    }

    .map-wrapper {
        border-radius: var(--radius-md);
        height: calc(100vh - 240px);
        min-height: 350px;
    }
}
