/* ============================================================
   NOVARIC® Governance Index Tabs
   Surgical correction — preserves original explorer and detail panel.
   Token: 20260825f
   ============================================================ */

:root {
  --nv-gov-cat-corporate-governance: #30384B;
  --nv-gov-cat-corporate-governance-soft: #EEF0F4;
  --nv-gov-cat-data-protection-and-privacy: #175C8D;
  --nv-gov-cat-data-protection-and-privacy-soft: #EAF3FA;
  --nv-gov-cat-communications-governance: #007FA3;
  --nv-gov-cat-communications-governance-soft: #E8F6FA;
  --nv-gov-cat-employment-governance: #256B4E;
  --nv-gov-cat-employment-governance-soft: #EAF5EF;
  --nv-gov-cat-health-safety-and-wellbeing: #A34918;
  --nv-gov-cat-health-safety-and-wellbeing-soft: #FCF1E9;
  --nv-gov-cat-ethics-fraud-and-misconduct: #9F2D38;
  --nv-gov-cat-ethics-fraud-and-misconduct-soft: #FBEDEF;
  --nv-gov-cat-accessibility: #68439B;
  --nv-gov-cat-accessibility-soft: #F2EDF9;
  --nv-gov-cat-legal-terms-and-regulatory: #6A4C27;
  --nv-gov-cat-legal-terms-and-regulatory-soft: #F6F1E9;
  --nv-gov-cat-document-governance: #536476;
  --nv-gov-cat-document-governance-soft: #EEF2F5;
  --nv-gov-cat-partnership-governance: #0B6B73;
  --nv-gov-cat-partnership-governance-soft: #E8F4F3;
  --nv-gov-cat-regulatory-references: #4A6741;
  --nv-gov-cat-regulatory-references-soft: #EAF0E9;
}

/* ── Tab bar inside the existing document-index panel ───────────── */
.nv-gov-index-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  min-height: 44px;
  padding: 0 8px;
  border-bottom: 1px solid var(--nv-border, #d8dee6);
  background: var(--nv-surface, #ffffff);
  flex-shrink: 0;
}

.nv-gov-index-tabs__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--nv-text-muted, #536476);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.nv-gov-index-tabs__tab:hover {
  color: var(--nv-text, #1e2732);
}

.nv-gov-index-tabs__tab[aria-selected="true"] {
  border-bottom-color: var(--nv-brand-primary, #30384b);
  color: var(--nv-brand-primary, #30384b);
}

.nv-gov-index-tabs__tab:focus-visible {
  outline: 2px solid var(--nv-focus, #009ae4);
  outline-offset: -2px;
}

/* ── Inner list wrapper so tabs and documents share the index panel ─ */
#nv-gov-documents {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

/* ── Category group header in category mode ──────────────────────── */
.nv-gov-cat-group {
  border-bottom: 1px solid var(--nv-border, #d8dee6);
}
.nv-gov-cat-group:last-child {
  border-bottom: none;
}
.nv-gov-cat-group__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: color-mix(in srgb, var(--group-soft, #f4f6f8) 70%, white);
  border-left: 3px solid var(--group-color, var(--nv-border));
}
.nv-gov-cat-group__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--group-color, var(--nv-text-muted));
  margin: 0;
}
.nv-gov-cat-group__count {
  font-size: 0.65rem;
  color: var(--nv-text-muted, #536476);
  margin-left: auto;
}

/* Ensure original doc-item styling remains effective */
.nv-eu-governance__doc-item[data-id] {
  cursor: pointer;
}

@media print {
  .nv-gov-index-tabs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nv-gov-index-tabs__tab { transition: none; }
}
