/* Compact choices echo the fill and checkmark of the visit date cards. */
:is(.lg-band .lg-seg, .priority-demo .priority-tabs, .v2-reminder-form .remind-channels) {
  gap: .38rem;
}

:is(.lg-band .lg-seg, .priority-demo .priority-tabs) {
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

:is(.lg-band .lg-seg, .priority-demo .priority-tabs)::before,
:is(.lg-band .lg-seg, .priority-demo .priority-tabs)::after {
  display: none;
}

.lg-band .lg-seg .lg-seg-thumb {
  display: none;
  inset: .15rem auto .15rem 0;
  width: calc(100% / 3);
  border-radius: var(--agys-action-radius);
  pointer-events: none;
}

.lg-band .lg-seg.is-held .lg-seg-thumb {
  display: block;
  z-index: 4;
  opacity: .7;
}

:is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span) {
  --switch-marker-size: 1.05rem;
  --switch-marker-inset: .58rem;
  --switch-marker-center: 50%;
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: var(--agys-action-height);
  padding: .48rem calc(var(--switch-marker-size) + var(--switch-marker-inset) + .35rem) .48rem .6rem;
  border: 1px solid var(--agys-outline);
  border-radius: var(--agys-action-radius);
  background: var(--switch-surface, var(--agys-surface));
  box-shadow: inset 0 1px 0 #ffffff54;
  color: var(--agys-ink);
  font: 700 .86rem/1.2 var(--agys-font);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .18s ease, box-shadow .18s ease;
}

:is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span)::before,
:is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span)::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
  inset-block-start: var(--switch-marker-center);
  pointer-events: none;
}

:is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span)::before {
  inset-inline-end: var(--switch-marker-inset);
  width: var(--switch-marker-size);
  aspect-ratio: 1;
  border: 1px solid var(--switch-marker-border, var(--agys-ink));
  border-radius: 50%;
  background: var(--switch-marker-fill, transparent);
  transform: translateY(-50%);
}

:is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span)::after {
  inset-inline-end: calc(var(--switch-marker-inset) + var(--switch-marker-size) * .34);
  width: calc(var(--switch-marker-size) * .3);
  height: calc(var(--switch-marker-size) * .49);
  border: solid var(--agys-check);
  border-width: 0 2px 2px 0;
  opacity: var(--switch-tick, 0);
  transform: translateY(-60%) rotate(42deg);
}

:is(
  #pick-gym:checked ~ .lg-band .lg-seg label[for="pick-gym"],
  #pick-lyc:checked ~ .lg-band .lg-seg label[for="pick-lyc"],
  #pick-pr:checked ~ .lg-band .lg-seg label[for="pick-pr"],
  #priority-agys:checked ~ .priority-tabs label[for="priority-agys"],
  #priority-other:checked ~ .priority-tabs label[for="priority-other"],
  #priority-two:checked ~ .priority-tabs label[for="priority-two"],
  .v2-reminder-form .remind-channel input:checked + span
) {
  --switch-marker-border: var(--agys-mark);
  --switch-marker-fill: var(--agys-mark);
  --switch-tick: 1;
  border-color: var(--agys-selected-outline);
  background: var(--agys-selected);
  box-shadow: inset 0 1px 0 #ffffff82;
  color: var(--switch-selected-ink, var(--agys-ink));
}

:is(
  #pick-gym:focus-visible ~ .lg-band .lg-seg label[for="pick-gym"],
  #pick-lyc:focus-visible ~ .lg-band .lg-seg label[for="pick-lyc"],
  #pick-pr:focus-visible ~ .lg-band .lg-seg label[for="pick-pr"],
  #priority-agys:focus-visible ~ .priority-tabs label[for="priority-agys"],
  #priority-other:focus-visible ~ .priority-tabs label[for="priority-other"],
  #priority-two:focus-visible ~ .priority-tabs label[for="priority-two"],
  .v2-reminder-form .remind-channel input:focus-visible + span
) {
  outline: 2px solid var(--agys-focus);
  outline-offset: 2px;
  border-radius: var(--agys-action-radius);
  box-shadow: 0 0 0 2px var(--agys-focus-edge);
}

/* Leave the full label width for Czech text on narrow phones. */
@media (max-width: 420px) {
  :is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span) {
    --switch-marker-size: .79rem;
    --switch-marker-inset: .35rem;
    --switch-marker-center: .65rem;
    padding: .99rem .24rem .35rem;
    font-size: .8rem;
  }
}

@media (max-width: 350px) {
  .lg-band .lg-seg label {
    padding-inline: .12rem;
    font-size: .78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span) {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span) {
    --switch-surface: var(--agys-surface-solid);
  }
}

@media (forced-colors: active) {
  :is(.lg-band .lg-seg label, .priority-demo .priority-tabs label, .v2-reminder-form .remind-channel span) {
    --agys-surface: Canvas;
    --agys-surface-solid: Canvas;
    --agys-selected: Highlight;
    --agys-outline: ButtonText;
    --agys-selected-outline: Highlight;
    --agys-ink: ButtonText;
    --agys-focus: Highlight;
    --agys-focus-edge: Canvas;
    --agys-mark: HighlightText;
    --agys-check: Highlight;
    --switch-selected-ink: HighlightText;
    forced-color-adjust: none;
    box-shadow: none;
  }
}
