/* otp-verification.css
   Reusable styles for the email-verification modal. Dark theme + gold accent
   (#C8A96B) to match the Conversantix brand and the verification email.
   Scoped under .cx-otp* so it cannot affect the existing contact-form UI. */

/* ── Overlay / backdrop ─────────────────────────────────────────────────── */
.cx-otp-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 9, 15, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.cx-otp-overlay.cx-otp-open {
  opacity: 1;
  visibility: visible;
}

/* Lock background scroll while the modal is open */
body.cx-otp-lock { overflow: hidden; }

/* ── Dialog ─────────────────────────────────────────────────────────────── */
.cx-otp-dialog {
  width: 100%;
  max-width: 440px;
  background: #15171c;
  color: #e7e7ea;
  border: 1px solid #2a2d35;
  border-top: 3px solid #C8A96B;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  padding: 34px 30px 28px;
  text-align: center;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  transform: translateY(14px) scale(.985);
  opacity: 0;
  transition: transform .3s cubic-bezier(.16,.84,.44,1), opacity .3s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.cx-otp-overlay.cx-otp-open .cx-otp-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .cx-otp-overlay, .cx-otp-dialog { transition: none; }
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.cx-otp-logo {
  height: 34px;
  width: auto;
  margin: 0 auto 14px;
  display: block;
}
.cx-otp-eyebrow {
  margin: 0 0 8px;
  color: #C8A96B;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.cx-otp-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .2px;
}
.cx-otp-msg {
  margin: 0 0 6px;
  color: #b6b8bf;
  font-size: .92rem;
  line-height: 1.6;
}
.cx-otp-email {
  margin: 0 0 22px;
  color: #C8A96B;
  font-size: .9rem;
  font-weight: 600;
  word-break: break-all;
}

/* ── Code inputs ────────────────────────────────────────────────────────── */
.cx-otp-inputs {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin: 0 0 16px;
}
.cx-otp-inputs input {
  width: 46px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  background: #0f1115;
  border: 1px solid #2f323b;
  border-radius: 10px;
  caret-color: #C8A96B;
  transition: border-color .18s ease, box-shadow .18s ease;
  -moz-appearance: textfield;
}
.cx-otp-inputs input::-webkit-outer-spin-button,
.cx-otp-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cx-otp-inputs input:focus {
  outline: none;
  border-color: #C8A96B;
  box-shadow: 0 0 0 3px rgba(200, 169, 107, .22);
}
.cx-otp-inputs.cx-otp-invalid input {
  border-color: #e2585f;
  animation: cxOtpShake .35s;
}
@keyframes cxOtpShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ── Status / error line ────────────────────────────────────────────────── */
.cx-otp-status {
  min-height: 20px;
  margin: 0 0 16px;
  font-size: .85rem;
  line-height: 1.5;
}
.cx-otp-status.cx-otp-err { color: #ef7479; }
.cx-otp-status.cx-otp-ok  { color: #5cc98a; }
.cx-otp-status.cx-otp-info { color: #9aa0ab; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.cx-otp-verify {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  background: #C8A96B;
  color: #0B1220;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s ease, opacity .2s ease;
}
.cx-otp-verify:hover:not(:disabled) { background: #d8bc83; }
.cx-otp-verify:disabled { opacity: .55; cursor: not-allowed; }

.cx-otp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.cx-otp-link {
  background: none;
  border: none;
  color: #C8A96B;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  font-family: inherit;
  transition: color .2s ease, opacity .2s ease;
}
.cx-otp-link:hover:not(:disabled) { color: #e0c692; text-decoration: underline; }
.cx-otp-link:disabled { color: #6b6e76; cursor: not-allowed; }
.cx-otp-cancel { color: #9aa0ab; }
.cx-otp-cancel:hover { color: #c9ccd3; }

.cx-otp-meta {
  margin: 16px 0 0;
  color: #6f7480;
  font-size: .78rem;
  letter-spacing: .2px;
}
.cx-otp-meta strong { color: #b6b8bf; font-weight: 600; }

/* spinner inside verify button */
.cx-otp-spin {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(11,18,32,.35);
  border-top-color: #0B1220;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 8px;
  animation: cxOtpRotate .7s linear infinite;
}
@keyframes cxOtpRotate { to { transform: rotate(360deg); } }

/* ── Responsive (tablet / mobile) ───────────────────────────────────────── */
@media (max-width: 480px) {
  .cx-otp-dialog { padding: 28px 18px 22px; border-radius: 16px; }
  .cx-otp-title { font-size: 1.25rem; }
  .cx-otp-inputs { gap: 6px; }
  .cx-otp-inputs input { width: 42px; height: 52px; font-size: 1.3rem; }
}
@media (max-width: 360px) {
  .cx-otp-inputs input { width: 38px; height: 48px; font-size: 1.2rem; }
}
