/*
 * otp-code.css — the one-time-code field (public/src/otp-code.js).
 *
 * Six painted boxes over ONE real input. Linked by login.html, index.html and
 * oauth-consent.html, so the field looks and behaves the same everywhere a
 * code is entered. A plain stylesheet on purpose: the consent page's CSP
 * (style-src 'self') refuses inline styles. Every value is a token each page
 * already defines, with a fallback for the one page that lacks it.
 */
.f1-otp-wrap { display: block; }
.f1-otp-lbl { display: block; font-weight: 500; font-size: 13px; margin: 0 0 8px; color: var(--text-1); }
.f1-otp { position: relative; display: inline-block; max-width: 100%; }
.f1-otp-boxes { display: flex; gap: 8px; pointer-events: none; }
.f1-otp-bx {
  width: 44px; height: 50px; flex: 0 1 44px; min-width: 0;
  border: 1px solid var(--border-str); border-radius: 8px;
  background: var(--surface); color: var(--text-1);
  display: grid; place-items: center;
  font: 600 20px var(--font-mono);
}
.f1-otp-bx.is-cur { border-color: var(--text-1); box-shadow: 0 0 0 3px var(--accent-dim); }
/* The real field covers the boxes and takes every click, tap and autofill. */
.f1-otp-in {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; margin: 0;
  font-size: 16px; /* at least 16px, or iOS zooms the page on focus */
  cursor: text; caret-color: transparent; background: transparent; color: transparent;
}
.f1-otp-in:focus, .f1-otp-in:focus-visible { outline: none; }
.f1-otp.is-verifying .f1-otp-bx { opacity: 0.55; }
.f1-otp.is-ok .f1-otp-bx { border-color: var(--success); }
.f1-otp.is-wrong .f1-otp-bx { border-color: var(--danger); }
.f1-otp.is-shake .f1-otp-boxes { animation: f1-otp-shake 0.32s var(--ease-funnel-out, ease-out); }
@keyframes f1-otp-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .f1-otp.is-shake .f1-otp-boxes { animation: none; }
}
.f1-otp-st { min-height: 18px; margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.f1-otp-st.is-bad { color: var(--danger-text, var(--danger)); }
.f1-otp-st.is-ok { color: var(--success-text, var(--success)); }
.f1-otp-spin {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 2px solid var(--border-str); border-top-color: var(--text-1);
  animation: f1-otp-spin 0.7s linear infinite;
}
@keyframes f1-otp-spin { to { transform: rotate(360deg); } }
@media (max-width: 400px) {
  .f1-otp-boxes { gap: 6px; }
}
