/* ========================================
   Auth form — login / register / password reset / signup verify.
   Used inside .auth-form-side__content (see layouts/auth-layout.css).
   Token vars (--auth-*) are scoped to .auth-body.
   ======================================== */

/* Selector login/registro — reemplaza a las viejas .auth-tabs, que pasaban
   desapercibidas: users reportaron no saber si estaban ingresando o
   registrándose. Grande, con descripción, imposible de no ver. */
.auth-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--auth-form-bg-2);
  border: 1px solid var(--auth-line-strong);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
}
.auth-segment > a {
  text-align: center;
  padding: 11px 8px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--auth-muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}
.auth-segment > a > small {
  display: block;
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  margin-top: 2px;
  opacity: 0.75;
}
.auth-segment > a.-active {
  background: rgba(10, 219, 198, 0.14);
  color: var(--auth-green);
  box-shadow: inset 0 0 0 1px rgba(10, 219, 198, 0.4);
}
.auth-segment > a:not(.-active):hover { color: var(--auth-ink); }

.auth-title {
  font-family: var(--font-scoreboard);
  font-size: 42px;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--auth-ink);
  margin: 0;
}
.auth-title .accent { color: var(--auth-green); }

.auth-subtitle {
  color: var(--auth-ink-soft);
  font-size: 14px;
  margin: 8px 0 0;
  line-height: 1.5;
}
.auth-subtitle strong { color: var(--auth-ink); font-weight: 600; }

.auth-form { margin-top: 20px; }
.auth-form > .field { margin-bottom: 12px; }
.auth-form > .field > .label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--auth-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: 500;
}
.auth-form > .field .input {
  width: 100%;
  padding: 11px 14px;
  background: var(--auth-form-bg-2);
  border: 1px solid var(--auth-line-strong);
  border-radius: 10px;
  color: var(--auth-ink);
  font-family: var(--font);
  font-size: 15px;
  transition: all 0.2s;
  outline: none;
}
.auth-form > .field .input::placeholder { color: rgba(244, 235, 214, 0.3); }
.auth-form > .field select.input option {
  background-color: #0d1714;
  color: #f4ebd6;
}
.auth-form > .field .input:focus {
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px rgba(10, 219, 198, 0.12);
  background: rgba(10, 219, 198, 0.03);
}

/* Wrap del input de contraseña — relative para anclar el .password-eye
   y reservar padding-right en el input para que el texto no choque
   con el botón. */
.auth-form > .field > .password-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.auth-form > .field > .password-wrap > .input { padding-right: 44px; }

.auth-form > .field > .password-wrap > .password-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  transition: color 140ms, background 140ms;
}
.auth-form > .field > .password-wrap > .password-eye:hover {
  color: var(--auth-ink);
  background: rgba(255, 255, 255, 0.06);
}
.auth-form > .field > .password-wrap > .password-eye:focus-visible {
  outline: 2px solid var(--auth-green);
  outline-offset: 1px;
}
.auth-form > .field > .password-wrap > .password-eye > span { display: inline-flex; }
.auth-form > .field > .password-wrap > .password-eye > span[hidden] { display: none; }

