/*
 * Global dark dropdown fix
 * Applied last so every <select> in member/admin/modals/dynamic forms uses
 * a dark native popup with high-contrast white text.
 */
:root{
  --select-bg:#0f171b;
  --select-bg-2:#141e22;
  --select-bg-hover:#203139;
  --select-border:rgba(216,186,137,.28);
  --select-text:#fffaf0;
  --select-muted:#8f9ca1;
  --select-accent:#d8ad67;
}

/* Every select control, including ones inserted dynamically by JS. */
select,
.admin-toolbar select,
.admin-filter-grid select,
.admin-form-card select,
.auth-form select,
.inner-card select,
.nq-modal-card select,
.gift-item-row select,
.recharge-type-grid select,
.recharge-character select,
.security-log-toolbar select,
.toolbar-line select,
.bulk-bar select {
  color-scheme:dark!important;
  background-color:var(--select-bg)!important;
  background-image:linear-gradient(135deg,var(--select-bg-2),var(--select-bg))!important;
  color:var(--select-text)!important;
  border-color:var(--select-border)!important;
  -webkit-text-fill-color:var(--select-text)!important;
  text-shadow:none!important;
}

select:focus,
select:focus-visible {
  color:var(--select-text)!important;
  border-color:rgba(216,173,103,.72)!important;
  outline:none!important;
  box-shadow:0 0 0 2px rgba(216,173,103,.12)!important;
}

/* Native opened dropdown rows on Chromium/Firefox/Windows. */
select option,
select optgroup {
  background:var(--select-bg)!important;
  background-color:var(--select-bg)!important;
  color:var(--select-text)!important;
  -webkit-text-fill-color:var(--select-text)!important;
  text-shadow:none!important;
}

select optgroup {
  color:var(--select-accent)!important;
  font-weight:700!important;
}

select optgroup option {
  color:var(--select-text)!important;
  font-weight:400!important;
}

select option:checked {
  background:#275f9f!important;
  background-color:#275f9f!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

select option:disabled {
  background:#0c1215!important;
  background-color:#0c1215!important;
  color:var(--select-muted)!important;
  -webkit-text-fill-color:var(--select-muted)!important;
}

/* Multi-select/list boxes should never fall back to a white sheet. */
select[multiple],
select[size]:not([size="1"]) {
  background:var(--select-bg)!important;
  color:var(--select-text)!important;
  scrollbar-color:#725736 #11191c!important;
}

/* Modern customizable select support where available. */
@supports selector(::picker(select)) {
  select,
  select::picker(select) {
    appearance:base-select;
  }
  select::picker(select) {
    background:var(--select-bg)!important;
    color:var(--select-text)!important;
    border:1px solid var(--select-border)!important;
  }
  select option {
    background:var(--select-bg)!important;
    color:var(--select-text)!important;
  }
}
