/* my-gui charts: what js/charts.js draws inside the frame (step 375).
   The frame, axis text, gridlines and the tooltip box are in layout.css (373b); here: tooltip rows,
   the hover state and the D271 running curve. */

/* tooltip rows: a colour square, the name, the value */
.m-chart-tip .m-tip-row { display: flex; align-items: center; gap: 7px; }
.m-chart-tip .m-tip-row::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.m-chart-tip .m-tip-row span { flex: 1 1 auto; }
.m-chart-tip .m-tip-row em { margin-left: 10px; font-style: normal; font-weight: 800; color: var(--m-text); font-variant-numeric: tabular-nums; }

/* hover: the other bars / slices step back */
:is(.m-chart, .m-chart-plot) svg.is-hovering .m-mark:not(.is-hot) { opacity: .45; }
:is(.m-chart, .m-chart-plot) svg .m-crosshair, :is(.m-chart, .m-chart-plot) svg circle[visibility] { pointer-events: none; }

/* the running curve over the bars (yearchart "exact", D271) */
:root {
  --m-trace-glow: rgb(40,110,230);
  --m-trace-glow-op: .3;
  --m-trace: #FFFFFF;
  --m-trace-shadow: drop-shadow(0 0 1.5px rgba(30,90,200,.9)) drop-shadow(0 0 4px rgba(40,110,230,.7));
}
:root[data-theme="dark"] {
  --m-trace-glow: rgb(110,175,255);
  --m-trace-glow-op: .38;
  --m-trace: rgb(244,249,255);
  --m-trace-shadow: drop-shadow(0 0 1.5px rgb(170,215,255)) drop-shadow(0 0 4px rgba(120,180,255,.9));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="beige"]) {
    --m-trace-glow: rgb(110,175,255);
    --m-trace-glow-op: .38;
    --m-trace: rgb(244,249,255);
    --m-trace-shadow: drop-shadow(0 0 1.5px rgb(170,215,255)) drop-shadow(0 0 4px rgba(120,180,255,.9));
  }
}
.m-bar-trace-glow { fill: none; stroke: var(--m-trace-glow); stroke-width: 7px; opacity: var(--m-trace-glow-op); filter: blur(3px); stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.m-bar-trace { fill: none; stroke: var(--m-trace); stroke-width: 1.6px; filter: var(--m-trace-shadow); stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.m-bar-cut { pointer-events: none; }
