/**
 * Global dark-theme native <select> / <option> menus
 * (investor + staff, Mac / Windows / major browsers)
 *
 * Problem: closed <select> can look dark while the OS popup list
 * is light — or light with white text — especially on Windows.
 * color-scheme + explicit option colors force a dark list.
 */

:root,
html,
body {
  color-scheme: dark !important;
}

/* Closed control + open list: tell the UA this is a dark surface */
select,
select.bar-select,
select.bar-control,
select.admin-q-select,
select.admin-q-select-inline,
select.admin-settings-select,
select.admin-accept-select,
select.admin-status-select,
select.join-v2-select,
select.say-select,
.field select,
.admin-field select,
.portal-modal select,
.admin-select-wrap select,
.gmail-shell select,
.portal-shell select,
.shell select,
.admin-app select,
.page-ir-glass select {
  color-scheme: dark !important;
}

/* Dropdown list rows — best-effort across Chromium / Firefox / Safari */
select option,
select optgroup,
.bar-select option,
.bar-control option,
.admin-q-select option,
.admin-q-select-inline option,
.admin-settings-select option,
.admin-accept-select option,
.admin-status-select option,
.join-v2-select option,
.say-select option,
.field select option,
.admin-field select option,
.portal-modal select option,
.gmail-shell select option,
.portal-shell select option,
.shell select option,
.admin-app select option {
  color-scheme: dark !important;
  background-color: #141414 !important;
  background: #141414 !important;
  color: #f2f2f2 !important;
}

/* Selected / focused row in the list (where the UA allows it) */
select option:checked,
select option:hover,
select option:focus {
  background-color: #2a2a2a !important;
  background: #2a2a2a linear-gradient(#2a2a2a, #2a2a2a) !important;
  color: #ffffff !important;
}

/* Placeholder / disabled options stay readable, not pure white-on-light */
select option:disabled,
select option[disabled] {
  background-color: #141414 !important;
  color: #777777 !important;
}

/*
 * Windows Chrome sometimes inherits body color onto a light OS menu.
 * Force the select element’s own text to light so at least the closed
 * state and partial popups stay legible.
 */
select {
  /* Do not force background here — closed chips stay as designed */
  color: inherit;
}
