﻿:root {
    --primary: #6366f1;
    --bg-blur: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.2);
}

/* El fondo (Overlay) */
.modal-overlay {
    position: fixed;
    inset: 0; /* Atajo para top, left, right, bottom: 0 */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

    /* Estado activo */
    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* La tarjeta del modal */
.modal-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    padding: 32px 24px 24px 24px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center; /* Centra verticalmente */
    justify-content: flex-start; /* Alinea todo al inicio (izquierda) */
    gap: 12px; /* Espacio opcional entre el botón y el texto */
    margin-bottom: 16px;
}


/* Botones y detalles */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

    .btn-primary:active {
        transform: scale(0.95);
    }

.close-icon {
    position: absolute;
    top: 16px; /* Distancia desde el borde superior */
    right: 16px; /* Distancia desde el borde derecho */
    /* Estilo visual moderno */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

    .close-icon:hover {
        background: #e2e8f0;
        color: #0f172a;
        transform: rotate(90deg);
    }

/* Contenedor para centrar */
.modal-footer {
    display: flex;
    justify-content: center; /* Centrado horizontal */
    margin-top: 24px; /* Espacio respecto al texto superior */
}


.btn-secondary {
    background: #6366f1; 
    color: white;
    padding: 12px 40px; 
    border: none;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    /* Sombra suave */
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
    /* Transiciones suaves */
    transition: all 0.2s ease;
}

    /* Efectos de interacción */
    .btn-secondary:hover {
        background: #4f46e5;
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
        transform: translateY(-2px); /* Pequeño salto hacia arriba */
    }

    .btn-secondary:active {
        transform: translateY(0); /* Vuelve a su sitio al presionar */
        filter: brightness(0.9);
    }