/* The app's Tabs (built here): a row of links on a line, the current one in bold under a turquoise bar. On a phone the row
   scrolls sideways, without a scrollbar. A row that scrolls clips what reaches outside it, so the line, the bar and the
   focus ring are all drawn inside each box: the line as an inset shadow under the tabs, the ring inset in the tab. Each
   tab has a little room on its sides for the ring; the first one gives it back to the row's own padding, so its words
   line up with what is above. */
.wi-tabs {
  box-shadow: inset 0 calc(-1 * var(--border-1)) 0 var(--wi-app-canvas-edge, var(--border-default)); /* on the app canvas, its edge colour (surface.css) */
  font-family: var(--font-family-sans);
  overflow-x: auto;
  scrollbar-width: none;
}

.wi-tabs::-webkit-scrollbar {
  display: none;
}

.wi-tabs__list {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.wi-tabs__tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-sizing: border-box;
  min-height: var(--size-control-md);
  padding-inline: var(--space-2);
  border-bottom: var(--space-0-5) solid transparent;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  line-height: var(--font-line-height-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  white-space: nowrap;
}

.wi-tabs__item:first-child .wi-tabs__tab {
  margin-inline-start: calc(-1 * var(--space-2));
}

.wi-tabs__tab[data-hovered] {
  color: var(--text-primary);
}

.wi-tabs__tab[data-focus-visible] {
  outline: none;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 var(--border-2) var(--border-focus);
}

.wi-tabs__tab[aria-current="page"] {
  border-bottom-color: var(--brand-secondary-bg);
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

/* A section's count is a quiet grey pill, turquoise on the current one. */
.wi-tabs__tab .wi-badge--count {
  background-color: var(--gray-100);
  color: var(--text-secondary);
}

.wi-tabs__tab[aria-current="page"] .wi-badge--count {
  background-color: var(--turquoise-100);
  color: var(--turquoise-900);
}
