.choice-field {
  position: relative;
  inline-size: 100%;
  min-inline-size: 0;
}

.app-shell .choice-field > input[type="text"] { padding-inline-end: 39px; }

.choice-toggle {
  position: absolute;
  inset: 3px 3px 3px auto;
  display: grid;
  place-items: center;
  inline-size: 34px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #58645d;
}

.choice-toggle::before {
  inline-size: 7px;
  block-size: 7px;
  margin-block-start: -3px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: rotate(45deg);
  content: "";
}

.choice-toggle:hover, .choice-field:has([aria-expanded="true"]) .choice-toggle {
  background: #eff3ed;
  color: #315140;
}

.choice-field:has([aria-expanded="true"]) .choice-toggle::before {
  margin-block-start: 3px;
  transform: rotate(225deg);
}

.choice-popup {
  position: absolute;
  z-index: 22;
  inset: calc(100% + 5px) 0 auto;
  max-block-size: 264px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px;
  border: 1px solid #dae1d8;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 11px 27px rgb(32 52 37 / 12%), 0 2px 6px rgb(32 52 37 / 6%);
  color-scheme: light;
}

.choice-popup-up { inset-block: auto calc(100% + 5px); }
.choice-popup[hidden], .choice-empty[hidden] { display: none; }
.choice-options { margin: 0; padding: 0; list-style: none; }

.choice-options > li {
  min-block-size: 35px;
  padding: 7px 9px;
  border-radius: 5px;
  line-height: 1.4;
  cursor: pointer;
}

.choice-options > li[aria-selected="true"] { color: #314e3d; font-weight: 660; }
.choice-options > li:hover, .choice-options > .choice-active { background: #edf3ec; color: #2a4a39; }
.choice-empty { margin: 0; padding: 7px 9px; color: var(--muted); font-size: 12px; }

@media (pointer: coarse) {
  .choice-options > li { min-block-size: 44px; }
}

@supports (appearance: base-select) {
  .app-shell :is(.field, .equipment-filter) select:not([multiple]):not([size]),
  .app-shell :is(.field, .equipment-filter) select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }

  .app-shell :is(.field, .equipment-filter) select:not([multiple]):not([size]) {
    justify-content: space-between;
    gap: 5px;
    padding-inline-end: 10px;
    background-image: none;
    color-scheme: light;
  }

  .app-shell :is(.field, .equipment-filter) select:not([multiple]):not([size])::picker(select) {
    max-block-size: min(48dvh, 264px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 4px;
    border: 1px solid #dae1d8;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 11px 27px rgb(32 52 37 / 12%), 0 2px 6px rgb(32 52 37 / 6%);
    color-scheme: light;
  }

  .app-shell :is(.field, .equipment-filter) select:not([multiple]):not([size]) option {
    min-block-size: 35px;
    padding: 7px 9px;
    border-radius: 5px;
  }

  .app-shell :is(.field, .equipment-filter) select:not([multiple]):not([size]) option:is(:hover, :focus-visible):not(:disabled) {
    background: #edf3ec;
    color: #2a4a39;
  }

  .app-shell :is(.field, .equipment-filter) select:not([multiple]):not([size]) option:checked {
    color: #314e3d;
    font-weight: 660;
  }
}
