/* Interactive station charts (wxgraphs.php, WeeWX) -- see charts/weewx-charts.js */

.wxc-root {
  --wxc-surface: #fcfcfb;
  --wxc-text: #0b0b0b;
  --wxc-text-secondary: #52514e;
  --wxc-muted: #898781;
  --wxc-grid: #e1e0d9;
  --wxc-axis: #c3c2b7;
  --wxc-border: rgba(11, 11, 11, 0.10);
  --wxc-series-1: #2a78d6;
  --wxc-series-2: #eb6834;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--wxc-text);
  text-align: left;
}

/* filter row: one row, above everything it scopes */
.wxc-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px 0;
}
#wxc .wxc-filters a.wxc-period,
#wxc .wxc-filters button.wxc-reset {
  font: inherit;
  padding: 4px 12px;
  border: 1px solid var(--wxc-axis);
  border-radius: 4px;
  background: #fff;
  color: var(--wxc-text-secondary);
  text-decoration: none;
  cursor: pointer;
}
#wxc .wxc-filters a.wxc-period:hover,
#wxc .wxc-filters button.wxc-reset:hover {
  background: #f0efec;
  color: var(--wxc-text);
}
#wxc .wxc-filters a.wxc-period[aria-current="true"] {
  background: var(--wxc-text-secondary);
  border-color: var(--wxc-text-secondary);
  color: #fff;
  font-weight: 600;
}
#wxc .wxc-filters button.wxc-reset[hidden] { display: none; }
.wxc-status {
  margin-left: auto;
  color: var(--wxc-muted);
  font-size: 12px;
}
.wxc-hint {
  margin: 0 0 8px 0;
  color: var(--wxc-muted);
  font-size: 12px;
}

.wxc-charts { transition: opacity 0.15s; }
.wxc-charts.wxc-loading { opacity: 0.45; }

.wxc-card {
  position: relative;
  margin: 0 0 12px 0;
  padding: 10px 12px 6px 12px;
  background: var(--wxc-surface);
  border: 1px solid var(--wxc-border);
  border-radius: 6px;
}
.wxc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 4px;
}
.wxc-root .wxc-title {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--wxc-text);
}
.wxc-unit { color: var(--wxc-muted); font-weight: 400; }
.wxc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  color: var(--wxc-text-secondary);
  font-size: 12px;
}
.wxc-key {
  display: inline-block;
  width: 14px;
  height: 0;
  margin-right: 5px;
  border-top: 2px solid currentColor;
  vertical-align: middle;
}
.wxc-key.wxc-key-band {
  height: 8px;
  border-top: none;
  background: currentColor;
  opacity: 0.25;
}
.wxc-key.wxc-key-bar {
  width: 8px;
  height: 8px;
  border-top: none;
  background: currentColor;
  border-radius: 2px 2px 0 0;
}
.wxc-key.wxc-key-dot {
  width: 7px;
  height: 7px;
  border-top: none;
  background: currentColor;
  border-radius: 50%;
}

.wxc-plot { position: relative; }
.wxc-plot .u-select { background: rgba(42, 120, 214, 0.12); }
.wxc-plot .u-cursor-x { border-right: 1px solid var(--wxc-muted); }
.wxc-plot .u-cursor-y { display: none; }
.wxc-empty {
  padding: 30px 0;
  text-align: center;
  color: var(--wxc-muted);
}

/* one tooltip, every series: values lead, labels follow */
.wxc-tip {
  position: absolute;
  z-index: 20;
  top: 4px;
  pointer-events: none;
  min-width: 120px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid var(--wxc-border);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(11, 11, 11, 0.12);
  font-size: 12px;
  white-space: nowrap;
}
.wxc-tip[hidden] { display: none; }
.wxc-tip-date { color: var(--wxc-text-secondary); margin-bottom: 2px; }
.wxc-tip-row { display: flex; align-items: center; gap: 4px; }
.wxc-tip-val { font-weight: 600; color: var(--wxc-text); font-variant-numeric: tabular-nums; }
.wxc-tip-lab { color: var(--wxc-text-secondary); }

/* table view: every value reachable without hovering */
.wxc-data { margin-top: 2px; font-size: 12px; color: var(--wxc-text-secondary); }
.wxc-data summary { cursor: pointer; color: var(--wxc-muted); }
.wxc-data-scroll { max-height: 260px; overflow: auto; margin-top: 4px; }
.wxc-root .wxc-data table {
  border-collapse: collapse;
  width: auto;
  font-variant-numeric: tabular-nums;
}
.wxc-root .wxc-data th,
.wxc-root .wxc-data td {
  padding: 2px 10px 2px 0;
  border: none;
  border-bottom: 1px solid var(--wxc-grid);
  background: none;
  color: var(--wxc-text);
  text-align: right;
  font-weight: 400;
}
.wxc-root .wxc-data th { color: var(--wxc-text-secondary); font-weight: 600; }
.wxc-root .wxc-data th:first-child,
.wxc-root .wxc-data td:first-child { text-align: left; }

