/* The phone step (phone-verify.js). Uses the auth pages' tokens when they are defined, and the
   same values as fallbacks elsewhere (the KYC form), so it reads the same everywhere. */
.pv {
    --pv-inset: var(--auth-inset, #0C121A);
    --pv-line: var(--auth-line, #1E2632);
    --pv-text: var(--auth-text, #EAECEF);
    --pv-muted: var(--auth-muted, #858C97);
    --pv-faint: var(--auth-faint, #5B6472);
    --pv-green: var(--auth-green, #18BB59);
    --pv-green-hover: var(--auth-green-hover, #20CA63);
    --pv-green-soft: var(--auth-green-soft, rgba(24, 187, 89, .12));
    --pv-red: #f08a80;
    color: var(--pv-text);
    font-family: inherit;
    text-align: left;
}
.pv *, .pv *::before, .pv *::after { box-sizing: border-box; }
.pv [hidden] { display: none !important; }

.pv__lead { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--pv-text); }
.pv__hint { margin: 0 0 16px; font-size: 13px; line-height: 1.5; color: var(--pv-muted); }
.pv__note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(24, 187, 89, .3);
    border-radius: 10px;
    background: var(--pv-green-soft);
    color: var(--pv-green);
    font-size: 13px;
}

/* Number: country code, then the number, on one row at every width. */
.pv__number {
    display: flex;
    align-items: stretch;
    margin-bottom: 10px;
    border: 1px solid var(--pv-line);
    border-radius: 12px;
    background: var(--pv-inset);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.pv__number:focus-within { border-color: var(--pv-green); box-shadow: 0 0 0 3px var(--pv-green-soft); }
.pv__country-wrap {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-width: 84px;
    padding: 0 26px 0 14px;
    border-right: 1px solid var(--pv-line);
    color: var(--pv-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.pv__country-wrap::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--pv-muted);
    border-bottom: 1.5px solid var(--pv-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
/* The select covers the code it shows, so the tap target is the whole left part but only the
   dial code is drawn — the full country list opens natively. */
.pv__country {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}
.pv__phone {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 50px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: var(--pv-text) !important;
    font-family: inherit;
    font-size: 16px;
    outline: 0;
}
.pv__phone::placeholder { color: var(--pv-faint); }

.pv__primary,
.pv__secondary {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease;
}
.pv__primary { border: 0; background: var(--pv-green); color: #04140A; }
.pv__primary:hover { background: var(--pv-green-hover); transform: translateY(-1px); }
.pv__secondary { border: 1px solid var(--pv-line); background: var(--pv-inset); color: var(--pv-text); font-weight: 600; }
.pv__secondary:hover { border-color: var(--pv-green); }
.pv__primary:disabled,
.pv__secondary:disabled { opacity: .5; cursor: progress; transform: none; }

.pv__link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--pv-muted);
    font-family: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.pv__link:hover { color: var(--pv-text); }
.pv__change { display: block; margin: 14px auto 0; }

/* Code: one box per digit. */
.pv__code { display: flex; justify-content: center; gap: 10px; margin: 4px 0 10px; }
.pv__digit {
    width: 56px;
    height: 60px;
    padding: 0;
    border: 1px solid var(--pv-line);
    border-radius: 12px;
    background: var(--pv-inset);
    color: var(--pv-text) !important;
    font-family: inherit;
    font-size: 24px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
    outline: 0;
    caret-color: var(--pv-green);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.pv__digit:focus { border-color: var(--pv-green); box-shadow: 0 0 0 3px var(--pv-green-soft); }
.pv__code.is-wrong .pv__digit { border-color: rgba(235, 69, 54, .6); }
.pv__code.is-wrong { animation: pv-shake .36s ease both; }

.pv__countdown { min-height: 18px; margin: 0 0 10px; color: var(--pv-faint); font-size: 12.5px; text-align: center; }
.pv__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pv__actions > * { flex: 1 1 160px; }

.pv__status { margin: 4px 0 12px; font-size: 13px; line-height: 1.4; color: var(--pv-muted); text-align: left; }
.pv__code + .pv__status { text-align: center; }
.pv__status:empty { display: none; }
.pv__status.is-error { color: var(--pv-red); }
.pv__status.is-busy { color: var(--pv-muted); }

.pv__footer { margin-top: 14px; text-align: center; }
.pv__footer:empty { display: none; }

.pv__done {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(24, 187, 89, .35);
    border-radius: 12px;
    background: rgba(24, 187, 89, .08);
    color: var(--pv-green);
    font-size: 15px;
    font-weight: 600;
}
.pv__tick { display: inline-flex; flex: 0 0 auto; }

@keyframes pv-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@media (max-width: 400px) {
    .pv__code { gap: 8px; }
    .pv__digit { width: 50px; height: 56px; font-size: 22px; }
    .pv__country-wrap { min-width: 76px; padding-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .pv__code.is-wrong { animation: none; }
}

/* ---------- On the KYC form ---------- */
.kyc-phone { margin: 8px 0 22px; }
.kyc-phone__title { margin-bottom: 10px; color: var(--auth-text, #EAECEF); font-size: 15px; font-weight: 600; }
.kyc-phone__title span { margin-left: 6px; color: var(--auth-muted, #858C97); font-size: 12px; font-weight: 400; }