.auth-form > .errors {
  background: rgba(255, 120, 102, 0.08);
  border: 1px solid rgba(255, 120, 102, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.auth-form > .errors > .message {
  color: var(--auth-coral);
  font-size: 13px;
  margin: 2px 0;
}

.auth-form > .lock-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  font-size: 12px;
  color: var(--auth-muted);
}
.auth-form > .lock-hint > svg { width: 12px; height: 12px; flex: 0 0 auto; }

.auth-btn {
  width: 100%;
  padding: 13px 18px;
  background: var(--auth-green);
  color: var(--auth-pitch-deep);
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px -8px var(--auth-green-glow);
}
.auth-btn:hover {
  background: #5ed68a;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px var(--auth-green-glow);
}
.auth-btn > svg.arrow { transition: transform 0.2s; }
.auth-btn:hover > svg.arrow { transform: translateX(3px); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  color: var(--auth-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-line-strong);
}

.oauth-button {
  width: 100%;
  padding: 11px 16px;
  background: transparent;
  border: 1px solid var(--auth-line-strong);
  border-radius: 10px;
  color: var(--auth-ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}
.oauth-button:hover {
  border-color: var(--auth-ink-soft);
  background: rgba(244, 235, 214, 0.03);
}
.oauth-button > svg { flex-shrink: 0; }

/* Variante prominente: Google arriba del form, como camino principal.
   Misma label en login y registro — el OAuth resuelve ambos. */
.oauth-button.-primary {
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  background: rgba(244, 235, 214, 0.06);
  border-color: rgba(244, 235, 214, 0.28);
}

/* Wrapper relativo para anclar el chip .last-used sobre el botón de Google
   o sobre el form de email, según el método que usó la última vez. */
.oauth-slot { position: relative; margin-top: 20px; }
/* El slot ya aporta el espaciado: el form no debe sumar el suyo. */
.oauth-slot > .auth-form { margin-top: 0; }
.oauth-slot > .oauth-hint {
  text-align: center;
  font-size: 12px;
  color: var(--auth-muted);
  margin-top: 8px;
  line-height: 1.4;
}
.oauth-slot > .last-used {
  position: absolute;
  top: -9px;
  right: 12px;
  z-index: 1;
  background: var(--auth-green);
  color: var(--auth-pitch-deep);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 12px -2px var(--auth-green-glow);
}

/* Consentimiento implícito del flujo Google (acompaña al botón). */
.auth-form__legal-disclaimer {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--auth-muted);
  text-align: center;
}
.auth-form__legal-disclaimer a {
  color: var(--auth-ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-footer-link {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--auth-muted);
}
.auth-footer-link a {
  color: var(--auth-green);
  text-decoration: none;
  font-weight: 500;
}
.auth-footer-link a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-form > .field > .birthdate-selects {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1.4fr;
  gap: 8px;
}
.auth-form > .field > .birthdate-selects select.input {
  padding-right: 10px;
}

@media (max-width: 900px) {
  .auth-title { font-size: 42px; }
  .auth-subtitle { font-size: 14px; }
}

/* ─────────── Team combobox (typeahead "Hincha de") ─────────── */
.team-combo { position: relative; }
.team-combo__box { position: relative; display: flex; align-items: center; }
.team-combo__input { width: 100%; padding-right: 38px; }
.team-combo__box .team-combo__badge:not([hidden]) ~ .team-combo__input { padding-left: 44px; }

.team-combo__badge {
  position: absolute;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 235, 214, 0.96);
  pointer-events: none;
  z-index: 2;
}
.team-combo__badge img { width: 100%; height: 100%; object-fit: contain; }
.team-combo__badge .-ph {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: #11201a;
}

.team-combo__clear {
  position: absolute;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.team-combo__clear:hover { color: var(--auth-ink); background: var(--auth-line); }

.team-combo__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 296px;
  overflow-y: auto;
  background: var(--auth-form-bg-2);
  border: 1px solid var(--auth-line-strong);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  scrollbar-width: thin;
  scrollbar-color: var(--auth-line-strong) transparent;
}
.team-combo__list::-webkit-scrollbar { width: 6px; }
.team-combo__list::-webkit-scrollbar-thumb { background: var(--auth-line-strong); border-radius: 999px; }

.team-combo__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}
.team-combo__opt.-active { background: rgba(10, 219, 198, 0.12); }
.team-combo__opt.-active .team-combo__name { color: var(--auth-green); }

.team-combo__logo {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(244, 235, 214, 0.96);
  padding: 3px;
}
.team-combo__logo.-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: #11201a;
}
.team-combo__name {
  flex: 1;
  min-width: 0;
  color: var(--auth-ink);
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-combo__short {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--auth-muted);
  border: 1px solid var(--auth-line-strong);
  border-radius: 5px;
  padding: 3px 6px;
}
.team-combo__empty {
  padding: 12px 10px;
  color: var(--auth-muted);
  font-size: 13.5px;
  text-align: center;
}

/* `display` de las clases del combo pisa al [hidden] del UA: re-ocultar. */
.team-combo__badge[hidden],
.team-combo__clear[hidden] { display: none; }

/* ─────────── Custom select (Día/Mes/Año, estilo Clavalo) ─────────── */
.cselect { position: relative; }
/* El <select> nativo queda invisible pero focuseable: required + submit OK. */
.cselect.-enhanced .cselect__native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.cselect__trigger {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.cselect__trigger.-placeholder .cselect__value { color: var(--auth-muted); }
.cselect__trigger[aria-expanded="true"] { border-color: var(--auth-green); }

.cselect__chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--auth-muted);
  border-bottom: 2px solid var(--auth-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s, border-color 0.18s;
  flex: 0 0 auto;
}
.cselect__trigger[aria-expanded="true"] .cselect__chev {
  border-color: var(--auth-green);
  transform: rotate(-135deg) translate(-2px, -2px);
}

.cselect__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 248px;
  overflow-y: auto;
  background: var(--auth-form-bg-2);
  border: 1px solid var(--auth-line-strong);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  scrollbar-width: thin;
  scrollbar-color: var(--auth-line-strong) transparent;
}
.cselect__menu::-webkit-scrollbar { width: 6px; }
.cselect__menu::-webkit-scrollbar-thumb { background: var(--auth-line-strong); border-radius: 999px; }

.cselect__opt {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--auth-ink);
  font-size: 14.5px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cselect__opt.-active { background: rgba(10, 219, 198, 0.12); }
.cselect__opt.-on { color: var(--auth-green); font-weight: 500; }
.cselect__opt.-on::after {
  content: "✓";
  float: right;
  margin-left: 8px;
  color: var(--auth-green);
}
