/* ============================================================
 * NextGen MIS — Tabs (.ng-tabs)
 * ------------------------------------------------------------
 * Horizontal, underline-style tabs. Use `nav ng-tabs` (drop the
 * Bootstrap `.nav-tabs` skin); the `.active` state is still driven
 * by Bootstrap's data-toggle="tab" JS on the <li>, so no extra JS.
 *
 * Wire the full ARIA tab pattern: role="tablist" on the <ul>,
 * role="tab" + aria-controls + aria-selected on each <a>, and
 * role="tabpanel" + aria-labelledby on each pane. The markup sets
 * the initial aria-selected; refinements.js keeps it in sync on
 * switch (BS3 toggles .active but not ARIA).
 *
 *   <ul class="nav ng-tabs" role="tablist">
 *     <li role="presentation" class="active">
 *       <a href="#tab-x" id="tab-x-tab" role="tab" data-toggle="tab"
 *          aria-controls="tab-x" aria-selected="true">…</a>
 *     </li>
 *   </ul>
 *   <div class="tab-content">
 *     <div id="tab-x" class="tab-pane active" role="tabpanel"
 *          aria-labelledby="tab-x-tab">…</div>
 *   </div>
 * ============================================================ */
.ng-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0 0 var(--space-6) 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--color-border-default);
}
.ng-tabs > li { margin-bottom: -1px; }   /* sit the active underline on the rule */
.ng-tabs > li > a {
  display: block;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-family-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: color var(--motion-fast) var(--ease-standard),
              border-color var(--motion-fast) var(--ease-standard);
}
.ng-tabs > li > a:hover,
.ng-tabs > li > a:focus {
  color: var(--color-text-default);
  border-bottom-color: var(--color-border-strong);
  background: transparent;
}
.ng-tabs > li.active > a,
.ng-tabs > li.active > a:hover,
.ng-tabs > li.active > a:focus {
  color: var(--color-text-strong);
  border-bottom-color: var(--color-brand-secondary);
  background: transparent;
}
.ng-tabs > li > a:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Tab count badge (US-C2.2 #85)
   ---------------------------------------------------------------------------
   Mirrors the geometry of .ng-filter-toggle__count (_filters.css) so the two
   count chips in the app read as one thing; the brand-green fill carries white
   text at ~6.7:1, and both tokens flip in dark mode. ---------------------- */
.ng-tabs__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: var(--space-2);
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--color-brand-secondary-hover);
  color: #fff;
  font-family: var(--font-family-data);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  vertical-align: middle;
}
.ng-tabs__count[hidden] {
  display: none;
}
/* The hint sits under the strip, explaining what the active lane contains. */
.ng-tabs-hint {
  margin: var(--space-3) 0 0;
  color: var(--color-text-muted);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}
