/* Sign-in account screens on Views/Shared/_Logins.cshtml that set ViewData["AuthAssets"]. Login itself does not load this. */

/* Numbered setup steps (EnableAuthenticator) */
.auth-steps {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  counter-reset: auth-step;
}

.auth-steps > li {
  position: relative;
  margin-bottom: 20px;
  padding-left: 40px;
  counter-increment: auth-step;
}

.auth-steps > li::before {
  content: counter(auth-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
}

.auth-step-title { font-weight: 700; }
.auth-step-hint { font-size: .875rem; color: var(--bs-secondary-color); }

.auth-qr {
  display: inline-block;
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
}

.auth-qr img {
  display: block;
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}

.auth-disclosure summary {
  margin-top: 10px;
  font-size: .875rem;
  color: var(--bs-link-color);
  cursor: pointer;
}

.auth-key {
  padding: 8px 10px;
  background: #f4f6f8;
  border-radius: 8px;
  color: var(--bs-body-color);
  font-size: 1rem;
  letter-spacing: .05em;
  word-break: break-all;
}

/* Six-box code entry: one real input (.otp-input) laid over boxes that auth.js draws.
   Until auth.js adds .otp-ready (or without JS) the input shows as a plain large field. */
.otp {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 8px;
  width: max-content;
  margin: 0 auto 8px;
}

.otp-box {
  width: 48px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  font-family: var(--bs-font-monospace);
  font-size: 1.5rem;
  transition: border-color .15s, box-shadow .15s;
}

.otp-box.is-active {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(14, 14, 16, .15);
}

.otp.otp-ready .otp-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
  caret-color: transparent;
}

.otp:not(.otp-ready) .otp-input {
  width: 12ch;
  padding: 8px;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  text-align: center;
  font-family: var(--bs-font-monospace);
  font-size: 1.5rem;
  letter-spacing: .3em;
}

/* Recovery codes (ShowRecoveryCodes) */
.auth-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  background: #f4f6f8;
  border-radius: 12px;
  text-align: center;
  font-family: var(--bs-font-monospace);
  font-size: 1rem;
}

.auth-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-actions .btn { flex: 1; }

@media (max-width: 479.98px) {
  .otp { gap: 6px; }
  .otp-box { width: 38px; height: 48px; font-size: 1.25rem; }
  .auth-actions { flex-direction: column; }
}

@media print {
  body * { visibility: hidden; }
  .auth-print, .auth-print * { visibility: visible; }
  .auth-print { position: absolute; top: 0; left: 0; width: 100%; }
}
