/* ===========================================================================
   icc-explorer.css -- chapter 13's intraclass correlation panel
   (assets/js/icc-explorer.js).

   The container carries `dx cx iccx`: the slider row comes from the .dx rules
   in dist-explorer.css, text from the .cx rules in calc-explorer.css.
   Defined here: the light rules of the y axis, the dashed mean, the purple
   bars (true scores), the grey dots (scores) and their error lines, their
   motion, and the readout line. The static PDF figure uses the same colours
   (chunk correlation-iccpanel-static).

   Nothing here is needed by the PDF build; the LaTeX format never loads css.
   =========================================================================== */

/* The panel spans the text column, edge to edge; the script widens the svg's
   x axis to match, so its text keeps its size. */
.cx.iccx { max-width: none; }

/* the sliders and the row under the picture are centred on the column */
.iccx .dx-params { margin-bottom: 0.3rem; justify-content: center; }

/* text a size up from the .cx defaults, as in chapter 12's panels */
.iccx svg .cx-lb { font-size: 15px; }
.iccx svg .cx-tk { font-size: 13px; }

.iccx svg .iccx-grid { stroke: #ebebeb; stroke-width: 1; }
.iccx svg .iccx-mean { stroke: #000; stroke-width: 1.1; stroke-dasharray: 5 4; }
.iccx svg .iccx-bar  { stroke: #32006e; stroke-width: 2.6; }
.iccx svg .iccx-dot  { fill: #8c8c8c; stroke: #fff; stroke-width: 1; }
.iccx svg .iccx-seg  { fill: #bdbdbd; }

/* a bar, a dot or an error line is moved (and the line stretched) by css
   transforms in svg units, from the svg's origin; the key's samples sit in
   their own small svgs and are never moved */
.iccx svg .iccx-bar, .iccx svg .iccx-dot, .iccx svg .iccx-seg {
  transform-box: view-box;
  transform-origin: 0 0;
  transition: transform 0.5s ease;
}

/* the row under the picture: the key, then the ICC and its value. On a
   narrow column the ICC drops to a second centred line. */
.iccx .iccx-foot {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.25rem 2.2rem; margin-top: 0.45rem; color: #000;
}
.iccx .iccx-key {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.2rem 1.3rem;
}
.iccx .iccx-key > span { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.iccx .iccx-key svg { flex: none; overflow: visible; }
.iccx .iccx-read { white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .iccx svg .iccx-bar, .iccx svg .iccx-dot, .iccx svg .iccx-seg { transition: none; }
}
