/* ═══════════════════════════════════════════════════════════════════
   OTP Verification — Public Styles  v3.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────────── */
.asmc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: asmc-fade .2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
@keyframes asmc-fade { from { opacity:0; } to { opacity:1; } }

/* ── Modal Card ──────────────────────────────────────────────────── */
.asmc-modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(2,6,23,.28);
    padding: 32px 28px 28px;
    width: 100%;
    max-width: 360px;
    position: relative;
    animation: asmc-up .26s cubic-bezier(.16,1,.3,1);
    text-align: center;
}
@keyframes asmc-up { from { transform:translateY(28px); opacity:0; } to { transform:translateY(0); opacity:1; } }

/* ── Close ───────────────────────────────────────────────────────── */
.asmc-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    line-height: 1;
}
.asmc-modal-close:hover { background: #e2e8f0; color: #0f172a; }

/* ── Step shared ─────────────────────────────────────────────────── */
.asmc-modal-step { text-align: center; }

/* ── Icon wrap ───────────────────────────────────────────────────── */
.asmc-modal-icon-wrap {
    width: 60px;
    height: 60px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.asmc-modal-icon { font-size: 26px; line-height: 1; }

/* ── Titles ──────────────────────────────────────────────────────── */
.asmc-modal-step__title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 8px !important;
    line-height: 1.2 !important;
    font-family: inherit !important;
}
.asmc-modal-step__desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ── Sent notice ─────────────────────────────────────────────────── */
.asmc-sent-notice {
    font-size: 14px;
    color: #475569;
    margin: 0 0 24px;
    line-height: 1.5;
}
.asmc-sent-notice strong { color: #0f172a; }
.asmc-phone-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6366f1;
    font-size: 14px;
    padding: 0 2px;
    vertical-align: middle;
    line-height: 1;
}
.asmc-phone-edit-btn:hover { color: #4f46e5; }

/* ── Phone field ─────────────────────────────────────────────────── */
.asmc-phone-field {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    transition: border-color .2s;
    background: #f8fafc;
}
.asmc-phone-field:focus-within { border-color: #6366f1; background: #fff; }
.asmc-phone-prefix {
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    border-right: 2px solid #e2e8f0;
    background: #f1f5f9;
    height: 50px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}
.asmc-phone-input-field {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 0 16px !important;
    height: 50px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: transparent !important;
    box-shadow: none !important;
    letter-spacing: 1px;
}
.asmc-phone-input-field::placeholder { color: #cbd5e1; font-weight: 400; letter-spacing: 0; }
.asmc-phone-input-field[readonly] { color: #94a3b8 !important; }

/* ── Primary button ──────────────────────────────────────────────── */
.asmc-btn-primary {
    width: 100%;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(59,130,246,.35);
    font-family: inherit;
    letter-spacing: .2px;
    margin-top: 4px;
}
.asmc-btn-primary:hover { background: #2563eb; box-shadow: 0 6px 20px rgba(59,130,246,.4); transform: translateY(-1px); }
.asmc-btn-primary:active { transform: translateY(0); }
.asmc-btn-primary:disabled { background: #93c5fd; box-shadow: none; transform: none; cursor: not-allowed; }

/* ── OTP Digit Boxes — 4 boxes ───────────────────────────────────── */
.asmc-otp-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}
.asmc-otp-digit {
    width: 60px !important;
    height: 68px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 14px !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    text-align: center !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .15s, background .15s, transform .1s !important;
    padding: 0 !important;
    caret-color: #3b82f6;
    font-family: inherit !important;
}
.asmc-otp-digit:focus {
    border-color: #3b82f6 !important;
    background: #fff !important;
    transform: scale(1.04);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important;
}
.asmc-otp-digit.asmc-digit-filled {
    border-color: #3b82f6 !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

/* ── Messages ────────────────────────────────────────────────────── */
.asmc-modal-msg {
    font-size: 13px;
    padding: 9px 13px;
    border-radius: 8px;
    display: none;
    margin: 8px 0 4px;
    line-height: 1.4;
    text-align: left;
}
.asmc-modal-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; display: block; }
.asmc-modal-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; display: block; }
.asmc-modal-error a { color: #dc2626; font-weight: 600; }

/* ── Resend Row ──────────────────────────────────────────────────── */
.asmc-resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 13px;
    color: #64748b;
    min-height: 28px;
    flex-wrap: wrap;
}
.asmc-resend-label { color: #94a3b8; }
.asmc-btn-resend-inline {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
}
.asmc-btn-resend-inline:hover { color: #2563eb; }
.asmc-timer-countdown {
    color: #64748b;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.asmc-timer-countdown span { color: #3b82f6; font-weight: 700; }

/* ── Verified State ──────────────────────────────────────────────── */
.asmc-verified-state { padding: 8px 0; }
.asmc-verified-anim {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.asmc-verified-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #dcfce7;
    animation: asmc-pop .4s cubic-bezier(.16,1,.3,1);
}
@keyframes asmc-pop { from { transform:scale(0); opacity:0; } to { transform:scale(1); opacity:1; } }
.asmc-verified-check-icon {
    font-size: 32px;
    color: #16a34a;
    font-weight: 900;
    z-index: 1;
    animation: asmc-check .3s ease .15s both;
}
@keyframes asmc-check { from { transform:scale(0) rotate(-20deg); } to { transform:scale(1) rotate(0); } }
.asmc-verified-title { color: #16a34a !important; }
.asmc-verified-sub { font-size: 14px; color: #64748b; margin: 0 0 20px; }
.asmc-placing-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}
.asmc-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: asmc-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes asmc-spin { to { transform: rotate(360deg); } }

/* ── Shake ───────────────────────────────────────────────────────── */
@keyframes asmc-shake {
    0%,100%{transform:translateX(0)}
    20%,60%{transform:translateX(-7px)}
    40%,80%{transform:translateX(7px)}
}
.asmc-shake { animation: asmc-shake .4s ease; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 400px) {
    .asmc-modal { padding: 24px 16px 20px; border-radius: 16px; }
    .asmc-otp-digit { width: 50px !important; height: 58px !important; font-size: 22px !important; }
    .asmc-otp-digits { gap: 8px; }
}

/* ══════════════════════════════════════════════════════════════════
   INLINE BOXES — Login / Registration
   ══════════════════════════════════════════════════════════════════ */
.asmc-otp-box { background:#f8fafc; border:2px solid #e2e8f0; border-radius:12px; padding:20px; margin:16px 0; }
.asmc-otp-desc { font-weight:700; margin:0 0 14px; color:#0f172a; font-size:15px; }
.asmc-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.asmc-phone-input, .asmc-code-input { flex:1; min-width:0; padding:10px 14px !important; border:2px solid #e2e8f0 !important; border-radius:8px !important; font-size:15px !important; transition:border-color .15s !important; }
.asmc-phone-input:focus, .asmc-code-input:focus { border-color:#3b82f6 !important; outline:none !important; }
.asmc-btn { white-space:nowrap; padding:10px 18px !important; font-size:14px !important; cursor:pointer; background:#3b82f6 !important; color:#fff !important; border:none !important; border-radius:8px !important; font-weight:600 !important; transition:background .15s !important; }
.asmc-btn:hover { background:#2563eb !important; }
.asmc-btn-link { background:none; border:none; color:#3b82f6; cursor:pointer; font-size:13px; padding:6px 0 0; text-decoration:underline; display:block; }
.asmc-msg { margin-top:10px; font-size:13px; padding:8px 12px; border-radius:8px; display:none; }
.asmc-msg.asmc-success { background:#f0fdf4; color:#166534; border:1px solid #86efac; display:block; }
.asmc-msg.asmc-error   { background:#fef2f2; color:#991b1b; border:1px solid #fca5a5; display:block; }
.asmc-verified-badge { display:flex; align-items:center; gap:8px; color:#16a34a; font-weight:700; font-size:15px; padding:8px 0; }
