/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: #f0f2f5;
}

/* Map Container */
#map {
    height: 100%;
    width: 100%;
    z-index: 1; /* Leaflet map should be below UI elements */
}

/* Glassmorphism UI Panel */
.glass-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    
    padding: 24px;
    width: 340px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Header */
.legend-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 16px;
}

.legend-header h2 {
    font-size: 1.25rem;
    color: #1a1a2e;
    font-weight: 600;
    margin-bottom: 4px;
}

.legend-header p {
    font-size: 0.85rem;
    color: #64748b;
}

/* Legend Items */
#legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.legend-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Footer */
.legend-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

#hospital-count {
    color: #0f172a;
    font-weight: 600;
}

/* Custom Popup Styles */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    font-family: 'Inter', sans-serif !important;
}

.popup-container {
    padding: 16px;
}

.popup-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.popup-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 100px;
}

.popup-detail {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .glass-panel {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 40vh;
        overflow-y: auto;
    }
}
