/* ============================================================
   select-search.css - THE APP'S DROPDOWN LIST, for every native <select>
   (see wwwroot/js/selectsearch.js). ONLY the opened list is ours; the closed
   field is still the page's own <select>, so no existing field design changes.
   Styled on the global --mh-* tokens so it follows light/dark automatically.
   Plain hyphens only.

   Aug 14 2026: widened from long lists to ALL lists on the CEO's instruction, so
   no screen drops the operating system's own blue-highlighted list any more. The
   search box, the group headings and the disabled row are the three pieces that
   had to follow it there.
   ============================================================ */
.mh-ssp {
  position: fixed;
  /* ABOVE EVERY SURFACE IN THE APP. Raised from 4000 on 14 Aug 2026 after the
     Program Director could not change a feedback status on cloud.

     4000 was chosen when this panel only ever opened for LONG lists, which live on
     ordinary pages. Widening it to every <select> put it inside the app's high
     overlays for the first time - and the app's ladder runs to 100096. The feedback
     inbox detail (.um-panel) is 100021, so the list opened BEHIND the panel that
     owns the field: measured, elementFromPoint over the open list returned
     .up-grp-h, not the list.

     Nothing regressed a native control - it is that a native <select> popup is drawn
     by the OPERATING SYSTEM and is therefore always on top, so no z-index in this
     app ever had to out-rank it. Replacing it with a DOM element made that implicit
     guarantee something we now have to state.

     100200 clears the documented ceiling (100096) with room. An open dropdown SHOULD
     be top-most: it is transient, it closes on any outside click, and nothing in the
     app needs to paint over the list a person is currently choosing from. */
  z-index: 100200;
  max-width: min(420px, calc(calc(100 * var(--mh-vw)) - 16px));
  background: var(--mh-surface, #fff);
  border: 1px solid var(--mh-line, #D9DFE7);
  border-radius: 12px;
  box-shadow: 0 18px 44px -12px rgba(28, 39, 51, .30), 0 2px 8px rgba(28, 39, 51, .08);
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
}

.mh-ssp-head { flex: none; }

/* SHORT LISTS: no search box, but the input must stay FOCUSABLE - every keyboard
   path in selectsearch.js runs through it. So this hides it visually without
   removing it from the layout tree; display:none or visibility:hidden would make
   it unfocusable and the arrow keys would stop working on exactly the lists most
   people use. Zero height, clipped, and no gap left behind. */
.mh-ssp-head--quiet {
  height: 0;
  overflow: hidden;
  margin-bottom: -6px;            /* cancel the panel's flex gap */
  opacity: 0;
  pointer-events: none;
}

/* <optgroup> labels. A heading, not an option - it cannot be picked or focused. */
.mh-ssp-group {
  padding: 9px 12px 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mh-muted, #8A8B83);
}
.mh-ssp-group:first-child { padding-top: 4px; }
.mh-ssp-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--mh-line, #D9DFE7);
  border-radius: 9px;
  background: var(--mh-cream-2, #F1F4F7);
  color: var(--mh-ink, #2A2F31);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  text-align: left;
}
.mh-ssp-input::placeholder { color: var(--mh-muted, #8A8B83); font-weight: 400; }
.mh-ssp-input:focus { border-color: var(--mh-green, #4E7C72); box-shadow: 0 0 0 3px rgba(78, 124, 114, .18); }

.mh-ssp-list {
  overflow: auto;
  max-height: 264px;
  /* min-height:0 so the list can shrink when place() caps the PANEL's height (a cramped
     viewport, or a high Display-resolution zoom). Without it the flex child refuses to go
     below its content and the panel overflows the cap it was just given. */
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mh-ssp-list::-webkit-scrollbar { width: 8px; }
.mh-ssp-list::-webkit-scrollbar-thumb { background: var(--mh-line, #D9DFE7); border-radius: 99px; }

.mh-ssp-opt {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--mh-ink, #2A2F31);
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: normal;
  line-height: 1.35;
  /* MudBlazor's global `button` reset makes every button a CENTRED inline-flex box, which
     turns the label into a flex item - so `text-align:left` above was inert and the options
     sat centred. Declaring the flex alignment is what actually moves them to the left edge.
     (#mhDetail .sel-opt fights the same reset in detail-view.css.) */
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.mh-ssp-opt:hover,
.mh-ssp-opt.cur { background: var(--mh-cream-2, #F1F4F7); }
.mh-ssp-opt.on {
  background: rgba(78, 124, 114, .13);
  color: var(--mh-green-d, #3D655D);
  font-weight: 700;
}

/* A disabled <option> renders, so the list still reads the way the page wrote it,
   but it cannot be chosen or arrowed onto. Before the panel covered short lists
   this case never arose - the browser handled it. */
.mh-ssp-opt.off {
  color: var(--mh-muted, #8A8B83);
  cursor: default;
  opacity: .7;
}
.mh-ssp-opt.off:hover { background: none; }

.mh-ssp-empty {
  padding: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mh-muted, #8A8B83);
}

/* The panel is appended to <body>, which is outside any dark-scoped container, so the JS
   stamps .dark on it when the app is in dark mode. Tokens do the rest. */
.mh-ssp.dark {
  background: var(--mh-surface, #222B27);
  border-color: var(--mh-line, #33403A);
  box-shadow: 0 22px 50px -12px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);
}
