/* Shared by the Astro, React and Vanilla ToggleGroup variants.
   Tabs items (tabs.css) copy the item box and colors below; tests/tabs.test.ts checks they match. */

.exo-toggle-group {
  display: flex;
  gap: var(--exo-space-3, 8px);
}

.exo-toggle-group__item {
  margin: 0;
  padding: var(--exo-space-2, 6px) var(--exo-space-4, 12px);
  font-family: var(--exo-font-family-sans, system-ui, sans-serif);
  font-size: var(--exo-font-size-sm, 14px);
  line-height: var(--exo-font-line-height-snug, 1.25);
  color: var(--exo-color-text, #333333);
  background: var(--exo-color-bg, #ffffff);
  border: var(--exo-border-width-1, 1px) solid var(--exo-color-border-strong, #cccccc);
  border-radius: var(--exo-radius-3, 6px);
  cursor: pointer;
}

.exo-toggle-group__item:hover {
  background: var(--exo-color-bg-hover, rgb(0 0 0 / 0.1));
}

.exo-toggle-group__item[aria-pressed="true"] {
  /* Same fill as a secondary Button: a gradient with a hairline ring. */
  color: var(--exo-button-secondary-text, #333333);
  background: linear-gradient(
    to bottom,
    var(--exo-button-secondary-bg-top, rgb(255 255 255 / 0.42)) 0%,
    var(--exo-button-secondary-bg-bottom, rgb(196 196 196 / 0.46)) 100%
  );
  background-origin: border-box;
  border-color: transparent;
  box-shadow: inset 0 0 0 var(--exo-border-width-1, 1px) var(--exo-button-secondary-ring, rgb(0 0 0 / 0.23));
}

.exo-toggle-group__item:focus-visible {
  outline: var(--exo-border-width-2, 2px) solid var(--exo-color-accent, #2f5fdb);
  outline-offset: var(--exo-border-width-2, 2px);
}
