/* =============================================================================
   Login — Citadel.Host
   Adaptado del paquete de diseño "snake-eater / mirador" para integrarse con
   Login.cshtml (AuthController -> POST /auth/login).

   Los colores, la fuente y el reset base viven en theme.css (compartido con
   site.css). Este archivo se queda solo con lo que es específico del login.
============================================================================= */

@import url("/css/theme.css");

/* -----------------------------------------------------------------------------
   PÁGINA + CONTENEDOR DEL FORMULARIO
----------------------------------------------------------------------------- */
.lg-loginPage {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 3rem;
}

.lg-formContainer {
  width: 500px;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 2px 5px var(--shadow-min);
}

.lg-authForm {
  min-height: 360px;
  width: 100%;
  font-size: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 1rem;
}

.lg-logoContainer {
  display: flex;
  justify-content: center;
}

.lg-logoContainer img {
  height: 100px;
  width: 460px;
  max-width: 100%;
  object-fit: contain;
}

/* -----------------------------------------------------------------------------
   INPUTS
----------------------------------------------------------------------------- */
.lg-inputsContainers {
  display: flex;
  justify-content: space-around;
  flex-direction: column;
  font-weight: bold;
  padding: 0 2rem;
}

.lg-inputsContainers label {
  font-size: 2rem;
}

.lg-inputsContainers input {
  font-size: 2rem;
  border-radius: 0.35rem;
  margin-bottom: 1rem;
  padding: 1.2rem;
  border-width: 0;
  background-color: var(--company-color-1);
  box-shadow: rgba(138, 138, 241, 0.25) 0px 6px 60px -12px inset,
  var(--shadow-mid) 4px 4px 10px -4px inset;
}

.lg-inputsContainers input:hover,
.lg-inputsContainers input:focus {
  box-shadow: rgba(77, 77, 143, 0.25) 0px 6px 60px -12px inset,
  var(--shadow-mid) 4px 4px 10px -4px inset;
}

.lg-inputsContainers input:focus,
.lg-inputsContainers input:focus-visible {
  outline: 2px solid rgba(77, 77, 143, 0.25);
  outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   AVISO DE MAYÚSCULAS (CapsLock)
----------------------------------------------------------------------------- */
.lg-mayusActivated {
  padding: 0 2rem;
  color: red;
  display: flex;
  align-items: center;
}

.lg-mayusActivated img {
  width: 20px;
  height: 20px;
}

.lg-mayusActivated span {
  margin-left: 5px;
  padding-top: 2px;
  font-size: 1.6rem;
}

/* -----------------------------------------------------------------------------
   BOTÓN DE LOGIN
----------------------------------------------------------------------------- */
.lg-button {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  box-shadow: 2px 2px 5px 0px var(--shadow-soft);
  transition: 0.5s;

  padding: 1rem;
  margin: 2rem;
  width: calc(100% - 4rem);
  border-radius: 0.5rem;
  font-size: 2rem;

  background-color: var(--company-color-4);
}

.lg-button:hover {
  background-color: var(--company-color-4-dark);
  box-shadow: 0 6px 18px var(--shadow-soft);
  transform: translateY(-1px);
}

.lg-button:disabled,
.lg-button.lg-disabled {
  background-color: var(--disabled);
  color: #b0c4de;
  cursor: no-drop;
  transform: none;
  box-shadow: 2px 2px 5px 0px var(--shadow-soft);
}

/* -----------------------------------------------------------------------------
   FRANJA DE ERROR POR CÓDIGO (usuario/contraseña, red, inesperado)
----------------------------------------------------------------------------- */
.lg-errorMessageContainer {
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--danger-transparent);
  margin: 0 2rem;
  width: calc(100% - 4rem);
}

.lg-errorMessageContainer span {
  color: var(--danger);
  font-weight: bold;
  font-size: 1.3rem;
}

/* -----------------------------------------------------------------------------
   CAJA DE ERROR GENÉRICA
----------------------------------------------------------------------------- */
.lg-genericError {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 20px 0 0;
}

.lg-genericError .lg-genericError-box {
  background-color: #fce8db;
  padding: 10px;
  border-radius: 8px;
  max-width: 300px;
  display: flex;
  align-items: center;
  box-shadow: 4px 4px 5px 0px var(--shadow-bold);
}

.lg-genericError .lg-genericError-icon {
  color: var(--danger);
  padding-right: 6px;
  display: flex;
  align-items: center;
}

.lg-genericError .lg-genericError-icon svg {
  width: 3rem;
  height: 3rem;
}

.lg-genericError .lg-genericError-text {
  color: #71192f;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
}

/* -----------------------------------------------------------------------------
   VISTA "VERIFICANDO SESIÓN"
----------------------------------------------------------------------------- */
.lg-checklogin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 20px;
  padding: 2rem;
  width: 100dvw;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  background: #fff;
}

.lg-checklogin p {
  font-size: 2rem;
}

/* -----------------------------------------------------------------------------
   ANIMACIÓN DEL LOADER (rejilla 3x3 con efecto "ripple")
----------------------------------------------------------------------------- */
.lg-loader {
  display: flex;
  flex-wrap: wrap;
}

.lg-cell {
  margin: 1px;
  background-color: transparent;
  box-sizing: border-box;
  border-radius: 4px;
  animation: 1.1s lg-ripple ease infinite;
}

.lg-cell.d-1 { animation-delay: 100ms; }
.lg-cell.d-2 { animation-delay: 200ms; }
.lg-cell.d-3 { animation-delay: 300ms; }
.lg-cell.d-4 { animation-delay: 400ms; }

.lg-cell:nth-child(1) { --cell-color: var(--cell-color1); }
.lg-cell:nth-child(2) { --cell-color: var(--cell-color2); }
.lg-cell:nth-child(3) { --cell-color: var(--cell-color3); }
.lg-cell:nth-child(4) { --cell-color: var(--cell-color4); }
.lg-cell:nth-child(5) { --cell-color: var(--cell-color5); }
.lg-cell:nth-child(6) { --cell-color: var(--cell-color6); }
.lg-cell:nth-child(7) { --cell-color: var(--cell-color7); }
.lg-cell:nth-child(8) { --cell-color: var(--cell-color8); }
.lg-cell:nth-child(9) { --cell-color: var(--cell-color9); }

@keyframes lg-ripple {
  0%   { background-color: transparent; }
  30%  { background-color: var(--cell-color); }
  60%  { background-color: transparent; }
  100% { background-color: transparent; }
}

/* Utilidad para alternar vistas */
.lg-hidden {
  display: none !important;
}
