/* HYPERPART: chart-legend */
/* Promoted VERBATIM from Dazzle regions.css (Tier C-a, fleet
 * convergence). The Dazzle emitter contract is unchanged. */

/* ─────────────────────────── chart legend / summary ─────────────
 * Shared across the SVG chart family (line / area / radar). Each
 * chart template renders its own SVG body but ends with a legend
 * row of (swatch + series-name) chips and a summary line of
 * sample/series counts. Single class set instead of duplicating
 * inline `flex flex-wrap gap-x-3 ...` Tailwind across every
 * template. */

.dz-chart-svg,
.dz-line-chart-svg,
.dz-area-chart-svg {
  width: 100%;
  height: auto;
}

/* Radar-specific: long axis labels at the -90°/90° spokes can extend
 * past the SVG viewBox because the rotation pivot of the existing
 * spoke-label markup doesn't perfectly counter-translate. Allow the
 * labels to render past the SVG bounds rather than clipping mid-word
 * (closes #917). The radar SVG is always the rightmost element in its
 * card, and CSS Grid gives each card an isolated overflow region, so
 * letting labels spill past the SVG won't bleed into neighbouring
 * regions.
 *
 * Note: trig-placed labels (per the issue's "option 1") would
 * eliminate the need for this rule entirely. Worth a follow-up; this
 * is the smaller-blast-radius fix while the template still uses the
 * nested-rotate workaround. */
.dz-radar-svg {
  overflow: visible;
}

.dz-chart-legend {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-md);
  row-gap: 0.25rem;
  margin-block-start: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
}

.dz-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dz-chart-legend-swatch {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: var(--radius-sm);
}

.dz-chart-legend-name {
  font-family: var(--font-mono);
}

.dz-chart-summary {
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
  margin-block-start: var(--space-sm);
  font-family: var(--font-mono);
}

/* The dz-chart-degenerate-* fallback family that lived here was DEAD
 * on arrival (Jinja-era shapes retired with ADR-0023; zero emitters in
 * the typed substrate) — dropped rather than published as fake API. */
