/* Data Genie — custom dropdowns (see dropdown.js). Uses the page's colour tokens. */
.dd { position: relative; display: block; min-width: 0; }
.dd-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  font: inherit; font-size: .95rem; text-align: left; color: var(--ink);
  background: var(--field, var(--surface)); border: 1px solid var(--field-line, var(--line));
  border-radius: 10px; padding: 11px 13px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.dd-btn:hover { border-color: var(--ink-2, var(--muted)); }
.dd-btn:focus-visible, .dd.open .dd-btn { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 18%, transparent); }
.dd-btn:disabled { opacity: .6; cursor: not-allowed; }
.dd-value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-btn svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .18s ease; }
.dd.open .dd-btn svg { transform: rotate(180deg); }

.dd-menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 100%; max-height: 280px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 18, 32, .08), 0 18px 40px -12px rgba(11, 18, 32, .28);
  animation: dd-in .14s ease both; outline: none;
}
.dd.up .dd-menu { top: auto; bottom: calc(100% + 6px); }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dd.up .dd-menu { animation-name: dd-in-up; }
@keyframes dd-in-up { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.dd-menu li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: .93rem; white-space: nowrap; }
.dd-menu li.active { background: var(--paper); }
.dd-menu li svg { width: 16px; height: 16px; flex: none; color: var(--signal); opacity: 0; }
.dd-menu li[aria-selected="true"] { font-weight: 600; }
.dd-menu li[aria-selected="true"] svg { opacity: 1; }
.dd-menu li.off { opacity: .45; cursor: default; }

/* compact, inside tables */
.tbl .dd, td .dd { display: inline-block; min-width: 130px; }
.tbl .dd-btn, td .dd-btn { padding: 7px 10px; font-size: .86rem; border-radius: 8px; }

/* on the homepage's dark access form */
.form .dd-btn { color: var(--board-ink); background: var(--board); border-color: rgba(255,255,255,.12); }
.form .dd-btn svg { color: var(--board-muted); }
.form .dd-menu { background: var(--board-2); color: var(--board-ink); border-color: rgba(255,255,255,.12); box-shadow: 0 20px 44px -14px rgba(0,0,0,.6); }
.form .dd-menu li.active { background: rgba(255,255,255,.07); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dd-menu { box-shadow: 0 20px 44px -14px rgba(0,0,0,.65); }
  :root:not([data-theme="light"]) .dd-menu li.active { background: var(--paper-2, rgba(255,255,255,.06)); }
}
@media (prefers-reduced-motion: reduce) { .dd-menu { animation: none; } .dd-btn svg { transition: none; } }
