/* ==========================================================================
   Canin — vendor signup (two steps: mobile+OTP, then the full form)

   Scoped under .vr, per the project rule: style.css is never edited, and a
   page-specific file is loaded through the $page_styles hook.
   Mobile-first; the wider rules are added at 760px.
   ========================================================================== */

.vr {
    --vr-ink: #0b2545;
    --vr-line: #e3edfb;
    --vr-muted: #64809f;
    --vr-ok: #0d9f6e;
    --vr-ok-bg: #e9faf3;
    --vr-err: #b91c1c;
    --vr-err-bg: #fef2f2;
    --vr-info-bg: #eff6ff;
    padding: 18px 0 46px;
    background: linear-gradient(180deg, #f2f8ff, var(--bg) 60%);
}

.vr-shell { width: 100%; max-width: 860px; margin-inline: auto; padding-inline: 14px; }

/* ------------------------------------------------------------------- head */
.vr-head { text-align: center; margin-bottom: 20px; }
.vr-eyebrow {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--vr-line);
    color: var(--primary-strong);
    font-size: 11.5px;
    font-weight: 800;
}
.vr-head h1 { margin: 12px 0 7px; font-size: 22px; font-weight: 900; color: var(--vr-ink); }
.vr-head p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--vr-muted); }

/* ----------------------------------------------------------------- invite */
.vr-invite {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 14px;
    background: var(--vr-info-bg);
    border: 1px solid #cfe3fd;
    color: #0b3f8f;
}
.vr-invite svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.vr-invite b { display: block; font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.vr-invite span { font-size: 12px; line-height: 1.85; opacity: .9; }

/* ------------------------------------------------------------------ steps */
.vr-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}
.vr-steps li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 6px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid var(--vr-line);
    color: var(--vr-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
}
.vr-steps li span {
    display: grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--vr-muted);
    font-size: 11px;
    font-weight: 900;
}
.vr-steps li.now { border-color: var(--primary); color: var(--primary-strong); box-shadow: 0 6px 18px rgba(22,119,255,.13); }
.vr-steps li.now span { background: var(--primary); color: #fff; }
.vr-steps li.done { border-color: #b6ebd4; color: var(--vr-ok); background: var(--vr-ok-bg); }
.vr-steps li.done span { background: var(--vr-ok); color: #fff; }

/* ----------------------------------------------------------------- alerts */
.vr-alert {
    margin-bottom: 14px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.8;
}
.vr-alert.is-error { background: var(--vr-err-bg); border: 1px solid #fecaca; color: var(--vr-err); }
.vr-alert.is-info  { background: var(--vr-info-bg); border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ------------------------------------------------------------------- card */
.vr-card {
    padding: 18px 16px 20px;
    background: #fff;
    border: 1px solid var(--vr-line);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(16, 60, 120, .07);
}

.vr-verified {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 16px;
    padding: 10px 13px;
    border-radius: 12px;
    background: var(--vr-ok-bg);
    border: 1px solid #b6ebd4;
    color: #067a52;
    font-size: 12.5px;
    font-weight: 700;
}
.vr-verified b { font-weight: 900; direction: ltr; }
.vr-locked {
    margin-inline-start: auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(6, 122, 82, .12);
    font-size: 10.5px;
    font-weight: 800;
}

.vr-h2 {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin: 22px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--vr-line);
    font-size: 14.5px;
    font-weight: 900;
    color: var(--vr-ink);
}
.vr-h2:first-of-type { margin-top: 4px; }
.vr-ver { font-size: 11px; font-weight: 600; color: var(--vr-muted); }

/* ------------------------------------------------------------------ terms */
/* Only the five-line digest sits in the form now; the full text is on
   vendor-terms.php. No scroll box any more — five lines fit, and a scroll box
   around a summary just hides the last line for no reason. */
.vr-terms {
    padding: 14px 16px;
    border-radius: 13px;
    background: #fbfdff;
    border: 1px solid var(--vr-line);
}
.vr-terms ol { margin: 0; padding-inline-start: 18px; }
.vr-terms li { margin-bottom: 11px; font-size: 12.5px; line-height: 2; color: #33506f; }
.vr-terms li:last-child { margin-bottom: 0; }
.vr-terms b { color: var(--vr-ink); font-weight: 800; }

/* pointer to the full document */
.vr-terms-more {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.95;
    color: var(--vr-muted);
}
.vr-terms-more a,
.vr-check a {
    color: var(--primary-strong);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.vr-terms-more a:hover,
.vr-check a:hover { color: var(--primary); }

/* ------------------------------------------------------------------ forms */
.vr-form { display: block; }
.vr-grid { display: grid; grid-template-columns: 1fr; gap: 13px; }
.vr-full { grid-column: 1 / -1; }

.vr-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.vr-field > label { font-size: 12.5px; font-weight: 700; color: var(--vr-ink); }
.vr-field > label b { color: #dc2626; font-weight: 900; }
.vr-field small { font-size: 11px; line-height: 1.75; color: var(--vr-muted); }

.vr-input {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--vr-line);
    border-radius: 12px;
    background: #fff;
    color: var(--vr-ink);
    font-family: inherit;
    font-size: 13.5px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.vr-input:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, .13);
}
.vr-input[readonly] { background: #f6f9fd; color: var(--vr-muted); }
textarea.vr-input { resize: vertical; line-height: 1.9; }

.vr-otp {
    letter-spacing: 10px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    direction: ltr;
}

.vr-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 16px 0 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--vr-ink);
    cursor: pointer;
}
.vr-check input { width: 17px; height: 17px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.vr-check--sm { margin: 6px 0 0; font-size: 11.5px; font-weight: 600; color: var(--vr-muted); }
.vr-check--sm input { width: 14px; height: 14px; }

.vr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}
.vr-btn:hover { background: var(--primary-strong); }
.vr-btn:active { transform: translateY(1px); }
.vr-btn--lg { width: 100%; margin-top: 20px; min-height: 52px; font-size: 15px; }
.vr-btn.is-ghost { background: transparent; border: 1.5px solid var(--vr-line); color: var(--vr-muted); }
.vr-btn.is-ghost:hover { background: var(--surface-2); color: var(--vr-ink); }

.vr-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.vr-note { margin: 12px 0 0; font-size: 11.5px; line-height: 1.9; color: var(--vr-muted); text-align: center; }
.vr-note b { color: var(--vr-ink); font-weight: 800; }
.vr-foot { margin: 18px 0 0; text-align: center; font-size: 12.5px; color: var(--vr-muted); }
.vr-foot a { color: var(--primary-strong); font-weight: 800; text-decoration: none; }

/* the seal comes from caninVendorVerifiedMark() */
.canin-verified { display: inline-flex; flex: none; align-items: center; vertical-align: -.12em; }
.canin-verified svg { width: 1.25em; height: 1.25em; display: block; }
.canin-verified--verified   { color: var(--primary); }
.canin-verified--identified { color: var(--vr-ok); }

/* ============================================================== 760px up */
@media (min-width: 760px) {
    .vr { padding: 30px 0 60px; }
    .vr-shell { padding-inline: 20px; }
    .vr-head h1 { font-size: 28px; }
    .vr-head p { font-size: 14px; }
    .vr-steps li { padding: 11px 10px; font-size: 12.5px; }
    .vr-card { padding: 26px 26px 28px; border-radius: 20px; }
    .vr-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .vr-btn--lg { width: auto; min-width: 260px; display: flex; margin-inline: auto; }
}

/* -------------------------------------------------- two-step + locked field */
.vr-steps--2 { grid-template-columns: repeat(2, 1fr); }

.vr .ltr { direction: ltr; display: inline-block; }

/* the verified mobile, shown but not editable and not a form field at all */
.vr-locked-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border: 1.5px dashed #b6ebd4;
    border-radius: 12px;
    background: var(--vr-ok-bg);
    color: #067a52;
    font-size: 14px;
    font-weight: 800;
}
.vr-locked-field svg { flex: none; width: 17px; height: 17px; opacity: .75; }

/* the national-code privacy line */
.vr-privacy {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #eef6ff;
    border: 1px solid #cfe3fd;
    color: #1d4ed8 !important;
    font-weight: 600;
}
.vr-privacy svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* ---------------------------------------------------- local-only OTP echo */
/* Rendered only when caninCanEchoOtp() passes all four checks. Styled to look
   like a development aid, not like part of the product. */
.vr-localotp {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 14px;
    background: repeating-linear-gradient(135deg, #fffbeb 0 12px, #fef9e7 12px 24px);
    border: 1.5px dashed #f59e0b;
    color: #7c2d12;
}
.vr-localotp-tag {
    flex: none;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f59e0b;
    color: #422006;
    font-size: 10.5px;
    font-weight: 900;
    white-space: nowrap;
}
.vr-localotp b { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 800; }
.vr-localotp code {
    padding: 2px 9px;
    border-radius: 7px;
    background: #422006;
    color: #fde68a;
    font-family: ui-monospace, monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    direction: ltr;
    display: inline-block;
}
.vr-localotp span { font-size: 11px; line-height: 1.9; }
.vr-localotp span code {
    padding: 1px 6px; background: rgba(66,32,6,.1); color: #7c2d12;
    font-size: 10.5px; letter-spacing: 0; font-weight: 700;
}

/* ── walk-in vendor: the type fork and the map field ──────────────────────
   Appended for the offline-vendor feature. Everything above is untouched. */

.vr-steps--3 li { flex: 1 1 0; }

.vr-pick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
    margin: 6px 0 4px;
}
.vr-pick-card {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    text-align: right;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    border: 2px solid var(--hm-line, #e3edfb);
    border-radius: 14px;
    padding: 18px;
    transition: border-color .15s ease, transform .15s ease;
}
.vr-pick-card:hover {
    border-color: var(--primary, #1677ff);
    transform: translateY(-2px);
}
.vr-pick-ico { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.vr-pick-body b { display: block; font-size: 15px; margin-bottom: 4px; color: #0b2545; }
.vr-pick-body small { display: block; font-size: 12px; line-height: 1.8; color: #5a6b82; }

.vr-kind {
    background: #fff0e6;
    color: #a35418;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
    margin-right: 6px;
}
.vr-kind-change {
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary, #1677ff);
    background: none;
    border: 0;
    cursor: pointer;
    text-decoration: underline;
    margin-right: 4px;
}

.vr-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    min-height: 108px;
    padding: 14px;
    border: 1px dashed var(--primary, #1677ff);
    border-radius: 12px;
    background: repeating-linear-gradient(45deg, #f4f8ff, #f4f8ff 10px, #eaf2ff 10px, #eaf2ff 20px);
    font-size: 12.5px;
    color: #3c536e;
}
.vr-map-btn { padding: 6px 15px; font-size: 12.5px; }

.vr-row--tight { display: flex; gap: 10px; margin-top: 10px; }
.vr-row--tight .vr-input { flex: 1; min-width: 0; }
