/* ==========================================================================
   SMAC form extras: email / mobile verification, OTP modal, thank-you modal.
   (Base field styles live in style.css; the country picker injects its own styles.)
   ========================================================================== */

/* Input + Verify button row */
.sm-verify { display: flex; align-items: stretch; gap: var(--sm-s2); }
.sm-verify > input, .sm-verify > .smp { flex: 1 1 0; min-width: 0; }
.sm-verify__btn { flex: none; min-height: 48px; padding-inline: var(--sm-s4); }
.sm-verify__btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.sm-verify__status { font-size: var(--sm-fs-xs); color: var(--sm-muted); }
.sm-verify__status.is-ok { color: var(--sm-ok); font-weight: 600; }
.sm-field input.is-verified { border-color: #7cc9a3; background: #f6fdf9; }
.sm-submit-hint { margin: var(--sm-s3) 0 0; font-size: var(--sm-fs-xs); color: var(--sm-muted); }

/* Country picker fits the form's look */
.sm-field .smp { gap: var(--sm-s2); }
.sm-field .smp__btn { min-height: 48px; border-radius: var(--sm-r-sm); }

/* Modals */
.sm-modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: var(--sm-s4); background: rgba(6, 22, 51, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: smFade 0.2s var(--sm-ease); }
.sm-modal[hidden] { display: none; }
.sm-modal__box { position: relative; width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; padding: var(--sm-s7) var(--sm-s5) var(--sm-s6); border-radius: var(--sm-r-lg); background: #fff; box-shadow: var(--sm-sh-2); text-align: center; animation: smRise 0.28s var(--sm-ease); }
.sm-modal__box h2 { margin-bottom: var(--sm-s2); font-size: 1.5rem; }
.sm-modal__box p { color: var(--sm-muted); }
.sm-modal__close { position: absolute; right: var(--sm-s3); top: var(--sm-s3); display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--sm-r-sm); background: transparent; color: var(--sm-muted); cursor: pointer; }
.sm-modal__close:hover { background: var(--sm-soft); color: var(--sm-ink); }
.sm-modal__close svg { width: 20px; height: 20px; }
.sm-modal__icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto var(--sm-s4); border-radius: 50%; background: var(--sm-tint); color: var(--sm-royal); }
.sm-modal__icon svg { width: 30px; height: 30px; }
.sm-modal__icon--ok { background: #e3f6ec; color: var(--sm-ok); }

.sm-otp__target { display: inline-block; max-width: 100%; margin: 0 0 var(--sm-s5); padding: 6px 12px; border-radius: var(--sm-r-sm); background: var(--sm-soft); font: 600 var(--sm-fs-sm) var(--sm-font-head); color: var(--sm-ink); overflow-wrap: anywhere; }
.sm-otp__digits { display: flex; justify-content: center; gap: var(--sm-s2); margin-bottom: var(--sm-s3); }
.sm-otp__digit { width: 46px; height: 56px; padding: 0; border: 1.5px solid #cdd8ea; border-radius: var(--sm-r-sm); background: #fff; font: 700 1.5rem var(--sm-font-head); color: var(--sm-ink); text-align: center; transition: border-color var(--sm-t), box-shadow var(--sm-t); }
.sm-otp__digit:focus { outline: none; border-color: var(--sm-royal); box-shadow: 0 0 0 4px rgba(29, 95, 216, 0.14); }
.sm-otp__digit.is-ok { border-color: var(--sm-ok); background: #f1fbf6; color: var(--sm-ok); }
.sm-otp__digit.is-bad { border-color: var(--sm-err); animation: smShake 0.4s; }
.sm-otp__timer { margin-bottom: var(--sm-s3); font: 600 var(--sm-fs-sm) var(--sm-font-head); color: var(--sm-muted); font-variant-numeric: tabular-nums; }
.sm-otp__msg { display: none; margin-bottom: var(--sm-s3); padding: 10px 14px; border-radius: var(--sm-r-sm); font-size: var(--sm-fs-sm); }
.sm-otp__msg.is-visible { display: block; }
.sm-otp__msg.error { background: #fdecec; color: #8b1c21; }
.sm-otp__msg.success { background: #e9f8f0; color: #0b5a35; }
.sm-otp__actions { display: flex; gap: var(--sm-s3); }
.sm-otp__actions .sm-btn { flex: 1; }

@keyframes smFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes smRise { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes smShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

@media (max-width: 479px) {
  .sm-otp__digit { width: 40px; height: 50px; }
  .sm-verify__btn { padding-inline: var(--sm-s3); }
  .sm-otp__actions { flex-direction: column-reverse; }
}
