/* ========================================
   FIX: MODAL DE REGISTRO CON SCROLL
   Solución para poder ver todos los campos
   ======================================== */

/* Asegurar que el modal tenga scroll */
.modal-login {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Contenedor del modal con scroll */
.modal-login-content {
    max-height: 95vh !important;
    overflow-y: auto !important;
    margin: 20px auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Caja del login con scroll interno */
.login-modal-box {
    max-height: none !important;
    overflow: visible !important;
}

/* Formulario de registro con scroll */
#registroForm {
    max-height: none !important;
    overflow: visible !important;
}

/* Asegurar que todos los campos sean visibles */
.form-group-modal {
    margin-bottom: 20px !important;
}

/* Botón de envío siempre visible */
.login-btn-modal {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

/* Opciones de login al final */
.login-options-modal {
    margin-top: 15px !important;
    margin-bottom: 20px !important;
}

/* CORRECCIÓN ESPECÍFICA PARA MÓVILES */
@media (max-width: 768px) {
    .modal-login-content {
        max-height: 90vh !important;
        overflow-y: auto !important;
        margin: 10px !important;
        padding: 15px !important;
    }
    
    .login-modal-box {
        padding: 20px 15px !important;
    }
    
    /* Hacer el formulario más compacto en móviles */
    .form-group-modal {
        margin-bottom: 15px !important;
    }
    
    .form-group-modal label {
        font-size: 0.9rem !important;
        margin-bottom: 5px !important;
    }
    
    .input-group-modal input,
    .input-group-modal select {
        font-size: 0.95rem !important;
        padding: 10px 12px 10px 40px !important;
    }
    
    /* Botón más compacto */
    .login-btn-modal {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }
    
    /* Logo más pequeño en móviles */
    .logo-modal {
        max-width: 120px !important;
        margin-bottom: 15px !important;
    }
    
    /* Título más compacto */
    #registroForm h2 {
        font-size: 1.3rem !important;
        margin-bottom: 20px !important;
    }
}

/* CORRECCIÓN PARA PANTALLAS MUY PEQUEÑAS */
@media (max-height: 700px) {
    .modal-login-content {
        max-height: 95vh !important;
        margin: 5px auto !important;
    }
    
    .logo-section-modal {
        padding: 10px 0 !important;
    }
    
    .logo-modal {
        max-width: 100px !important;
    }
    
    .form-group-modal {
        margin-bottom: 12px !important;
    }
    
    #registroForm h2 {
        font-size: 1.2rem !important;
        margin-bottom: 15px !important;
    }
}

/* Asegurar que el scroll sea suave */
.modal-login-content::-webkit-scrollbar {
    width: 8px;
}

.modal-login-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-login-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7B4397 0%, #1E9A8A 100%);
    border-radius: 10px;
}

.modal-login-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6a3585 0%, #178a7a 100%);
}

/* Indicador visual de que hay más contenido abajo */
.login-modal-box::after {
    content: '';
    display: block;
    height: 20px;
}

/* Asegurar que el botón de cerrar (X) siempre sea visible */
.close-login {
    position: sticky !important;
    top: 10px !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}
