/* Searchable dropdown (js/combo.js) - shared by the website and the Vendor Console.
   Generic look only; page / area specific overrides live in site.css (.site …) and yessir-finder.css (console). */
.ss { position: relative; min-width: 0; }
.ss.is-open { z-index: 1070; }
.ss-unclip { overflow: visible !important; }
.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden !important; clip-path: inset(50%) !important; }

/* the field: keeps the select's own classes (form-select, -sm, is-invalid …) so it looks exactly like the select */
.ss > .ss-toggle { display: block; width: 100%; min-width: 0; position: relative; text-align: left; cursor: pointer; white-space: nowrap; padding-right: 3.5rem; }
.ss > .ss-toggle.is-invalid, .ss > .ss-toggle.is-valid { padding-right: 4.125rem; }
.ss-toggle .ss-text { display: block; overflow: hidden; text-overflow: ellipsis; }
.ss > .ss-toggle > .ss-ico { position: absolute; left: auto; right: 2.2rem; top: 50%; z-index: auto; transform: translateY(-50%); font-size: .78em; line-height: 1; color: #8a93b5; pointer-events: none; transition: color .15s; }
.ss-toggle.is-invalid .ss-ico, .ss-toggle.is-valid .ss-ico { display: none; }   /* the validation icon takes its place */
.ss-toggle:hover .ss-ico, .ss.is-open .ss-ico { color: #0023ce; }
.ss > .ss-toggle:disabled { cursor: not-allowed; padding-right: 2.25rem; color: #7a829e; background-color: #f1f3f8; opacity: 1; }
.ss-toggle:disabled .ss-ico { display: none; }
.ss-toggle:focus-visible, .ss.is-open > .ss-toggle { border-color: #4a6cf7; outline: 0; box-shadow: 0 0 0 .2rem rgba(0, 35, 206, .15); }
.ss.is-open > .ss-toggle.is-invalid { border-color: #dc3545; box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .2); }

/* the panel */
.ss-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 1070; width: max(100%, 270px); max-width: min(440px, calc(100vw - 24px));
    display: flex; flex-direction: column; background: #fff; color: #141a33; text-align: left; font-size: .88rem; font-weight: 500; line-height: 1.3;
    border: 1px solid #dfe3ee; border-radius: 12px; box-shadow: 0 18px 44px rgba(10, 22, 80, .2), 0 2px 6px rgba(10, 22, 80, .06); overflow: hidden;
    animation: ss-in .12s ease-out; }
.ss.up > .ss-panel { top: auto; bottom: calc(100% + 6px); animation-name: ss-in-up; }
.ss.end > .ss-panel { left: auto; right: 0; }
@keyframes ss-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes ss-in-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ss-panel { animation: none; } }

.ss-search { position: relative; flex: 0 0 auto; padding: .55rem; border-bottom: 1px solid #eef0f6; background: #f8f9fd; }
.ss-panel > .ss-search > .bi { position: absolute; left: 1.15rem; right: auto; top: 50%; z-index: 1; transform: translateY(-50%); color: #6b7392; font-size: .85rem; pointer-events: none; }
.ss-search input { display: block; width: 100%; height: 38px; margin: 0; border: 1px solid #cfd5e8; border-radius: 8px; padding: 0 .7rem 0 2.05rem;
    font: inherit; font-size: .9rem; font-weight: 500; color: #141a33; background: #fff; box-shadow: none; }
.ss-search input::placeholder { color: #8a93b5; font-weight: 400; }
.ss-search input:focus, .ss-search input:focus-visible { border-color: #4a6cf7; outline: 2px solid #4a6cf7 !important; outline-offset: -1px !important; box-shadow: 0 0 0 .22rem rgba(0, 35, 206, .12) !important; }
.ss-search input::-webkit-search-cancel-button { cursor: pointer; }

.ss-list { position: relative; flex: 1 1 auto; list-style: none; margin: 0; padding: .3rem; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ss-opt { position: relative; padding: .5rem 1.9rem .5rem .7rem; border-radius: 7px; cursor: pointer; color: #141a33; overflow-wrap: anywhere; }
.ss-opt.is-empty { color: #6b7392; font-style: italic; }
.ss-opt.is-active { background: #eef1ff; color: #0023ce; }
.ss-opt.is-selected { font-weight: 700; color: #0023ce; }
.ss-opt.is-selected::after { content: "\2713"; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-weight: 700; }
.ss-opt.is-disabled { color: #b5bbd0; cursor: not-allowed; background: none; }
.ss-opt mark { background: #ffe9a8; color: inherit; padding: 0; border-radius: 2px; font-weight: 700; }
.ss-group { position: sticky; top: -.3rem; z-index: 1; margin: .15rem 0 0; padding: .5rem .7rem .3rem; background: #fff; font-size: .68rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: #c25d00; border-bottom: 1px solid #f1f2f7; }
.ss-group:first-child { margin-top: 0; }
.ss-group ~ .ss-opt { padding-left: 1rem; }
.ss-empty { padding: 1rem .9rem; text-align: center; color: #6b7392; font-size: .85rem; }
.ss-count { flex: 0 0 auto; padding: .35rem .8rem; font-size: .72rem; color: #6b7392; border-top: 1px solid #eef0f6; background: #f8f9fd; }

/* high-contrast mode (accessibility toolbar) */
html.hc .ss-panel, html.hc .ss-search, html.hc .ss-count, html.hc .ss-group, html.hc .ss-search input { background: #000; color: #fff; border-color: #fff; }
html.hc .ss-opt { color: #fff; }
html.hc .ss-opt.is-active { background: #ff0; color: #000; }
html.hc .ss-opt mark { background: #ff0; color: #000; }
