/* PDS's tooltip trigger fills its parent, so this holds it to the button's size. */
.tooltipTarget {
  display: inline-flex;
  flex-shrink: 0;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--pds-spacing-2xs, 0.25rem);
  flex-shrink: 0;
  height: 2.25rem;
  padding: 0 var(--pds-spacing-s, 0.75rem);
  background: transparent;
  border: 1px solid var(--pds-color-border-default);
  border-radius: 9999px;
  color: var(--pds-color-foreground-default);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.toggle:hover {
  background: var(--pds-color-interactive-background-hover);
}

.toggle:focus-visible {
  outline: 2px solid var(--pds-color-interactive-focus);
  outline-offset: 2px;
}

/* Listed with :hover, which would otherwise outrank it and lighten the pressed pill. */
.active,
.active:hover {
  background: var(--pds-color-interactive-background-selected);
  border-color: var(--pds-color-interactive-focus);
  color: var(--pds-color-interactive-foreground-active);
}

/* ── Compact mobile layout (< 768px) ────────────────────────────────── */

@media (max-width: 767px) {
  .label {
    display: none;
  }

  .toggle {
    padding: 0 var(--pds-spacing-xs, 0.5rem);
  }
}
