/* ============================================================
   THE SPECTRUM — OTP verification UI
   ------------------------------------------------------------
   Written against the page's own design tokens (--paper, --ink,
   --paper-3, --r-sm, --ease) and DM Sans via font:inherit, so the
   OTP step reads as part of the form rather than bolted on.
   Nothing in the theme's own stylesheet is touched or overridden:
   every selector here is a class the lead handler injects.
   ============================================================ */

/* ── shared ─────────────────────────────────────────────────── */
.sc-otp {
  display: none;
  margin-top: 12px;
}
.sc-otp.is-open { display: block; }

.sc-otp-msg {
  margin: 0 0 8px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.sc-otp-msg b { color: var(--ink); font-weight: 700; }

.sc-otp-row { display: block; }

.sc-otp-row .sc-otp-input {
  width: 100%;
  padding: .78em .9em;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--paper-3);
  border-radius: var(--r-sm);
  letter-spacing: .34em;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}
.sc-otp-row .sc-otp-input::placeholder {
  color: var(--ink-faint);
  letter-spacing: normal;
  font-weight: 400;
}
.sc-otp-row .sc-otp-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .12);
}

/* ── resend ─────────────────────────────────────────────────── */
.sc-otp-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}
.sc-otp-foot button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: #b8882a;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sc-otp-foot button:disabled {
  color: #888;
  cursor: default;
  text-decoration: none;
}

/* ── status + errors ────────────────────────────────────────── */
/* The kinglife LP's validation colours. Ink type reads as ordinary copy here,
   so the state is carried by hue as well as by the mark beside it; all of these
   clear 4.5:1 on this paper, which is pure white. */
.sc-otp-status {
  margin: 7px 0 0;
  font-size: .82rem;
  line-height: 1.45;
  color: #2e7d32;
}
.sc-otp-status:empty { display: none; }
.sc-otp-status.is-err { color: #c62828; font-weight: 600; }

.sc-err {
  display: none;
  font-size: .82rem;
  color: #c0392b;
  margin-top: 6px;
  font-weight: 600;
  line-height: 1.45;
}
.sc-err.show { display: block; }
.sc-err::before {
  content: '!';
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #EF3734;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  margin-right: .45em;
  vertical-align: -2px;
}

/* ── verified / sending notes ───────────────────────────────── */
.sc-otp-verified {
  margin: 7px 0 0;
  font-size: .82rem;
  font-weight: 600;
  color: #2e7d32;
  line-height: 1.45;
}
.sc-otp-note {
  margin: 7px 0 0;
  font-size: .78rem;
  color: #666;
}

/* ── locked phone field + pencil ────────────────────────────── */
input[name="phone"].sc-otp-locked {
  background: var(--paper-2);
  color: var(--ink-soft);
  padding-right: 2.4em;
}
.sc-otp-edit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .2s, background .2s;
}
.sc-otp-edit:hover { color: var(--ink); background: var(--paper-2); }
.sc-otp-edit:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* the pencil is positioned against the field wrapper */
.lead-field,
.sc-cell { position: relative; }

/* intl-tel-input: keep the dial code in the page's type, not the widget's */
.iti__selected-dial-code { font: inherit; font-size: .98rem; color: var(--ink-soft); }

/* ── sticky bar variant ─────────────────────────────────────── */
/* The OTP takes the Submit cell's place in the row, so the bar never
   changes height and the other fields stay put. */
.sc-stickybar .sc-otp { margin-top: 0; }
.sc-stickybar .sc-otp.sc-otp-compact { display: none; }
.sc-stickybar .sc-otp.sc-otp-compact.is-open { display: block; }

.sc-stickybar .sc-otp-compact .sc-otp-msg { display: none; }
.sc-stickybar .sc-otp-compact .sc-otp-row .sc-otp-input {
  padding: .62em .7em;
  font-size: .92rem;
  letter-spacing: .26em;
  text-align: center;
}
.sc-stickybar .sc-otp-compact .sc-otp-row .sc-otp-input::placeholder {
  letter-spacing: normal;
  text-align: left;
}
.sc-stickybar .sc-otp-compact .sc-otp-foot { margin-top: 4px; justify-content: center; }
.sc-stickybar .sc-otp-compact .sc-otp-foot button { font-size: .72rem; }
/* The notice shows here too now. Centred under the input to line up with Resend,
   and tightened so the two lines it wraps to in this narrow cell lift the bar no
   more than the error line in the same cell already does. */
.sc-stickybar .sc-otp-compact .sc-otp-status {
  font-size: .72rem;
  line-height: 1.35;
  margin-top: 4px;
  text-align: center;
}
.sc-stickybar .sc-otp-compact .sc-otp-status:empty { display: none; }
.sc-stickybar .sc-otp-compact .sc-err { font-size: .74rem; margin-top: 4px; }
.sc-stickybar .sc-cell .sc-otp-verified { font-size: .74rem; margin-top: 4px; }
.sc-stickybar .sc-cell .sc-otp-note { font-size: .72rem; margin-top: 4px; }

@media (max-width: 900px) {
  .sc-stickybar .sc-otp-compact .sc-otp-row .sc-otp-input { text-align: left; letter-spacing: .2em; }
  /* tab widths: the cell is narrower still, so step the notice down a touch */
  .sc-stickybar .sc-otp-compact .sc-otp-status { font-size: .68rem; line-height: 1.3; }
}
