/* Pre-Flutter HTML onboard form — matches Flutter's AppColors / AppTypography
   exactly so the transition is visually seamless. */

#sc-onboard {
  position: fixed; inset: 0; z-index: 10000;
  font-family: 'Poppins', -apple-system, sans-serif;
  transition: opacity 0.4s ease;
}
#sc-onboard.hide { opacity: 0; pointer-events: none; }

/* ── Backdrop ──────────────────────────────────────────────────────────── */
.ob-backdrop { position: absolute; inset: 0; overflow: hidden; }
.ob-bg-desktop, .ob-bg-mobile {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.ob-bg-mobile { display: none; }
.ob-blur {
  position: absolute; inset: 0;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.5);
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.ob-container {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 100%; padding: 24px;
}
.ob-card {
  width: 100%; max-width: 460px;
  background: #fff; border-radius: 22px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.3);
  padding-top: 24px;
  animation: ob-in 0.35s ease;
}
@keyframes ob-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.ob-handle { display: none; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.ob-hero { display: flex; align-items: center; gap: 14px; padding: 0 24px 20px; }
.ob-icon-ring {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: rgba(37,99,235,0.12);
  display: flex; align-items: center; justify-content: center;
}
.ob-icon-ring svg { width: 26px; height: 26px; fill: #2563EB; }
.ob-hero h2 {
  font-family: 'Sora', sans-serif; font-weight: 600; font-size: 22px;
  line-height: 1.3; color: #0F172A; margin: 0;
}
.ob-hero p { font-size: 14px; line-height: 1.5; color: #475569; margin: 2px 0 0; }
.ob-line { height: 1px; background: #E2E8F0; }
.ob-body { padding: 18px 24px 20px; }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.ob-group { margin-bottom: 16px; }
.ob-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: #0F172A; margin-bottom: 6px;
}
.ob-req { color: #DC2626; }
.ob-input {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #CBD5E1; border-radius: 16px;
  padding: 0 14px; height: 48px; transition: border-color 0.2s;
}
.ob-input:focus-within { border-color: #2563EB; }
.ob-input svg { width: 20px; height: 20px; fill: #94A3B8; flex-shrink: 0; }
.ob-input input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Poppins', sans-serif; font-size: 14px; color: #0F172A;
}
.ob-input input::placeholder { color: #94A3B8; }
.ob-note { font-size: 11px; color: #94A3B8; margin: 4px 0 0; }
.ob-subtitle { font-size: 14px; color: #475569; margin: 0 0 16px; }
.ob-prefix {
  font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 500;
  color: #475569; white-space: nowrap;
  padding-right: 10px; border-right: 1px solid #CBD5E1;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.ob-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px;
  background: #2563EB; color: #fff; border: none; border-radius: 16px;
  font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background 0.2s;
  position: relative;
}
.ob-btn:hover:not(:disabled):not(.is-loading) { background: #1D4ED8; }
.ob-btn:disabled { background: #E2E8F0; color: #94A3B8; cursor: not-allowed; }
.ob-btn svg { width: 18px; height: 18px; fill: currentColor; }
.ob-btn.is-loading { color: transparent; pointer-events: none; }
.ob-btn.is-loading svg { visibility: hidden; }
.ob-btn.is-loading::after {
  content: ''; position: absolute;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: ob-spin 0.7s linear infinite;
}
.ob-btn.is-success { background: #16A34A; pointer-events: none; }

.ob-actions { display: flex; align-items: center; gap: 12px; }
.ob-btn-back {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: #475569;
  font-family: 'Poppins', sans-serif; font-size: 14px;
  cursor: pointer; padding: 8px 4px;
}
.ob-btn-back:hover { color: #0F172A; }
.ob-btn-back svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Error banner ──────────────────────────────────────────────────────── */
.ob-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px; padding: 10px 14px;
  font-size: 13px; color: #DC2626; margin-top: 14px;
}

/* ── OTP digits ────────────────────────────────────────────────────────── */
.ob-otp-group {
  display: flex; gap: 8px; justify-content: center;
}
.ob-otp-digit {
  width: 48px; height: 48px;
  border: 1px solid #CBD5E1; border-radius: 12px;
  text-align: center;
  font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 600;
  color: #0F172A; background: transparent; outline: none;
  transition: border-color 0.2s;
}
.ob-otp-digit:focus { border-color: #2563EB; }

/* ── Sent-to header ────────────────────────────────────────────────────── */
.ob-sent-to {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; margin-bottom: 16px;
}
.ob-sent-to span { font-size: 14px; color: #475569; }
.ob-sent-to button {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px 8px;
  border-radius: 999px;
}
.ob-sent-to button:hover { background: rgba(37,99,235,0.06); }
.ob-sent-to strong {
  font-size: 14px; font-weight: 500; color: #0F172A;
  text-decoration: underline;
}
.ob-sent-to button svg { width: 14px; height: 14px; fill: #2563EB; }

/* ── Resend ────────────────────────────────────────────────────────────── */
.ob-resend { text-align: center; margin-top: 12px; }
.ob-resend span { font-size: 13px; color: #94A3B8; }
.ob-resend button {
  background: none; border: none;
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 500;
  color: #2563EB; cursor: pointer;
}
.ob-resend button:hover { text-decoration: underline; }

/* ── Wait (dedicated final step with subtle progress bar) ─────────────── */
.ob-wait-bar {
  height: 3px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.ob-wait-fill {
  height: 100%;
  width: 0%;
  background: rgba(37, 99, 235, 0.35);
  border-radius: 999px;
  transition: width 0.15s linear;
}

@keyframes ob-spin { to { transform: rotate(360deg); } }

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .ob-bg-desktop { display: none; }
  .ob-bg-mobile { display: block; }
  .ob-container { align-items: flex-end; padding: 0; }
  .ob-card {
    max-width: 100%; border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
    padding-top: 0; max-height: 86vh; max-height: 86dvh;
    overflow-y: auto;
  }
  .ob-handle {
    display: flex; justify-content: center; padding: 10px 0 6px;
  }
  .ob-handle span {
    display: block; width: 36px; height: 4px; border-radius: 999px;
    background: #E2E8F0;
  }
  .ob-hero { padding: 4px 24px 16px; }
  .ob-icon-ring { width: 48px; height: 48px; }
  .ob-icon-ring svg { width: 24px; height: 24px; }
  .ob-hero h2 { font-size: 18px; }
  .ob-hero p { font-size: 12px; }
  .ob-otp-digit { width: 42px; height: 42px; font-size: 18px; }
}
