/* ============================================
   LOGIN MODAL - ESTILOS EXCLUSIVOS
   Prefijo: .lm- (Login Modal)
   ============================================ */

/* Variables locales solo para este modal */
.lm-modal-content {
    --lm-primary: #007bff;
    --lm-primary-hover: #1e2a57;
    --lm-border: #ced4da;
    --lm-text-muted: #6c757d;
    --lm-google-blue: #4285F4;
    --lm-error-bg: #f8d7da;
    --lm-error-text: #721c24;
    --lm-error-border: #f5c6cb;
    
    border-radius: 8px !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.1) !important;
    font-family: 'Poppins', sans-serif !important;
    border: none !important;
}

/* Header del modal */
.lm-modal-header {
    border-bottom: none !important;
    padding: 1.5rem 1.5rem 0 !important;
    justify-content: center !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.lm-modal-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #212529 !important;
}

.lm-btn-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
    border: none !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    opacity: 0.5 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lm-btn-close:hover {
    opacity: 0.75 !important;
}

/* Body del modal */
.lm-auth-body {
    padding: 1.5rem 2.5rem 2rem !important;
}

/* Formulario */
.lm-login-form {
    margin: 0 !important;
    padding: 0 !important;
}

/* Mensajes de error */
.lm-error-box {
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    margin-bottom: 1rem !important;
    padding: 0.75rem 1rem !important;
    background-color: var(--lm-error-bg) !important;
    color: var(--lm-error-text) !important;
    border: 1px solid var(--lm-error-border) !important;
    display: none;
}

.lm-error-box.lm-show {
    display: block !important;
}

/* Botón Google */
.lm-btn-google {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--lm-google-blue) !important;
    color: #fff !important;
    padding: 0.75rem 1rem !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    margin-bottom: 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    transition: opacity 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
}

.lm-btn-google:hover {
    opacity: 0.9 !important;
    color: #fff !important;
    text-decoration: none !important;
}

.lm-google-logo {
    height: 20px !important;
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
}

/* Separador */
.lm-separator {
    text-align: center !important;
    font-size: 0.8rem !important;
    color: var(--lm-text-muted) !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
}

/* Inputs */
.lm-form-input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem !important;
    border: 1px solid var(--lm-border) !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    font-family: 'Poppins', sans-serif !important;
    box-sizing: border-box !important;
    background-color: #fff !important;
    color: #212529 !important;
    line-height: 1.5 !important;
}

.lm-form-input:focus {
    outline: none !important;
    border-color: var(--lm-primary) !important;
    background: #fff !important;
    box-shadow: 0 0 5px rgba(59,130,246,0.3) !important;
}

.lm-form-input::placeholder {
    color: var(--lm-text-muted) !important;
    opacity: 1 !important;
}

/* Contenedor de contraseña con toggle */
.lm-password-wrapper {
    position: relative !important;
    margin-bottom: 1rem !important;
}

.lm-password-wrapper .lm-form-input {
    margin-bottom: 0 !important;
    padding-right: 2.5rem !important;
}

/* Toggle de contraseña */
.lm-toggle-password {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    color: var(--lm-text-muted) !important;
    font-size: 1rem !important;
    user-select: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
}

.lm-toggle-password:hover {
    color: #495057 !important;
}

/* Botón primario (Ingresar) */
.lm-btn-primary {
    background-color: var(--lm-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    width: 100% !important;
    transition: background 0.3s ease !important;
    cursor: pointer !important;
    font-family: 'Poppins', sans-serif !important;
    text-align: center !important;
    display: inline-block !important;
    line-height: 1.5 !important;
}

.lm-btn-primary:hover {
    background-color: var(--lm-primary-hover) !important;
    color: #fff !important;
}

.lm-btn-primary:active {
    transform: translateY(1px) !important;
}

/* Links de autenticación */
.lm-auth-links {
    margin-top: 1rem !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    color: var(--lm-text-muted) !important;
}

.lm-auth-links p {
    margin: 0.5rem 0 !important;
    line-height: 1.5 !important;
}

.lm-auth-links a {
    color: var(--lm-primary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

.lm-auth-links a:hover {
    color: var(--lm-primary-hover) !important;
    text-decoration: underline !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 576px) {
    .lm-auth-body {
        padding: 1.25rem 1.5rem 1.5rem !important;
    }
    
    .lm-modal-header {
        padding: 1.25rem 1.25rem 0 !important;
    }
    
    .lm-modal-title {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 400px) {
    .lm-auth-body {
        padding: 1rem !important;
    }
    
    .lm-form-input,
    .lm-btn-primary,
    .lm-btn-google {
        padding: 0.65rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
}