/*
 * chart-donut.css — Donut wrap + legend (classes .arh-donut-*)
 *
 * Proveniência: apps/analytics-rh/pages/_internal/styles/_chart_donut.py
 *   Story 2.0-A.3 · proto A linhas 372-397
 *   Source HTML: prototipos/2026-05-06-shell-rebrand/a-topbar-pills.html
 *
 * Extraído R-2 CSS pipeline 2026-05-25 — byte-identical ao CSS block
 * original (Art. IV Constitution — zero invenção).
 *
 * Tokens consumidos: --text-secondary, --text-primary
 *
 * ATENÇÃO: este arquivo cobre o namespace .arh-donut-* (componente genérico).
 * O island donut_painel_bi.py (R-1.14) usa namespace .arh-pbi-* distinto,
 * definido em painel_bi_visual.py (canônico V-01). Os dois namespaces
 * coexistem sem sobreposição.
 *
 * Hex inventário: 1 ocorrência — #8FA2D5 (AMS.PY, validado AA dark 6.48:1,
 * documentado em projeto_analytics_rh_painel_bi_n2_consolidado).
 */

/* ── Donut + Legend (proto-A linhas 372-397) ──────────────────────── */
.arh-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 4px 0;
}
@media (max-width: 480px) {
  .arh-donut-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}
.arh-donut-svg {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}
.arh-donut-legend {
  flex: 1;
  min-width: 0;
}
.arh-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.arh-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.arh-legend-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arh-legend-val {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-primary);
  font-feature-settings: 'tnum' 1;
}

/* AMS.PY visibility — garantia explícita de visibilidade no legend para grupos
   pequenos.

   ⚠ 2026-08-09: era o literal #8FA2D5, congelado aqui desde a research §2.2
   (que o mediu em 6,48:1 sobre o card DARK). O FIX-A2 depois trocou o canônico
   para #5A6BAA justamente porque o #8FA2D5 cai para 2,21:1 sobre o card LIGHT
   (#F2EFE9) — passava num tema e reprovava no outro. Esta cópia não recebeu o
   fix e ficou apontando para a cor vencida. Agora lê o token, que styles_loader
   emite no :root derivado de GRUPO_CORES['AMS.PY']. */
.arh-legend-item--ams-py .arh-legend-dot {
  background: var(--g-py);
}
