/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2500;
    display: none;
    /* Cambiado de opacity/pointer-events a display:none */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Cuando está activo, se muestra y luego la animaci×n de opacidad ocurre (v×a script o CSS) */
.modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    color: var(--premium-text);
    /* Ensure text color is set */
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--premium-border);
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--premium-primary);
    margin: 0;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--premium-text);
}

.modal-body h3 {
    font-size: 1rem;
    color: var(--premium-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--premium-border);
    text-align: right;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--premium-text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: var(--premium-gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* ========== MODAL DE CARGAR MAPAS - ESTILOS MOVIDOS A modal-premium.css ========== */
/* Ver archivo css/modal-premium.css para estilos del modal */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}