/* Estilos para el Mapa Coroplético ENUSC */

.mapa-enusc-container {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
}

.mapa-enusc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.mapa-enusc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.mapa-enusc-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.mapa-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mapa-control label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.mapa-select {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #1e293b;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.mapa-select:hover {
    border-color: #cbd5e1;
}

.mapa-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mapa-chile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 950px;
    width: 100%;
    position: relative;
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.mapa-chile-svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.mapa-chile-svg .region {
    transition: all 0.3s ease;
    cursor: pointer;
    stroke: #ffffff;
    stroke-width: 1.5px;
}

.mapa-chile-svg .region:hover {
    filter: brightness(0.9);
    stroke: #1e293b;
    stroke-width: 2.5px;
}

.mapa-tooltip {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
}

.mapa-description {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.02));
    border-left: 4px solid #2563eb;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

.mapa-description strong {
    color: #1e293b;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mapa-enusc-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mapa-enusc-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .mapa-control {
        flex-direction: column;
        align-items: flex-start;
    }

    .mapa-select {
        width: 100%;
    }

    .mapa-chile-container {
        min-height: 400px;
    }

    .mapa-chile-svg {
        width: 100%;
        height: auto;
    }
}

/* Loading state */
.mapa-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #64748b;
}

.mapa-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.mapa-loading-text {
    font-size: 0.95rem;
    font-weight: 500;
}
