/* HSELECT: the one dropdown menu (public/hselect.js). Loaded by the app and the mini apps; every value is an app token with
   a fallback, so it paints the same on a page that declares only some of them. Above every modal (9850 is a modal over
   the lightbox), below the toast (9900): a menu opened from inside a modal must never open behind it. */
.hs-pop {
  position: fixed; z-index: 9880; display: flex; flex-direction: column; box-sizing: border-box; min-width: 180px;
  padding: 6px; overflow: hidden; background: var(--surface, #13181b); color: var(--text, #f5f7f8);
  border: 1px solid var(--border-2, rgba(226,240,248,.16)); border-radius: 12px;
  box-shadow: 0 22px 56px -22px rgba(0,0,0,.8), 0 2px 10px rgba(0,0,0,.28);
  font-family: inherit; font-size: 14px; line-height: 1.4; text-align: left; animation: hsIn .12s ease;
}
body.light .hs-pop { box-shadow: 0 18px 48px -18px rgba(15,23,42,.30), 0 2px 8px rgba(15,23,42,.08); }
.hs-pop.is-up { animation-name: hsInUp; }
@keyframes hsIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes hsInUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hs-pop *, .hs-pop *::before, .hs-pop *::after { box-sizing: border-box; }
.hs-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1px; outline: none; }
.hs-opt { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text, #f5f7f8); user-select: none; -webkit-user-select: none; }
.hs-opt[hidden], .hs-group[hidden], .hs-empty[hidden] { display: none !important; }
.hs-opt.is-active { background: var(--hover, var(--surface-2, #1d2428)); }
.hs-opt.on .hs-l { font-weight: 600; }
.hs-opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.hs-opt.has-desc { align-items: flex-start; padding-top: 9px; padding-bottom: 9px; }
.hs-opt.has-desc .hs-check { margin-top: 1px; }
.hs-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hs-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-d { font-size: 12.5px; line-height: 1.35; color: var(--muted, #afb9bf); white-space: normal; }
.hs-check { flex: none; width: 16px; height: 16px; color: var(--accent-text, var(--cta, #fc734d)); visibility: hidden; }
.hs-opt.on .hs-check { visibility: visible; }
.hs-box { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-3, #6e777d); color: transparent; }
.hs-opt.on .hs-box { background: var(--accent, var(--cta, #fc734d)); border-color: var(--accent, var(--cta, #fc734d)); color: var(--accent-ink, #1a0a04); }
.hs-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint, #95a0a7); }
.hs-group:first-child { padding-top: 4px; }
.hs-empty { padding: 14px 10px; font-size: 13px; color: var(--muted, #afb9bf); text-align: center; }
.hs-search {
  flex: 0 0 auto; display: block; width: 100%; min-height: 38px; margin: 0 0 6px; padding: 8px 11px;
  background: var(--bg-2, var(--bg, #0b0f11)); color: var(--text, #f5f7f8); border: 1px solid var(--border, rgba(226,240,248,.08));
  border-radius: 8px; font: inherit; font-size: 14px; outline: none; box-shadow: none;
}
.hs-search:focus { border-color: var(--accent-line, var(--cta, #fc734d)); box-shadow: none; }
.hs-search::placeholder { color: var(--faint, #95a0a7); }
.hs-search::-webkit-search-cancel-button { cursor: pointer; }
.hs-title { flex: 0 0 auto; padding: 6px 10px 10px; font-size: 13px; font-weight: 600; color: var(--muted, #afb9bf); }
/* a phone: a bottom sheet, rows sized for a thumb */
.hs-scrim { position: fixed; inset: 0; z-index: 9870; background: rgba(0,0,0,.45); animation: hsFade .15s ease; }
@keyframes hsFade { from { opacity: 0; } to { opacity: 1; } }
.hs-pop.is-sheet { left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; min-width: 0; max-width: none; max-height: 72vh; padding: 8px; border-radius: 16px; animation: hsSheet .18s cubic-bezier(.2,.7,.2,1); }
@keyframes hsSheet { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.hs-pop.is-sheet .hs-opt { min-height: 48px; font-size: 15px; }
.hs-pop.is-sheet .hs-search { min-height: 44px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .hs-pop, .hs-pop.is-up, .hs-pop.is-sheet, .hs-scrim { animation: none; } }

/* the native select is the trigger: while its menu is open it reads as focused */
select[aria-expanded="true"] { border-color: var(--accent-line, var(--cta, #fc734d)) !important; }

/* <select multiple>: the select is kept (it is what callers read) but hidden; this button is its face */
.hs-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !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; }
.hs-multi {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: var(--btn-h, 40px);
  box-sizing: border-box; padding: 9px 14px 9px 12px; background: var(--surface-2, #1d2428); color: var(--text, #f5f7f8);
  border: 1px solid var(--border, rgba(226,240,248,.08)); border-radius: var(--radius-sm, 8px); font: inherit; font-size: 14px; line-height: 1.4;
  font-weight: 400; text-align: left; cursor: pointer; transition: border-color .15s;
}
.hs-multi:hover { border-color: var(--border-2, rgba(226,240,248,.16)); }
.hs-multi[aria-expanded="true"], .hs-multi:focus-visible { border-color: var(--accent-line, var(--cta, #fc734d)); outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent, #fc734d) 13%, transparent); }
.hs-multi .hs-mv { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-multi .hs-mv.is-empty { color: var(--muted, #afb9bf); }
.hs-multi .hs-caret { flex: none; width: 12px; height: 12px; color: var(--muted, #afb9bf); transition: transform .15s; }
.hs-multi[aria-expanded="true"] .hs-caret { transform: rotate(180deg); }
.hs-multi:disabled { opacity: .5; cursor: not-allowed; }
