/* Shared chart chrome (js/charts.js zoom helpers): the zoom / info toolbar in a chart's top-right corner and drag cursors.
   Desktop: the bar shows while the pointer is over the chart (or it has focus). Touch screens: hidden, so it never covers
   data; a small corner button (.cz-tog) or a long press on the chart shows it (.open), a tap elsewhere hides it. */
.cz { position: relative; }
.cz.cz-x { touch-action: pan-y; }
.cz.cz-s { touch-action: pan-x pan-y; }
.cz.cz-drag, .cz.cz-drag * { cursor: grabbing !important; user-select: none; }
.cz-bar {
  position: absolute; z-index: 6; top: var(--cz-top, 6px); right: var(--cz-right, 6px);
  display: flex; align-items: center; gap: 1px; padding: 2px; border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.cz:hover > .cz-bar, .cz:focus-within > .cz-bar, .cz-bar.pin, .cz-bar.info { opacity: 1; pointer-events: auto; }
.cz-bar > button {
  display: grid; place-items: center; width: 24px; height: 22px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.cz-bar > button:hover, .cz-bar > button:focus-visible { background: var(--hover); color: var(--text); outline: none; }
.cz-bar > button svg { width: 14px; height: 14px; }
.cz-bar.nozoom > .cz-in, .cz-bar.nozoom > .cz-out, .cz-bar.nozoom > .cz-home, .cz-bar.noinfo > .cz-i, .cz-bar.noinfo > .cz-pop { display: none; }
.cz-bar.nozoom.noinfo { display: none; }
.cz-bar.cz-inline { position: relative; top: auto; right: auto; margin-left: auto; opacity: 1; pointer-events: auto; box-shadow: none; }
.cz-bar:not(.zoomed) > .cz-home { opacity: 0.45; }
.cz-bar.info > .cz-i, .cz-bar.pin > .cz-i { color: var(--accent); }
.cz-pop {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; width: max-content; max-width: min(340px, 86vw);
  padding: 9px 11px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  color: var(--text-2, var(--muted)); font-size: 12px; line-height: 1.65; text-align: left; white-space: normal; pointer-events: auto;
}
.cz-pop p { margin: 0 0 4px; } .cz-pop p:last-child { margin: 0; }
.cz-pop b { color: var(--text); font-weight: 600; }
.cz-bar.info > .cz-pop { display: block; }
.cz-tog {
  display: none; position: absolute; z-index: 6; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; place-items: center;
  border-radius: 50%; border: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 85%, transparent); color: var(--faint);
}
.cz-tog svg { width: 13px; height: 13px; }
@media (hover: none) {
  .cz.cz-on > .cz-tog { display: grid; }
  .cz > .cz-tog.on { visibility: hidden; }
  .cz > .cz-bar { top: 4px; right: 4px; }
  .cz > .cz-bar:not(.open), .cz:hover > .cz-bar:not(.open), .cz:focus-within > .cz-bar:not(.open) { opacity: 0; pointer-events: none; }
  .cz > .cz-bar.open { opacity: 1; pointer-events: auto; }
  .cz-bar > button { width: 30px; height: 26px; }
}
