/* ============================================================================
 * Tabs — the ONE tab strip in the admin. Colors via Korzaro tokens, so dark
 * mode needs no extra rules (tokens flip in html.dark).
 *
 * Consumers: the context-free partial ``templates/admin/_tabs.html`` (Super
 * admin, Settings, Promotion, Inbox) and ``admin/console/_nav.html`` for the
 * channel sections' real tabs. Both emit the same classes, because two strips
 * that look alike but are styled apart drift apart (Mira, 2026-09-01, when the
 * admin briefly had an underlined strip and a segmented one side by side).
 *
 * Visual: an underlined row — the tabs sit directly on a hairline and the
 * active one is marked by an underline, with no pill and no track. A segmented
 * control was tried first and lost: two strips that look alike drift apart, and
 * the underline is the one the rest of the admin already wore.
 *
 * NOT for anchors that scroll within one page — those stay chips (.ohl-chips),
 * because a segmented control promises a selection and anchors never mark one.
 * ========================================================================= */

/* ==========================================================================
 * 9. TABS — flat, indigo, no box; the active one is marked by an underline.
 * ========================================================================== */
/* The strip loses its pill container: in the demo the tabs sit directly on a
   hairline, and the active one is marked by an underline rather than a box. */
.ohl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin-bottom: 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid rgb(var(--ohl-line));
}

.ohl-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  padding: 12px 24px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--ohl-muted));
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s, background-color 0.12s;
  border-bottom: 2px solid transparent;
  background: transparent;
  margin-bottom: -1px;
}

.ohl-tab:hover {
  color: rgb(var(--ohl-accent));
  text-decoration: none;
}

.ohl-tab.is-active {
  background: rgb(var(--ohl-accent-soft));
  color: rgb(var(--ohl-accent));
}

/* Inside a channel's hue scope the active tab wears that channel's colour, the
   same way the active preset in the period switcher does. */
.ohl-hue .ohl-tab.is-active {
  background: rgb(var(--ohl-hue-bg));
  color: rgb(var(--ohl-hue));
}

/* Count — a number riding beside the label, not a badge of its own. */
.ohl-tab-count {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  opacity: 0.75;
}

/* Mobile — narrower tabs so a multi-tab strip fits, but not SHORTER ones.
   `padding: 0` left the item at its line height: 19 px of touch target, and
   with the strip's -1px underline offset two wrapped rows overlapped by a
   pixel — in Propagace "Historie" sat glued under "Přehled" (Codex audit,
   6. 9. 2026, Q03). The horizontal padding still shrinks, which is what
   actually fits more of them on a line; the vertical padding is what makes
   the tab something a thumb can hit. */
@media (max-width: 1023px) {
  .ohl-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .ohl-tab {
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px;
    font-size: 14px;
    flex-shrink: 0;
    gap: 4px;
  }
}

/* Both selectors are restated at the specificity of the rules they replace —
   the hue variant in admin_tabs.css carries an extra class and would otherwise
   keep painting its own filled box. */
.ohl-tab.is-active, .ohl-hue .ohl-tab.is-active {
background: transparent;
  border-bottom-color: rgb(var(--ohl-hue, var(--ohl-accent)));
  color: rgb(var(--ohl-hue, var(--ohl-accent)));
}
