/* Single-choice fields share the same picker, including inside dialogs and tables. */
.legenda-select {
  position: relative;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}
:root .legenda-select > select {
  appearance: none;
  padding-right: 25px;
  max-width: 100%;
  pointer-events: none;
  text-overflow: ellipsis;
}
:root .legenda-select:has(> .legenda-select-trigger[aria-expanded="true"]) > select {
  border-color: var(--ui-accent, #146b5f);
}
:root .legenda-select-trigger {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted, #53676c);
  font: inherit;
}
.legenda-select-trigger:disabled { cursor: not-allowed; }
.legenda-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 6px;
  height: 6px;
  box-sizing: border-box;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-68%) rotate(45deg);
}
.legenda-select-trigger[aria-expanded="true"]::after {
  color: var(--ui-accent, #146b5f);
  transform: translateY(-28%) rotate(225deg);
}
.legenda-select-value {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.legenda-shop-select {
  flex: 1 1 220px;
  width: min(320px, 28vw);
  min-width: 180px;
  max-width: 360px;
}
.legenda-shop-select > .shop-select { width: 100%; min-width: 0; }
.legenda-theme-select { position: absolute; inset: 0; }
.legenda-theme-select .legenda-select-trigger::after { display: none; }
.theme-picker:has(.legenda-theme-select):focus-within { outline: none; }
.home-select-label .legenda-select > select { width: 100%; }
.legenda-select:has(> [data-home-marketplace]) { --legenda-menu-min: 180; }
.legenda-select:has(> [data-home-days]) { --legenda-menu-min: 118; }
.spp-column-menu fieldset > .legenda-select, .pi-control-fields .legenda-select { display: grid; width: 100%; }
@media (max-width: 760px) {
  .legenda-shop-select { width: 100%; max-width: none; }
}
.legenda-select-menu {
  position: fixed;
  inset: auto;
  width: max-content;
  margin: 0;
  padding: 4px;
  box-sizing: border-box;
  border: 1px solid var(--line, #d9e0df);
  border-radius: 9px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface, #ffffff);
  box-shadow: var(--shadow, 0 10px 32px rgb(25 44 47 / .10));
  color: var(--text, #19292e);
}
.legenda-select-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10px;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
}
.legenda-select-option::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-bottom: 2px;
  border: solid transparent;
  border-width: 0 0 1.7px 1.7px;
  transform: rotate(-45deg);
}
.legenda-select-option:where(:not([aria-disabled="true"],[aria-selected="true"])):is([data-active],:hover) { background: var(--ui-hover, #eef4f2); }
.legenda-select-option[aria-selected="true"] {
  background: var(--ui-accent-soft, #e0f1eb);
  color: var(--ui-accent, #146b5f);
}
.legenda-select-option[aria-selected="true"] { font-weight: 620; }
.legenda-select-option[aria-selected="true"]::after { border-color: currentColor; }
.legenda-select-option[aria-disabled="true"] { opacity: .58; cursor: default; }
.legenda-select-group { padding: 8px 9px 4px; font-size: 12px; font-weight: 600; color: var(--muted, #53676c); }
@media (pointer: coarse) {
  .legenda-select-option { min-height: 44px; }
}
@media (forced-colors: active) {
  .legenda-select-menu { border-color: ButtonText; }
  .legenda-select-option[data-active] { outline: 1px solid Highlight; outline-offset: -2px; }
}
