/*
 * One look across screens (user ruling 2026-11-03, PU-03), linked after legacy's stylesheets, which stay unchanged.
 * Legacy's own CSS gives text boxes and selects different sizes; these rules even them out.
 */

/* Selects and select2 fields as custom.min.css's `.form-control` (42px, #999 border, 13px text). Legacy's hope-ui.js:553
   turns every `.form-select` into a select2 box on load (`placeholder: ""`), the "Show N" per-page selects included, so
   native selects here take that box: 42px and select2's grey triangle (8x5, centred 11px from the right edge). */
.form-select {
  height: 42px;
  padding: 6.5px 20px 6.5px 13px; /* select2__rendered keeps 20px for the arrow */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3e%3cpath d='M0 0h8L4 5z' fill='%23888'/%3e%3c/svg%3e");
  background-position: right 7px center;
  background-size: 8px 5px;
  font-size: 13px;
  line-height: 19.5px;
  color: var(--bs-gray-dark) !important;
  border: 1px solid #999 !important;
  border-radius: 3.25px;
  box-shadow: none;
}
.form-select[multiple] {
  height: auto;
  background-image: none;
}
/* select2 with `placeholder: ""` shows an empty box while the chosen option's value is empty (legacy's "All ..."
   filter options), so the closed select hides its text then; the open list keeps it */
.form-select:not([multiple]):has(option[value=""]:checked) {
  color: transparent !important;
}
/* hope-ui.js's per-id placeholders (lib/select2-placeholders.ts labels the empty option): select2's grey #999 */
.form-select:not([multiple]):has(option[value=""][label]:checked) {
  color: #999 !important;
}
.form-select option {
  color: var(--bs-gray-dark);
}
/* the per-page select: select2 keeps the element's width (80px) and sits inline in its "Show" label */
#itemsPerPage {
  display: inline-block;
  width: 80px;
  vertical-align: middle;
}
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: 42px;
  border: 1px solid #999;
  border-radius: 3.25px;
  font-size: 13px;
}
.select2-container--default .select2-selection--single {
  height: 42px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
  padding-left: 13px;
  color: var(--bs-gray-dark);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
}

/* select2 multiple: text inset like the single box; chips and the placeholder (empty search field) centred in the 42px
   box by the list's padding, so wrapped rows keep select2's 5px spacing. */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: block;
  padding: 4px 8px 7px;
}
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
  margin-top: 5px;
  height: 24px;
  padding-left: 5px;
}

/* File inputs as tall as the other fields (Hope UI's are 34px). */
.form-control[type='file'] {
  height: 42px;
  line-height: 27px; /* legacy adds h-auto (height: auto !important), so the line height sets the 42px */
}

/* Sidebar: every top-level menu icon in one 18px box, so the labels line up (legacy mixes 16, 20 and 24px). */
.sidebar-list > ul > li > a > .icon svg {
  width: 18px;
  height: 18px;
}

/* A gap between the sidebar and the page, so the white header does not run into the white sidebar. */
.main-content {
  padding-left: 1rem;
}
