@layer components {
  /* A full-width pill label wrapping an sr-only radio, for dark surfaces. */
  .selector-option {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    block-size: calc(var(--spacing) * 14);
    border-radius: 9999px;
    background-color: var(--color-surface-dark-high);
    color: var(--color-content-on-dark);
    font-family: var(--typo-meta-family);
    font-size: var(--typo-meta-size);
    font-weight: var(--typo-meta-emphasis-weight);
    line-height: var(--typo-meta-lh);
  }

  /* srgb rather than oklab so the mix matches how Figma composites the 20% tint. */
  .selector-option:not(:has(input:checked)):hover {
    background-color: color-mix(in srgb, var(--color-himalayan-salt) 20%, var(--color-surface-dark));
  }

  .selector-option:has(input:checked) {
    background-color: var(--color-surface-light);
    color: var(--color-content-on-light);
  }

  .selector-option:has(input:focus-visible) {
    outline: 2px solid var(--color-content-on-dark);
    outline-offset: 2px;
  }

  .selector-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.4;
  }
}
