/* ===== cp_trend_html (HTML form, scoped :where(.cp-trend)) =====
   Card frame, header and mini table come from px-card and the shell's
   complaints_analytics.css. */

:where(.cp-trend) .cp-chart { min-height: 235px; }
:where(.cp-trend) .cp-trend-none {
  display: grid;
  place-items: center;
  min-height: 235px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--px-text-secondary);
}
:where(.cp-trend) .cp-trend-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin: 0 1.25rem 0.9rem;
  font-size: 0.75rem;
}
:where(.cp-trend) .cp-trend-key-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0;
  font: inherit;
  color: var(--px-text-primary);
  background: none;
  border: 0;
  cursor: pointer;
}
:where(.cp-trend) .cp-trend-key {
  flex-shrink: 0;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
:where(.cp-trend) .cp-trend-key-button[aria-pressed="false"] .cp-trend-key { opacity: 0.45; }
:where(.cp-trend) .cp-trend-key-button[aria-pressed="false"] span { text-decoration: line-through; }
:where(.cp-trend) .cp-trend-show-all { font-size: 0.75rem; }

/* The tooltip draws inside the chart mount and can be taller than the card.
   The dependency's `.px-card:has(> .px-card-header) { overflow: hidden }` would
   clip it; `div` lifts this root rule to (0,2,1) to beat that (0,2,0) rule, as
   pe_plot_html.css does. Nothing nearby is positioned, so ApexCharts' own
   tooltip z-index already paints it over the neighbouring cards. */
div.cp-trend.px-card { overflow: visible; }
:where(.cp-trend) .cp-trend-tip { display: grid; gap: 0.25rem; padding: 0.55rem 0.7rem; font-size: 0.75rem; }
:where(.cp-trend) .cp-trend-tip-title { margin-bottom: 0.15rem; font-weight: 600; }
:where(.cp-trend) .cp-trend-tip-line { display: flex; align-items: center; gap: 0.45rem; }
:where(.cp-trend) .cp-trend-tip-line b { margin-left: auto; padding-left: 0.9rem; font-variant-numeric: tabular-nums; }
:where(.cp-trend) .cp-trend-tip-hovered { font-weight: 600; }
:where(.cp-trend) .cp-trend-tip-total { padding-top: 0.25rem; border-top: 1px solid var(--px-border); }

/* Swatches carry an inline colour, so the fallbacks need !important. */
@media print {
  :where(.cp-trend) .cp-trend-key { background: repeating-linear-gradient(45deg, transparent 0 2px, currentColor 2px 3px) !important; }
}
@media (forced-colors: active) {
  :where(.cp-trend) .cp-trend-key {
    border: 2px solid CanvasText;
    background: repeating-linear-gradient(45deg, Canvas 0 2px, CanvasText 2px 3px) !important;
  }
}
