/* ============================================
   ESTILOS ESPECÍFICOS PARA PÁGINA DE LOGIN
   Archivo independiente para evitar conflictos
   ============================================ */

/* Botón de login - Estilos completamente independientes - USAR ID PARA MÁXIMA ESPECIFICIDAD */
#login-button-final,
.login-submit-button,
#login-form .login-submit-button,
.auth-container .login-submit-button,
button.login-submit-button,
button#login-button-final {
  /* Dimensiones */
  width: 100% !important;
  min-height: 48px !important;
  padding: 14px 24px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  
  /* Fondo degradado azul - PRIMERO establecer el fondo */
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%) !important;
  background-color: #1E3A8A !important; /* Fallback sólido */
  background-image: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%) !important;
  
  /* Texto blanco - CRÍTICO: establecer ANTES de cualquier otro estilo */
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  
  /* Borde */
  border: none !important;
  border-radius: 8px !important;
  
  /* Tipografía - CRÍTICO */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  line-height: 1.5 !important;
  
  /* Alineación del texto */
  text-align: center !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  
  /* Layout - usar flex para centrar contenido */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  cursor: pointer !important;
  
  /* Visual */
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3) !important;
  
  /* Transiciones */
  transition: all 0.3s ease !important;
  
  /* Asegurar visibilidad del texto - CRÍTICO */
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  text-indent: 0 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  white-space: normal !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Contenido del botón - texto blanco - FORZAR en todos los elementos */
#login-button-final,
#login-button-final *,
.login-submit-button,
.login-submit-button *,
.login-submit-button::before,
.login-submit-button::after {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#login-button-final,
.login-submit-button {
  display: flex !important;
}

#login-button-final *,
.login-submit-button * {
  display: inline-block !important;
}

/* Estilos específicos para .auth-submit-text que busca el JavaScript */
#login-button-final .auth-submit-text,
.login-submit-button .auth-submit-text {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: inline-block !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
  line-height: inherit !important;
  text-align: center !important;
}

/* Eliminar pseudo-elementos que puedan ocultar texto */
#login-button-final::before,
#login-button-final::after,
.login-submit-button::before,
.login-submit-button::after {
  display: none !important;
  content: none !important;
}

/* Estado hover */
#login-button-final:hover:not(:disabled),
.login-submit-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #1E40AF 0%, #06B6D4 100%) !important;
  background-color: #1E40AF !important; /* Fallback */
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4) !important;
  transform: translateY(-2px) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

#login-button-final:hover:not(:disabled) *,
.login-submit-button:hover:not(:disabled) * {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* Estado active */
#login-button-final:active:not(:disabled),
.login-submit-button:active:not(:disabled) {
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%) !important;
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

#login-button-final:active:not(:disabled) *,
.login-submit-button:active:not(:disabled) * {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* Estado disabled */
#login-button-final:disabled,
.login-submit-button:disabled {
  background: linear-gradient(135deg, #6B7280 0%, #9CA3AF 100%) !important;
  background-color: #9CA3AF !important; /* Fallback */
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
}

#login-button-final:disabled *,
.login-submit-button:disabled * {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* Estado focus */
#login-button-final:focus,
.login-submit-button:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5) !important;
  outline-offset: 2px !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* Responsive para móvil */
@media (max-width: 640px) {
  #login-button-final,
  .login-submit-button {
    font-size: 16px !important;
    padding: 12px 20px !important;
    min-height: 48px !important;
  }
  
  #login-button-final .auth-submit-text,
  .login-submit-button .auth-submit-text {
    font-size: 16px !important;
  }
}
