/* Shared by the Astro, React and Vanilla Tabs variants. */

/* A bordered row of links. Each item has the same box as a ToggleGroup item
   (padding, type, border width and radius), so a tab and a toggle button are
   the same height; keep the two in step (tests/tabs.test.ts checks this). */
.exo-tabs {
  display: inline-flex;
  gap: var(--exo-space-0-5, 2px);
  padding: var(--exo-space-0-5, 2px);
  background: var(--exo-color-bg, #ffffff);
  border: var(--exo-border-width-1, 1px) solid var(--exo-color-border, #dddddd);
  /* The item radius plus the padding, so the corners stay concentric. */
  border-radius: calc(var(--exo-radius-3, 6px) + var(--exo-space-0-5, 2px));
}

.exo-tabs--stretch {
  display: flex;
}

.exo-tabs--stretch > .exo-tabs__item {
  flex: 1;
}

.exo-tabs__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);
  text-align: center;
  text-decoration: none;
  border: var(--exo-border-width-1, 1px) solid transparent;
  border-radius: var(--exo-radius-3, 6px);
}

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

.exo-tabs__item[aria-current="page"] {
  /* 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-tabs__item:focus-visible {
  outline: var(--exo-border-width-2, 2px) solid var(--exo-color-accent, #2f5fdb);
  outline-offset: var(--exo-border-width-2, 2px);
}
