/* Login email OTP: configurable six-box input and resend countdown. */
.bdx-login-otp-boxes {
  --bdx-otp-count: 6;
  display: grid;
  grid-template-columns: repeat(var(--bdx-otp-count), minmax(0, 1fr));
  gap: clamp(5px, 1.5vw, 12px);
  width: 100%;
  max-width: 520px;
  margin: 2px auto 4px;
}

.bdx-login-otp-boxes .bdx-login-otp-digit {
  appearance: none;
  width: 100% !important;
  min-width: 0;
  height: clamp(52px, 12vw, 68px);
  margin: 0;
  padding: 0 !important;
  border: 1px solid rgba(125, 211, 252, .38) !important;
  border-radius: clamp(10px, 2.6vw, 16px) !important;
  background: rgba(2, 12, 28, .82) !important;
  color: #f8fdff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 22px rgba(0, 0, 0, .16);
  font: 800 clamp(22px, 6vw, 31px)/1 Inter, system-ui, sans-serif;
  text-align: center;
  caret-color: #22d3ee;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.bdx-login-otp-boxes .bdx-login-otp-digit:hover {
  border-color: rgba(103, 232, 249, .62) !important;
}

.bdx-login-otp-boxes .bdx-login-otp-digit:focus {
  outline: 0 !important;
  border-color: #22d3ee !important;
  background: rgba(5, 25, 48, .96) !important;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .17), 0 12px 28px rgba(2, 132, 199, .18) !important;
  transform: translateY(-1px);
}

.bdx-login-otp-boxes .bdx-login-otp-digit.is-filled {
  border-color: rgba(45, 212, 191, .72) !important;
}

.bdx-login-otp-boxes.is-complete .bdx-login-otp-digit {
  border-color: rgba(52, 211, 153, .76) !important;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, .12), 0 8px 22px rgba(0, 0, 0, .14);
}

.bdx-login-otp-boxes.is-invalid .bdx-login-otp-digit {
  border-color: #fb7185 !important;
  box-shadow: 0 0 0 2px rgba(251, 113, 133, .13) !important;
}

[data-login-otp-resend]:disabled {
  cursor: not-allowed !important;
  opacity: .62 !important;
  filter: saturate(.68);
}

.bdx-login-otp-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin: 12px 0 0;
  color: #a5dff3;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  letter-spacing: .01em;
}

.bdx-login-otp-countdown[data-countdown-state="waiting"]::before {
  content: "◷";
  margin-right: 7px;
  color: #22d3ee;
  font-size: 16px;
}

.bdx-login-otp-countdown[data-countdown-state="ready"] {
  color: #34d399;
}

.bdx-login-otp-countdown[data-countdown-state="ready"]::before {
  content: "✓";
  margin-right: 7px;
  font-weight: 900;
}

html[data-theme="light"] .bdx-login-otp-boxes .bdx-login-otp-digit,
html.light-mode .bdx-login-otp-boxes .bdx-login-otp-digit,
html.white-mode .bdx-login-otp-boxes .bdx-login-otp-digit {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 7px 20px rgba(15, 23, 42, .08);
  caret-color: #0369a1;
}

html[data-theme="light"] .bdx-login-otp-boxes .bdx-login-otp-digit:focus,
html.light-mode .bdx-login-otp-boxes .bdx-login-otp-digit:focus,
html.white-mode .bdx-login-otp-boxes .bdx-login-otp-digit:focus {
  border-color: #0284c7 !important;
  background: #f8fdff !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .14), 0 10px 24px rgba(15, 23, 42, .1) !important;
}

html[data-theme="light"] .bdx-login-otp-boxes .bdx-login-otp-digit.is-filled,
html.light-mode .bdx-login-otp-boxes .bdx-login-otp-digit.is-filled,
html.white-mode .bdx-login-otp-boxes .bdx-login-otp-digit.is-filled {
  border-color: #0d9488 !important;
}

html[data-theme="light"] [data-login-otp-resend],
html.light-mode [data-login-otp-resend],
html.white-mode [data-login-otp-resend] {
  color: #075985 !important;
  border-color: rgba(3, 105, 161, .3) !important;
}

html[data-theme="light"] .bdx-login-otp-countdown,
html.light-mode .bdx-login-otp-countdown,
html.white-mode .bdx-login-otp-countdown {
  color: #475569;
}

html[data-theme="light"] .bdx-login-otp-countdown[data-countdown-state="waiting"]::before,
html.light-mode .bdx-login-otp-countdown[data-countdown-state="waiting"]::before,
html.white-mode .bdx-login-otp-countdown[data-countdown-state="waiting"]::before {
  color: #0284c7;
}

html[data-theme="light"] .bdx-login-otp-countdown[data-countdown-state="ready"],
html.light-mode .bdx-login-otp-countdown[data-countdown-state="ready"],
html.white-mode .bdx-login-otp-countdown[data-countdown-state="ready"] {
  color: #047857;
}

@media (max-width: 390px) {
  .bdx-login-otp-boxes { gap: 5px; }
  .bdx-login-otp-boxes .bdx-login-otp-digit {
    height: 50px;
    border-radius: 10px !important;
    font-size: 22px;
  }
}
