/* The top-layer list of a bootstrap-select (a1-select-popover.js); the same rules are in a1-sitewide.css for staff pages. */
.bootstrap-select > .dropdown-menu[popover],
.bs-container > .dropdown-menu[popover] {
  position: fixed;
  inset: auto;
  margin: 0 !important;
  padding: 4px 0;
  /* The list is as wide as its longest choice: never narrower than its button (--a1-dd-width, set by script) or 16rem,
     never wider than --a1-dd-max-width or the screen, where a longer name ends in an ellipsis. The list's own height
     is set on its inner box, so the menu never limits it. */
  width: max-content !important;
  min-width: max(var(--a1-dd-width, 0px), 16rem) !important;
  max-width: min(var(--a1-dd-max-width, 30rem), calc(100vw - 16px)) !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  color: inherit;
  background: var(--a1-surface, #fff);
  box-shadow: var(--a1-shadow-soft) !important;
}

.bootstrap-select > .dropdown-menu[popover] > .inner,
.bs-container > .dropdown-menu[popover] > .inner {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* A choice longer than the widest list ends in an ellipsis instead of pushing the list sideways (the Schedule's
   Project list scrolled sideways and cut the start of every name, Nov 19, 2026). */
.bootstrap-select > .dropdown-menu[popover] li a,
.bs-container > .dropdown-menu[popover] li a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The search box keeps the shared control height (--a1-control-height); only its padding is tighter. */
.bootstrap-select > .dropdown-menu[popover] .bs-searchbox,
.bs-container > .dropdown-menu[popover] .bs-searchbox {
  padding: 4px 8px;
}

.bootstrap-select > .dropdown-menu[popover] .inner > .dropdown-menu,
.bs-container > .dropdown-menu[popover] .inner > .dropdown-menu {
  position: static;
  display: block;
  overflow: visible !important;
  max-height: none !important;
  margin: 0;
  border: 0;
  box-shadow: none !important;
}
