/* OneDzair — Registration v2 additions (stepper + phone OTP).
 * Layers on top of auth.css; reuses its design tokens.
 * Loaded ONLY on the v2 register/verify pages, so overrides here don't touch
 * login or other auth screens. */

/* ── Tall-card safety ────────────────────────────────────────────────────── */
/* The shared stage vertically centers the card. When the stepper is taller than
 * the viewport, centering would push its top out of reach. margin:auto keeps it
 * centered when it fits and top-aligned + scrollable when it doesn't. */
.auth-stage__main { align-items: flex-start; }
.auth-card { margin-block: auto; }
/* Stop the browser from re-anchoring scroll when we swap stepper panes. */
html { overflow-anchor: none; }

/* ── Referrer card ───────────────────────────────────────────────────────── */
/* Shown when the retailer arrives from a supplier's referral link. Makes it
 * unmistakable WHO they are signing up under: avatar initial + plain-language
 * label + the supplier's name in large bold. */
.auth-referrer {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    margin-block-end: var(--s-5);
    border: 1px solid color-mix(in oklab, var(--c-info), transparent 66%);
    background: var(--c-info-bg);
    border-radius: var(--r-2);
}
.auth-referrer__avatar {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--c-info);
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
}
.auth-referrer__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.auth-referrer__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-3);
}
.auth-referrer__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink-1);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.auth-referrer__note {
    font-size: 0.75rem;
    color: var(--ink-3);
}
.auth-referrer__check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--c-success);
}
[data-theme="dark"] .auth-referrer__avatar { color: var(--ink-1); }

/* ── Stepper action row (Back + submit) ──────────────────────────────────── */
.auth-form-actions {
    display: flex;
    gap: var(--s-3);
    margin-block-start: var(--s-6);
}
.auth-form-actions .auth-btn--primary { flex: 1 1 auto; }
.auth-form-actions .auth-btn--ghost { flex: 0 0 auto; }
@media (max-width: 479px) {
    .auth-form-actions { flex-direction: column-reverse; }
    .auth-form-actions .auth-btn { width: 100%; }
}

/* ── Step indicator ──────────────────────────────────────────────────────── */
.auth-steps {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    list-style: none;
    margin: 0 0 var(--s-5);
    padding: 0;
}
.auth-steps__item {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex: 1 1 0;
    min-width: 0;
    color: var(--ink-3);
    font-size: .875rem;
    font-weight: 500;
}
.auth-steps__item:not(:last-child)::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    border-radius: 2px;
    background: var(--line-2);
    margin-inline-start: var(--s-2);
}
.auth-steps__num {
    display: grid;
    place-items: center;
    inline-size: 26px;
    block-size: 26px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1.5px solid var(--line-2);
    color: var(--ink-3);
    font-size: .8125rem;
    font-weight: 700;
    flex: none;
}
.auth-steps__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-steps__item[aria-current="step"] { color: var(--ink-1); }
.auth-steps__item[aria-current="step"] .auth-steps__num {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
}
.auth-steps__item.is-done .auth-steps__num {
    background: var(--brand-orange-soft);
    border-color: var(--brand-orange);
    color: var(--brand-orange-deep);
}
.auth-steps__item.is-done::after { background: var(--brand-orange); }

/* ── Optional-field hint & inline hint ───────────────────────────────────── */
.auth-label__opt {
    margin-inline-start: .375rem;
    color: var(--ink-3);
    font-weight: 400;
    font-size: .8125rem;
}
.auth-hint {
    margin: .375rem 0 0;
    color: var(--ink-3);
    font-size: .8125rem;
}

/* ── CCP decision modal ──────────────────────────────────────────────────── */
.auth-modal[hidden] { display: none; }
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: var(--s-4);
}
.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: oklch(20% 0.03 252 / 0.55);
    backdrop-filter: blur(2px);
}
.auth-modal__card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid color-mix(in oklab, var(--line-1), transparent 30%);
    border-radius: var(--r-3);
    box-shadow: var(--card-shadow);
    padding: clamp(var(--s-5), 5vw, var(--s-7));
    text-align: center;
    animation: auth-modal-in 0.18s ease-out;
}
@keyframes auth-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
.auth-modal__icon {
    display: grid;
    place-items: center;
    inline-size: 48px;
    block-size: 48px;
    margin: 0 auto var(--s-4);
    border-radius: 50%;
    background: var(--brand-orange-soft);
    color: var(--brand-orange-deep);
}
.auth-modal__icon svg { width: 26px; height: 26px; }
.auth-modal__title {
    margin: 0 0 var(--s-2);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ink-1);
}
.auth-modal__text {
    margin: 0 0 var(--s-5);
    color: var(--ink-2);
    font-size: .9375rem;
    line-height: 1.6;
}
.auth-modal__actions {
    display: flex;
    gap: var(--s-3);
}
@media (max-width: 400px) {
    .auth-modal__actions { flex-direction: column-reverse; }
}

/* ── Phone OTP ───────────────────────────────────────────────────────────── */
.auth-otp {
    margin-block: var(--s-4);
}
.auth-otp__input {
    width: 100%;
    text-align: center;
    letter-spacing: .5em;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    padding-block: var(--s-3);
}
.auth-otp__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    margin-block-start: var(--s-3);
    font-size: .875rem;
    color: var(--ink-3);
}
.auth-resend-btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--brand-orange-deep);
    text-decoration: underline;
    cursor: pointer;
}
.auth-resend-btn[disabled] {
    color: var(--ink-4);
    text-decoration: none;
    cursor: not-allowed;
}

/* ── Activation onboarding ───────────────────────────────────────────────── */
.auth-activate-hero {
    text-align: center;
    margin-block-end: var(--s-5);
}
.auth-activate-hero__icon {
    display: grid;
    place-items: center;
    inline-size: 56px;
    block-size: 56px;
    margin: 0 auto var(--s-4);
    border-radius: 50%;
    background: var(--brand-orange-soft);
    color: var(--brand-orange-deep);
}
.auth-activate-hero__icon svg { width: 30px; height: 30px; }
.auth-activate-hero .auth-title,
.auth-activate-hero .auth-subtitle { text-align: center; }
.auth-section-lead {
    margin: 0 0 var(--s-4);
    color: var(--ink-2);
    font-size: .9375rem;
    line-height: 1.6;
}
