/* assets/css/styles_modal.css */
/* Diseñado por DigitaLucX — Módulo de Estilos para el Modal de Acceso Único */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 38, 25, 0.6); /* Tono oscuro basado en el verde de Malka */
    backdrop-filter: blur(5px); /* Desenfoque de fondo premium */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: all 0.25s ease;
}

/* Regla crítica para ocultar el modal */
.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--malka-blanco);
    padding: 40px 35px;
    border-radius: 24px;
    position: relative;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(12, 31, 18, 0.2);
    border: 1px solid #E6ECE8;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animación sutil de entrada para que no aparezca de golpe */
@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 22px;
    right: 22px;
    background: none;
    border: none;
    font-size: 24px;
    color: #8CA093;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.modal-close:hover {
    color: #DC2626;
    background-color: #F7FAF8;
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    color: var(--malka-oscuro);
    margin-bottom: 6px;
    font-weight: 400;
}

.modal-header p {
    font-size: 13px;
    color: #6B7C72;
    line-height: 1.4;
}

/* Estructura del Formulario interno */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--malka-oscuro);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group label .optional {
    text-transform: none;
    font-weight: 400;
    color: #8CA093;
    font-size: 11px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #D5E4DB;
    border-radius: 14px;
    font-size: 14px;
    color: var(--malka-oscuro);
    outline: none;
    background-color: #FAFCFA;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: var(--malka-verde);
    background-color: var(--malka-blanco);
    box-shadow: 0 0 0 3px rgba(95, 141, 110, 0.1);
}

/* Botón de envío */
.btn-submit-auth {
    width: 100%;
    background-color: var(--malka-verde);
    color: var(--malka-blanco);
    border: none;
    padding: 15px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-submit-auth:hover {
    background-color: var(--malka-verde-dark);
}

.btn-submit-auth:active {
    transform: scale(0.98);
}

.btn-submit-auth i {
    font-size: 13px;
    color: #C2DEC9; /* Color sutil dorado/claro para el rayo */
}

/* --- Selectores de Pestañas (Tabs) --- */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid #E6ECE8;
    margin-bottom: 25px;
    gap: 15px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: #8CA093;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: var(--malka-verde);
}

.tab-btn.active {
    color: var(--malka-verde);
}

/* Línea animada inferior para la pestaña activa */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--malka-verde);
}

/* Control de visibilidad de los formularios internos */
.auth-form-block {
    display: block;
}

.auth-form-block.hidden-form {
    display: none !important;
}