/* Shared single-choice fields for the app, public site and calendar shadow root. */
select:not([multiple], [size]:not([size="1"])) {
  --select-paper: var(--gd-paper-0, var(--card, #fff));
  --select-ink: var(--gd-ctl-idle-ink, var(--ink, #172126));
  --select-edge: var(--gd-paper-300, var(--line, #c9d1d5));
  --select-radius: var(--gd-shape-control, 4px 16px 16px 16px);
  --select-ring: var(--gd-ctl-ring, var(--chrome, #192321));
  --select-hover: var(--gd-ctl-hover, var(--wash, #f3f5f7));
  --select-active: var(--gd-action-bg, var(--lime, #d4ee68));
  --select-active-ink: var(--gd-action-ink, var(--action-ink, #23300e));

  border-radius: var(--select-radius) !important;
  border: 1px solid var(--select-edge) !important;
  background-color: var(--select-paper) !important;
  color: var(--gd-select-value-ink, var(--select-ink)) !important;
  line-height: 1.25;
  cursor: pointer;
}

select:not([multiple], [size]:not([size="1"])):focus-visible {
  outline: 2px solid var(--select-ring);
  outline-offset: 2px;
}

select:not([multiple], [size]:not([size="1"])):disabled {
  opacity: .65;
  cursor: not-allowed;
}

@supports (appearance: base-select) and selector(::picker(select)) {
  select:not([multiple], [size]:not([size="1"])),
  select:not([multiple], [size]:not([size="1"]))::picker(select) {
    appearance: base-select !important;
  }

  select:not([multiple], [size]:not([size="1"])) {
    align-items: center;
    gap: 6px;
    padding-inline-end: var(--gd-select-end, 12px) !important;
  }

  select:not([multiple], [size]:not([size="1"]))::picker-icon {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border: solid var(--select-ink);
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg);
  }

  select:not([multiple], [size]:not([size="1"])):open::picker-icon {
    transform: translateY(2px) rotate(225deg);
  }

  select:not([multiple], [size]:not([size="1"]))::picker(select) {
    box-sizing: border-box;
    min-inline-size: min(13rem, calc(100vw - 24px));
    max-inline-size: min(26rem, calc(100vw - 24px));
    max-block-size: min(24rem, 55dvh);
    margin-block: 5px;
    padding: 5px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    border: 1px solid var(--select-edge);
    border-radius: var(--select-radius);
    background: var(--select-paper);
    color: var(--select-ink);
    box-shadow: 0 10px 28px rgb(23 33 38 / 18%);
  }

  select:not([multiple], [size]:not([size="1"])) option {
    align-items: center;
    gap: 8px;
    min-block-size: 38px;
    padding: 8px 10px;
    border-radius: 3px 9px 9px 9px;
    font-size: .875rem;
    color: var(--select-ink);
    white-space: normal;
  }

  select:not([multiple], [size]:not([size="1"])) option:is(:hover, :focus-visible) {
    background: var(--select-hover);
    outline-offset: -2px;
  }

  select:not([multiple], [size]:not([size="1"])) option:checked {
    background: var(--select-active);
    color: var(--select-active-ink);
    font-weight: 650;
  }

  select:not([multiple], [size]:not([size="1"])) option::checkmark {
    order: 1;
    margin-inline-start: auto;
  }

  select:not([multiple], [size]:not([size="1"])) option:disabled { opacity: .6; }

  @media (pointer: coarse) {
    select:not([multiple], [size]:not([size="1"])) option { min-block-size: 44px; }
  }
}
