/* Custom dropdown — shared by the builder (style.css) and the manual
   (manual.css). Pairs with dropdown.js: the native <select> stays as the
   source of truth and is hidden, this is the UI drawn on top of it.
   Font and gradient variants are builder-only and stay in style.css. */

/* custom dropdown (replaces native select.ctl) */
.is-enhanced { display: none !important; }
.dropdown { position: relative; display: flex; width: 100%; }
.dropdown-trigger {
  font: inherit; font-size: 12px;
  display: inline-flex; align-items: center; gap: 10px; width: 100%;
  background: var(--panel-2); border: none; border-bottom: 1px solid var(--line);
  color: var(--text);
  padding: 6px 10px; cursor: pointer; border-radius: 0; white-space: nowrap;
}
.dropdown-trigger:hover { border-bottom-color: var(--accent-focus); }
.dropdown.open .dropdown-trigger { border-bottom-color: var(--accent-focus); color: var(--accent-hover); }
.dropdown-label { flex: 1; text-align: left; }
.dropdown-caret { color: var(--muted); font-size: 9px; }
.dropdown.open .dropdown-caret { transform: rotate(180deg); }

.dropdown-menu {
  position: fixed; z-index: 60; display: none;
  background: var(--black); border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 280px; overflow-y: auto;
  overscroll-behavior: contain;
  transform-origin: top left;
}
.dropdown.open .dropdown-menu { display: block; animation: menu-in var(--dur-menu) var(--ease-out); }
.dropdown-menu.opens-above { transform-origin: bottom left; }
.dropdown-option {
  display: block; width: 100%; text-align: left;
  font: inherit; font-size: 12px;
  background: transparent; border: none; color: var(--text);
  padding: 8px 12px; cursor: pointer; white-space: nowrap;
}
.dropdown-option:hover { background: var(--panel-2); color: var(--accent-hover); }
.dropdown-option.active { background: var(--text); color: var(--black); font-weight: 700; }

@keyframes menu-in {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* language selector — topbar pill variant of the custom dropdown */
.lang-dropdown { width: auto; align-self: center; margin-right: 8px; flex: 0 0 auto; }
.lang-dropdown .dropdown-trigger {
  height: 32px;
  padding: 0 10px;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--dur-ui) var(--ease-out), border-color var(--dur-ui) var(--ease-out);
}
.lang-dropdown .dropdown-trigger:hover { color: var(--text); border-color: var(--line-hot); }
.lang-dropdown.open .dropdown-trigger { color: var(--text); border-color: var(--accent-focus); }
.lang-dropdown .dropdown-label { flex: 0 0 auto; }
.lang-dropdown .dropdown-caret { color: var(--muted); }
.lang-dropdown .dropdown-option {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* dark menu on a black track — the page-wide scrollbar rules live with each
   page's own stylesheet, so the menu carries its own */
.dropdown-menu { scrollbar-color: var(--line) var(--black); }
.dropdown-menu::-webkit-scrollbar-track {
  background: var(--black);
  border-left: 1px solid var(--line);
}
.dropdown-menu::-webkit-scrollbar-thumb { border-color: var(--black); }
