/* MFA OTP — visual 6 slots over one real input (see js/otp-field.js). */
/* Keep opacity:1 so iOS Safari shows the long-press Paste menu. */

.otp {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.35rem 0 0.75rem;
}

.otp-slots {
  display: flex;
  gap: 0.4rem;
  pointer-events: none;
}

.otp-slots [data-otp-slot] {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.75rem;
  border: 1px solid var(--line, #d4cfc4);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink, #24201b);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.otp:focus-within .otp-slots [data-otp-slot] {
  border-color: var(--ink, #24201b);
}

.otp-slots [data-otp-slot].is-caret {
  box-shadow: inset 0 0 0 1px var(--ink, #24201b);
}

.otp-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 8px;
  opacity: 1;
  color: transparent;
  caret-color: transparent;
  -webkit-text-fill-color: transparent;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1.25rem;
  letter-spacing: 0;
  cursor: text;
}

.otp-input::selection {
  background: transparent;
  color: transparent;
}

.otp-input:-webkit-autofill,
.otp-input:-webkit-autofill:hover,
.otp-input:-webkit-autofill:focus {
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  /* Push autofill yellow far into the future so slots stay the visible paint. */
  transition: background-color 99999s ease-out;
}

.otp-input:focus {
  outline: none;
}

/* Lost-authenticator help (challenge panel) */
.mfa-lost {
  margin-top: 0.85rem;
}
.mfa-lost > summary {
  cursor: pointer;
  color: var(--accent, #3d6b5c);
  font-size: var(--fs-sm, 0.875rem);
  text-decoration: underline;
  list-style: none;
}
.mfa-lost > summary::-webkit-details-marker {
  display: none;
}
.mfa-lost[open] > summary {
  margin-bottom: 0.35rem;
}
.mfa-lost > :not(summary) {
  margin: 0;
}
