/* Our own dropdowns (see js/core/nw-select.js). The button keeps the classes of
   the select it stands in for, so it looks like the field around it; these
   rules only add the icon, the arrow and the list. */

.nw-sel-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }

.nw-sel { display: inline-flex !important; align-items: center; gap: 10px; min-width: 0; text-align: left; cursor: pointer; background-image: none !important; font: inherit; line-height: 1.2; }
.nw-sel:disabled { cursor: default; opacity: .55; }
.nw-sel > .ic:first-child { flex: none; width: 18px; text-align: center; font-size: 14px; color: var(--t2, var(--text-secondary, #a6b0ad)); }
.nw-sel__v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-sel__v.is-ph { color: var(--t3, var(--text-tertiary, #8d9895)); }
.nw-sel__chev { flex: none; font-size: 11px; color: var(--t3, var(--text-tertiary, #8d9895)); transition: transform .18s ease; }
.nw-sel[aria-expanded="true"] .nw-sel__chev { transform: rotate(180deg); }
.nw-sel[aria-expanded="true"] { box-shadow: 0 0 0 2px rgba(120, 180, 255, .35); }

.nw-pop { position: fixed; z-index: 3000; display: flex; flex-direction: column; overflow: hidden; padding: 6px; border-radius: 14px;
  background: var(--menu, var(--surface-solid, #151a20)); color: var(--t1, var(--text-primary, #f4f6f5));
  border: 1px solid rgba(var(--fg-rgb, 255, 255, 255), .08); box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
  animation: nw-pop-in .16s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top center; }
.nw-pop.is-up { transform-origin: bottom center; }
@keyframes nw-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.nw-pop.is-up { animation-name: nw-pop-in-up; }
@keyframes nw-pop-in-up { from { opacity: 0; transform: translateY(4px) scale(.98); } }

.nw-pop__find { position: relative; flex: none; padding: 2px 2px 6px; }
.nw-pop__find .ic { position: absolute; left: 13px; top: calc(50% - 2px); transform: translateY(-50%); font-size: 12px; color: var(--t3, var(--text-tertiary, #8d9895)); pointer-events: none; }
.nw-pop__find input { width: 100%; height: 36px; padding: 0 12px 0 32px; border-radius: 9px; border: 0; outline: none; font: inherit; font-size: 14px;
  background: rgba(var(--fg-rgb, 255, 255, 255), .06); color: inherit; }
.nw-pop__find input:focus { box-shadow: 0 0 0 2px rgba(120, 180, 255, .35); }

.nw-pop__list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.nw-pop__list:focus, .nw-pop__list:focus-visible { outline: none !important; box-shadow: none !important; }
.nw-pop__opt { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14.5px; font-weight: 600; user-select: none; }
.nw-pop__opt > .ic:first-child { flex: none; width: 18px; text-align: center; font-size: 14px; color: var(--t2, var(--text-secondary, #a6b0ad)); }
.nw-pop__opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-pop__opt.is-active { background: rgba(var(--fg-rgb, 255, 255, 255), .07); }
.nw-pop__opt.is-sel { color: var(--blue, #7cc4ff); }
.nw-pop__opt.is-sel > .ic:first-child { color: inherit; }
.nw-pop__opt.is-off { opacity: .45; cursor: default; }
.nw-pop__opt[hidden], .nw-pop__none[hidden] { display: none; }
.nw-pop__tick { flex: none; font-size: 12px; opacity: 0; }
.nw-pop__opt.is-sel .nw-pop__tick { opacity: 1; }
.nw-pop__none { padding: 14px 10px; color: var(--t3, var(--text-tertiary, #8d9895)); font-size: 14px; }

:root[data-theme="light"] .nw-pop { box-shadow: 0 14px 40px rgba(13, 20, 23, .16); border-color: rgba(13, 20, 23, .08); }

@media (prefers-reduced-motion: reduce) { .nw-pop { animation: none; } .nw-sel__chev { transition: none; } }
