/**
 * HA Research Console v5.0.43 configurable collection visualisations.
 * Loaded only on supported collection routes.
 */
.had-v5043-visualization {
  --had-viz-accent: #f2bf4c;
  --had-viz-area-opacity: .32;
  min-width: 0;
  width: 100%;
  position: relative;
  display: grid;
  grid-template-areas: "switch actions" "stage stage" "legend legend";
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 6px 4px 2px;
  color: var(--had-viz-accent);
  overflow: hidden;
}
.had-viz-stage { grid-area: stage; min-width: 0; width: 100%; }
.had-viz-svg { display: block; width: 100%; height: auto; max-height: 270px; overflow: visible; color: var(--had-viz-accent); }
.had-viz-grid { stroke: color-mix(in srgb, var(--had-viz-accent) 22%, #173d51); stroke-width: 1; stroke-dasharray: 4 7; }
.had-viz-axis,
.had-viz-period,
.had-viz-value,
.had-viz-axis-title,
.had-viz-reference-label { fill: #7193a2; font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; }
.had-viz-value { fill: #f5ce76; text-anchor: middle; font-weight: 700; }
.had-viz-period { text-anchor: middle; }
.had-viz-axis-title { fill: #89aab7; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.had-viz-line { fill: none; stroke: var(--had-viz-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--had-viz-accent) 34%, transparent)); }
.had-viz-line-thin .had-viz-line { stroke-width: 1.5; }
.had-viz-line-bold .had-viz-line { stroke-width: 5; }
.had-viz-area { fill: color-mix(in srgb, var(--had-viz-accent) calc(var(--had-viz-area-opacity) * 100%), transparent); stroke: none; }
.had-viz-gradient-none .had-viz-area { fill: none !important; }
.had-viz-gradient-solid .had-viz-area { fill: color-mix(in srgb, var(--had-viz-accent) calc(var(--had-viz-area-opacity) * 100%), transparent) !important; }
.had-viz-bar { fill: var(--had-viz-accent); opacity: .86; transform-box: fill-box; transform-origin: bottom; }
.had-viz-lollipop-stem { stroke: color-mix(in srgb, var(--had-viz-accent) 68%, #31596b); stroke-width: 3; }
.had-viz-dot,
.had-viz-marker { fill: #071925; stroke: var(--had-viz-accent); stroke-width: 3; }
.had-viz-marker-solid-circle .had-viz-marker,
.had-viz-marker-circle .had-viz-marker { fill: var(--had-viz-accent); }
.had-viz-marker-circle .had-viz-marker { fill-opacity: .25; }
.had-viz-datum { outline: none; cursor: default; }
.had-viz-datum:focus .had-viz-marker,
.had-viz-datum:focus .had-viz-dot,
.had-viz-datum:hover .had-viz-marker,
.had-viz-datum:hover .had-viz-dot,
.had-viz-datum:focus .had-viz-bar,
.had-viz-datum:hover .had-viz-bar { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 0 8px var(--had-viz-accent)); }
.had-viz-datum.is-latest .had-viz-marker,
.had-viz-datum.is-latest .had-viz-dot,
.had-viz-datum.is-latest .had-viz-bar { stroke-dasharray: 2 2; }
.had-viz-datum.is-maximum .had-viz-marker,
.had-viz-datum.is-maximum .had-viz-dot,
.had-viz-datum.is-maximum .had-viz-bar { filter: drop-shadow(0 0 7px var(--had-viz-accent)); }
.had-viz-datum.is-minimum { opacity: .72; }
.had-viz-color-semantic .had-viz-datum.is-maximum .had-viz-marker,
.had-viz-color-semantic .had-viz-datum.is-maximum .had-viz-dot,
.had-viz-color-semantic .had-viz-datum.is-maximum .had-viz-bar { fill: #34d399; }
.had-viz-color-semantic .had-viz-datum.is-minimum .had-viz-marker,
.had-viz-color-semantic .had-viz-datum.is-minimum .had-viz-dot,
.had-viz-color-semantic .had-viz-datum.is-minimum .had-viz-bar { fill: #fb7185; opacity: 1; }
.had-viz-color-semantic .had-viz-datum.is-latest .had-viz-marker,
.had-viz-color-semantic .had-viz-datum.is-latest .had-viz-dot,
.had-viz-color-semantic .had-viz-datum.is-latest .had-viz-bar { stroke: #22d3ee; stroke-width: 3; }
.had-viz-reference { stroke: #a78bfa; stroke-width: 2; stroke-dasharray: 8 5; }
.had-viz-reference-label { fill: #c5b8fa; }
.had-viz-analysis-line { fill: none; stroke: #36dfc2; stroke-width: 2; stroke-dasharray: 7 5; }
.had-viz-comparison-line { fill: none; stroke: #a78bfa; stroke-width: 2; stroke-dasharray: 3 5; opacity: .86; }
.had-viz-crosshair { stroke: rgba(255,255,255,.45); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.had-viz-category-0 { fill: #22d3ee; }
.had-viz-category-1 { fill: #a78bfa; }
.had-viz-category-2 { fill: #f2bf4c; }
.had-viz-category-3 { fill: #34d399; }
.had-viz-category-4 { fill: #fb7185; }
.had-viz-switch {
  grid-area: switch;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7193a2;
  font: 700 8px ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.had-viz-switch select {
  min-height: 28px;
  padding: 3px 24px 3px 8px;
  border: 1px solid #23566d;
  border-radius: 3px;
  background: #061925;
  color: var(--had-viz-accent);
  font: inherit;
}
.had-viz-actions { grid-area: actions; justify-self: end; display: flex; flex-wrap: wrap; gap: 4px; }
.had-viz-legend { grid-area: legend; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; color: #7797a5; font: 8px ui-monospace,monospace; }
.had-viz-legend span { display: inline-flex; align-items: center; gap: 5px; }
.had-viz-legend i { width: 13px; height: 3px; background: var(--had-viz-accent); }
.had-viz-legend .is-analysis i { height: 0; border-top: 2px dashed #36dfc2; background: none; }
.had-viz-legend-top { grid-template-areas: "legend legend" "switch actions" "stage stage"; }
.had-viz-legend-left { grid-template-areas: "switch actions" "legend stage"; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); }
.had-viz-legend-right { grid-template-areas: "switch actions" "stage legend"; grid-template-columns: minmax(0, 1fr) minmax(110px, auto); }
.had-viz-legend-left .had-viz-legend,
.had-viz-legend-right .had-viz-legend { align-content: center; align-self: stretch; flex-direction: column; justify-content: center; }
.had-viz-legend-left .had-viz-legend { align-items: flex-start; }
.had-viz-legend-right .had-viz-legend { align-items: flex-end; }
.had-viz-legend-compact .had-viz-legend { justify-content: flex-end; font-size: 7px; }
.had-viz-actions button {
  min-width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 3px 6px;
  border: 1px solid #23566d;
  border-radius: 3px;
  background: #061925;
  color: #77a6b8;
  cursor: pointer;
}
.had-viz-actions button > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.had-viz-actions button:hover,
.had-viz-actions button:focus-visible { border-color: var(--had-viz-accent); color: var(--had-viz-accent); outline: 2px solid color-mix(in srgb, var(--had-viz-accent) 45%, transparent); outline-offset: 1px; }
.had-v5043-visualization:fullscreen { width: 100vw; height: 100vh; align-content: center; padding: clamp(20px, 5vw, 70px); background: #03111b; }
.had-v5043-visualization:fullscreen .had-viz-svg { max-height: calc(100vh - 140px); }
.had-viz-animation-subtle .had-viz-line,
.had-viz-animation-standard .had-viz-line { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: hadV5043Line var(--had-viz-duration,700ms) ease-out forwards; }
.had-viz-animation-subtle .had-viz-bar,
.had-viz-animation-standard .had-viz-bar { animation: hadV5043Bar var(--had-viz-duration,700ms) ease-out both; }
.had-viz-animation-standard .had-viz-marker,
.had-viz-animation-standard .had-viz-dot { animation: hadV5043Point var(--had-viz-duration,700ms) ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes hadV5043Line { to { stroke-dashoffset: 0; } }
@keyframes hadV5043Bar { from { transform: scaleY(.02); opacity: .2; } }
@keyframes hadV5043Point { from { transform: scale(.25); opacity: 0; } }

@media (max-width: 782px) {
  .had-v5043-visualization,
  .had-viz-legend-left,
  .had-viz-legend-right { grid-template-areas: "switch" "actions" "stage" "legend"; grid-template-columns: minmax(0,1fr); }
  .had-viz-legend-top { grid-template-areas: "legend" "switch" "actions" "stage"; }
  .had-viz-actions { justify-self: start; }
  .had-viz-svg { min-width: 560px; }
  .had-viz-stage { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .had-viz-legend-left .had-viz-legend,
  .had-viz-legend-right .had-viz-legend { align-items: flex-start; flex-direction: row; justify-content: flex-start; }
  .had-viz-reduce-markers .had-viz-datum.is-mobile-secondary .had-viz-marker { display: none; }
  .had-viz-reduce-grid .had-viz-grid.is-grid-alternate,
  .had-viz-reduce-grid .had-viz-axis.is-grid-alternate { display: none; }
  .had-viz-mobile-labels-compact .had-viz-period:nth-of-type(even),
  .had-viz-mobile-labels-minimal .had-viz-period:not(:first-of-type):not(:last-of-type) { display: none; }
}
@media (max-width: 520px) {
  .had-viz-svg { min-width: 470px; }
  .had-viz-actions button { min-width: 34px; min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .had-viz-svg *, .had-v5043-visualization * { animation: none !important; transition: none !important; }
}
