
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f6fa;
}

.main-container {
    display: flex;
    height: 100vh;
}

#map {
    flex: 1;
    min-width: 400px;
    height: 100vh;
    border-right: 3px solid #e1e1e1;
    box-shadow: 2px 0 10px #0001;
    z-index: 1;
}

.side-panel {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 0 0 10px #0001;
}

.search-container {
    padding: 1rem;
    background: linear-gradient(90deg, #00b4d8 0%, #48cae4 100%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 2px solid #e1e1e1;
}

#search {
    padding: 0.5rem;
    border-radius: 6px;
    border: none;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    flex: none;
}

.filter-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border-left: 4px solid #00b4d8;
}

.filter-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section h4::before {
    content: "📍";
    font-size: 1rem;
}

.filter-section:nth-child(4) h4::before {
    content: "🗺️";
}

.info-mensaje {
    padding: 0.5rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 4px;
    color: #856404;
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
}

.checkbox-container {
    max-height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #333;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.checkbox-item:hover {
    background-color: rgba(0, 180, 216, 0.1);
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

/* Estilos para el filtro de ciudades */
.city-filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.city-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.city-option:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #00b4d8;
}

.city-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.city-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #00b4d8;
}

.city-option:has(input[type="radio"]:checked) {
    background: rgba(0, 180, 216, 0.1);
    border-color: #00b4d8;
}

/* Estilos para el filtro de tipo de área */
.area-type-filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.area-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.area-type-option:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #00b4d8;
}

.area-type-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.area-type-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #00b4d8;
}

.area-type-option:has(input[type="radio"]:checked) {
    background: rgba(0, 180, 216, 0.1);
    border-color: #00b4d8;
}

.checkbox-item label {
    text-overflow: ellipsis;
}

.map-instructions {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    text-align: center;
    border-left: 3px solid #00b4d8;
}

.map-instructions small {
    color: #666;
    font-size: 0.75rem;
}

.sede-list {
    padding: 1rem;
    overflow-y: auto;
}

.sede-item {
    background: #f1f9ff;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 8px #00b4d81a;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    border-left: 5px solid #00b4d8;
    font-size: 1rem;
}

.sede-item.selected,
.sede-item:hover {
    background: #caf0f8;
    box-shadow: 0 4px 16px #00b4d83a;
    border-left: 5px solid #0077b6;
}

.sede-item .localidad, .sede-item .zona {
    font-weight: bold;
    color: #0077b6;
    margin-left: 0;
    display: block;
    margin-top: 0.5em;
    font-size: 0.85rem;
}

/* Indicador de carga */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-size: 1.2rem;
}

.loading-indicator.hidden {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #00b4d8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}