/* Single-choice fields in Hub and Billing registration drawers. */
@supports (appearance: base-select) and selector(::picker(select)) {
  :where(.registry-drawer, .rule-editor-drawer) select:not([multiple]):is(:not([size]), [size="0"], [size="1"]),
  :where(.registry-drawer, .rule-editor-drawer) select:not([multiple]):is(:not([size]), [size="0"], [size="1"])::picker(select) {
    appearance: base-select;
  }

  :where(.registry-drawer, .rule-editor-drawer) select::picker(select) {
    margin-block: 4px;
    max-block-size: min(20rem, calc(100dvh - 16px));
    max-inline-size: calc(100vw - 16px);
    padding: 5px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line, #d7e3ea);
    border-radius: 14px;
    background: var(--surface, white);
    color: var(--ink, #102b3a);
    box-shadow: 0 12px 32px rgb(7 21 29 / 16%);
    font: inherit;
  }

  :where(.registry-drawer, .rule-editor-drawer) select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) option {
    min-block-size: 32px;
    padding: 6px 10px;
    border-radius: 9px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  :where(.registry-drawer, .rule-editor-drawer) select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) option:is(:hover, :focus-visible, :checked):not(:disabled) {
    color: var(--blue-deep, #0879c7);
    background: var(--blue-soft, #e8f7fd);
  }
}

.hub-registry-select-menu {
  position: fixed;
  z-index: 10000;
  inset: auto;
  box-sizing: border-box;
  margin: 0;
  padding: 5px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line, #d7e3ea);
  border-radius: 14px;
  background: var(--surface, white);
  color: var(--ink, #102b3a);
  box-shadow: 0 12px 32px rgb(7 21 29 / 16%);
}
.hub-registry-select-menu [role="option"] {
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.hub-registry-select-menu [role="option"]:is(:hover, [data-active], [aria-selected="true"]):not([aria-disabled]) {
  color: var(--blue-deep, #0879c7);
  background: var(--blue-soft, #e8f7fd);
}
.hub-registry-select-menu [aria-selected="true"]::before { content: "✓"; }
.hub-registry-select-menu [aria-disabled] { color: var(--muted, #66737b); cursor: default; }
.hub-registry-select-group { padding: 5px 10px; color: var(--muted, #66737b); font-weight: 700; }
@media (forced-colors: active) {
  .hub-registry-select-menu [data-active] { outline: 1px solid Highlight; outline-offset: -2px; }
}
