/* === ReadFy Base Modal Styles (GLOBAL) - UPDATED === */
/* Contiene los estilos compartidos por todos los modales */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --color-primario: #5867dd;
    --color-secundario: #fff;
    --color-terciario: #79829c;
    --border-radius-main: 12px;
    --text-primary-browse: #2d3748;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(45, 55, 72, 0.7);
    backdrop-filter: blur(4px);
    padding: 1rem;
    align-items: center;
    justify-content: center;
    animation: fadeInModalBg .3s ease-out;
    box-sizing: border-box; /* <-- SOLUCIÓN DEFINITIVA */
}

@keyframes fadeInModalBg {
    from { background-color: rgba(0,0,0,0); }
    to { background-color: rgba(45, 55, 72, 0.7); }
}

@keyframes slideDownModal {
    from { transform: translateY(-30px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* === NUEVO ESTILO GLOBAL PARA BOTÓN DE CIERRE === */
.close-modal-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--color-terciario);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 0 transparent;
}

.close-modal-btn:hover {
    color: var(--color-primario);
    background-color: rgba(88, 103, 221, 0.08);
    transform: rotate(90deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.close-modal-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(88,103,221,0.25);
}

.swal2-container { 
    z-index: 3000 !important; 
}
