/* wsPicker - a searchable dropdown that sits over a real <select> (scripts/ws-picker.js).
   Used by the sign-up page and the onboarding "Your business" step. */

.wsp-host { position: relative; }
.wsp-host > select { pointer-events: none; }
.wsp-hit {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 14px;
}
.wsp-hit:focus { outline: none; }
.wsp-host.is-open > select { border-color: #00a7e1 !important; box-shadow: 0 0 0 4px rgba(0, 167, 225, .14) !important; }
.wsp-host .rg-caret, .wsp-host .caret { transition: transform .25s cubic-bezier(.22, .61, .36, 1); }
.wsp-host.is-open .rg-caret, .wsp-host.is-open .caret { transform: translateY(-50%) rotate(180deg); }

/* chosen-value flag / symbol shown inside the field, in place of the field icon */
.wsp-host .wsp-lead {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}
.wsp-host.has-lead > i.lg-ico, .wsp-host.has-lead > i.ico { opacity: 0; }

.wsp-panel {
    position: fixed;
    z-index: 200000;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 24px 60px -18px rgba(15, 27, 45, .35), 0 2px 6px rgba(15, 27, 45, .06);
    font-family: Lato, "Segoe UI", system-ui, sans-serif;
    color: #0f1b2d;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(.98);
    transform-origin: top center;
    transition: opacity .16s ease, transform .2s cubic-bezier(.22, .61, .36, 1);
}
.wsp-panel.is-up { transform-origin: bottom center; transform: translateY(6px) scale(.98); }
.wsp-panel.is-on { opacity: 1; transform: none; }
.wsp-search {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #eef2f7;
}
.wsp-search i { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 16px; }
.wsp-search input {
    width: 100%;
    height: 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px 0 36px;
    font: 600 14.5px Lato, system-ui, sans-serif;
    color: #0f1b2d;
    background: #f8fafc;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.wsp-search input:focus { border-color: #00a7e1; background: #fff; box-shadow: 0 0 0 3px rgba(0, 167, 225, .12); }
.wsp-search input::placeholder { color: #94a3b8; font-weight: 400; }
.wsp-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.wsp-list::-webkit-scrollbar { width: 8px; }
.wsp-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid #fff; }
.wsp-group {
    padding: 10px 10px 6px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.wsp-opt {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
    transition: background .12s;
}
.wsp-opt.is-active { background: #f1f7fc; }
.wsp-opt.is-selected { background: rgba(0, 167, 225, .09); color: #0077b6; }
.wsp-opt .wsp-main { flex: 1; min-width: 0; line-height: 1.25; }
.wsp-opt .wsp-main small { display: block; font-size: 12px; font-weight: 700; color: #94a3b8; }
.wsp-opt .wsp-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsp-opt .wsp-tick { color: #00a7e1; font-size: 16px; opacity: 0; }
.wsp-opt.is-selected .wsp-tick { opacity: 1; }
.wsp-opt mark { background: rgba(0, 167, 225, .16); color: inherit; border-radius: 3px; padding: 0 1px; }
.wsp-empty { padding: 26px 12px; text-align: center; font-size: 14px; color: #64748b; }
.wsp-empty i { display: block; font-size: 26px; color: #cbd5e1; margin-bottom: 6px; }

/* flags (intl-tel-input's sprite) and currency chips */
.wsp-flag {
    width: 22px;
    height: 16px;
    flex: none;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(15, 27, 45, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}
.wsp-flag .iti__flag { transform: scale(1.1); }
.wsp-sym {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    flex: none;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    font-size: 13px;
    font-weight: 900;
    color: #0077b6;
    background: rgba(0, 167, 225, .1);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.wsp-host .wsp-lead .wsp-sym { min-width: 24px; height: 24px; font-size: 11.5px; border-radius: 7px; padding: 0 4px; }
.wsp-tzoff {
    flex: none;
    font-size: 11.5px;
    font-weight: 900;
    color: #0077b6;
    background: rgba(0, 167, 225, .1);
    border-radius: 7px;
    padding: 4px 7px;
    font-variant-numeric: tabular-nums;
}

/* phones: a bottom sheet */
.wsp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199999;
    background: rgba(11, 26, 43, .45);
    opacity: 0;
    transition: opacity .2s;
}
.wsp-backdrop.is-on { opacity: 1; }
@media (max-width: 640px) {
    .wsp-panel {
        left: 0 !important;
        right: 0;
        bottom: 0;
        top: auto !important;
        width: 100%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        transform: translateY(40px);
    }
    .wsp-panel.is-on { transform: none; }
    .wsp-panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: #cbd5e1; margin: 8px auto 0; }
    .wsp-list { max-height: 58vh; }
    .wsp-opt { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
    .wsp-panel, .wsp-backdrop { transition: none; }
}
