/* ============================================================
   TABS — horizontal tab navigation
   Used on Bets (Open / Settled / All), Billing (Charges / Payouts),
   Settings sub-sections, etc.

   Two variants:
   - .tabs--underline (default): bottom-border emphasis, content-driven
   - .tabs--pill: full-rounded pills, marketing-friendly

   Tabs render as <a> for routing or <button> for client-side switching.
   ============================================================ */

.tabs {
  display: flex;
  align-items: stretch;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;          /* overlap parent border */
  transition: color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  font-family: inherit;
}

.tab:hover {
  color: var(--text-primary);
}

.tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

/* Optional count badge — e.g. "Open · 3" */
.tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 var(--space-1);
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.tab--active .tab__count {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

/* ---------- PILL VARIANT ---------- */
.tabs--pill {
  border-bottom: none;
  background: var(--bg-subtle);
  padding: var(--space-1);
  border-radius: var(--radius-md);
  display: inline-flex;
  width: auto;
  margin-bottom: var(--space-5);
}

.tabs--pill .tab {
  padding: var(--space-2) var(--space-4);
  border-bottom: none;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
}

.tabs--pill .tab--active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-bottom: none;
  box-shadow: var(--shadow-xs);
}
