/* ---------- Agenda river widgets (components/metrics.html, "Napirend-folyam, kompakt") ----------
 * The compact versions of the media monitor's agenda river for other pages (each a later Django
 * include): a sidebar card (the 7-day river, the political forces of the last day, the biggest
 * spike) and a full-width strip (the last day as one 100% bar, the 30-day river as a sparkline).
 * Both are experimental: the badge (.nw-lab) is part of the block. narrative-chart.js draws the
 * river from the block's JSON (`[data-narrative-mini]`). The colours of the political forces live
 * here, shared with the media monitor: identity only, never the stance pair; orange, violet and
 * green of the named palette, dimmed in the dark mode, checked for colour vision deficiency in both
 * modes (worst pair ΔE 8.3 dark, 7.8 light, so the names always stand beside the colours). */

.mm-page, .mm-trend, .nw { --force-fidesz: color-mix(in srgb, var(--color-orange) 83%, var(--color-background)); --force-tisza: color-mix(in srgb, var(--color-violet) 83%, var(--color-background)); --force-mi_hazank: color-mix(in srgb, var(--color-green) 83%, var(--color-background)); }
[data-theme="light"] .mm-page, [data-theme="light"] .mm-trend, [data-theme="light"] .nw { --force-fidesz: var(--color-orange); --force-tisza: var(--color-violet); --force-mi_hazank: var(--color-green); }
.mm-c-fidesz { --c: var(--force-fidesz); }
.mm-c-tisza { --c: var(--force-tisza); }
.mm-c-mi_hazank { --c: var(--force-mi_hazank); }

/* The experimental badge: a demo, the method and the look may change */
.nw-lab { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; padding: 2px 6px; border: 1px dashed var(--color-warning-text); border-radius: 3px; color: var(--color-warning-text); font-family: var(--font-mono); font-size: 8px; font-weight: 600; letter-spacing: .08em; white-space: nowrap; }
.nw-lab .icon { font-size: 11px; }

.nw { display: grid; gap: 10px; min-width: 0; padding: 14px 16px; }
.nw-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nw-title { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0 auto 0 0; overflow: hidden; font-family: var(--font-heading); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-overflow: ellipsis; white-space: nowrap; }
.nw-title .icon { color: var(--accent); font-size: 14px; }
.nw-headline { margin: 0; font-family: var(--font-heading); font-size: 15px; font-weight: 500; line-height: 1.35; }
.nw-headline strong { font-weight: 700; }
.nw-river { min-width: 0; height: 84px; }
.nw-river svg { display: block; width: 100%; height: 100%; }
.nw-band { fill: var(--c); opacity: .9; }
.nw-seam { fill: none; stroke: var(--panel); stroke-width: 1.5; }
.nw-spike-dot { fill: var(--c); stroke: var(--panel); stroke-width: 2; }
.nw-axis { display: flex; justify-content: space-between; margin-top: -6px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; }
.nw-caption { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 8px; letter-spacing: .06em; }
.nw-forces { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nw-forces li { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.nw-forces li > i { grid-row: span 2; align-self: stretch; border-radius: 2px; background: var(--c); }
.nw-forces span { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.nw-forces b { grid-row: span 2; font-family: var(--font-heading); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nw-forces small { color: var(--muted); font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; }
.nw-spike { display: grid; gap: 2px; margin: 0; padding: 8px 10px; border-left: 2px solid var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.nw-spike small { color: var(--muted); font-family: var(--font-mono); font-size: 8px; letter-spacing: .06em; }
.nw-spike a { display: -webkit-box; overflow: hidden; color: var(--text); font-family: var(--font-heading); font-size: 13px; font-weight: 600; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.nw-spike a:hover, .nw-more:hover { color: var(--color-primary); }
.nw-more { justify-self: start; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; }
.nw-empty { display: grid; gap: 6px; padding: 14px 0 4px; }
.nw-empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* The strip: lead, the last day as one bar, the 30-day sparkline, the link */
.nw-strip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 150px auto; gap: 18px; align-items: center; }
.nw-strip .nw-lead { display: grid; gap: 6px; min-width: 0; }
/* A narrow lead column puts the badge under the title rather than cutting the title */
.nw-strip .nw-head { flex-wrap: wrap; row-gap: 6px; }
.nw-strip .nw-title { flex: none; max-width: 100%; }
.nw-strip .nw-headline { font-size: 14px; }
.nw-split { display: grid; gap: 6px; min-width: 0; }
.nw-split-bar { display: flex; gap: 2px; height: 14px; overflow: hidden; border-radius: 3px; }
.nw-split-bar i { min-width: 3px; background: var(--c); }
.nw-split-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.nw-split-legend li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.nw-split-legend li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.nw-split-legend b { font-family: var(--font-heading); font-variant-numeric: tabular-nums; }
.nw-spark { display: grid; gap: 4px; }
.nw-spark .nw-river { height: 44px; }
.nw-spark small, .nw-split-day { color: var(--muted); font-family: var(--font-mono); font-size: 8px; letter-spacing: .06em; }
.nw-strip .nw-more { align-self: center; }
.nw-strip.is-empty { grid-template-columns: minmax(0, 1fr) auto; }

/* The strip adapts to its own width: its frame is the container (stacked under 640 px) */
.nw-frame { container-type: inline-size; min-width: 0; }
@container (max-width: 640px) {
  .nw-strip { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
