/* "אזכורים" per year: the hover chart (js/cite-chart.js). Loaded by the shared layout and the
   ruling page. One series, so no legend: the title names it.
   Bar color #1991DC: contrast >= 3:1 on the light surface (#ffffff) and on the dark one
   (#161a20), checked with the dataviz palette validator on 2026-11-16. The lighter brand
   blue (#25A7FF) was 2.5:1 on white, too faint for a mark. */
:root {
  --cite-bar: #1991DC;
}

[data-cite-years] { cursor: default; }

#cite-pop {
  position: fixed; z-index: 1001; top: 0; left: 0;
  width: 300px; max-width: calc(100vw - 16px);
  padding: 10px 12px 8px;
  background: var(--surface, #fff);
  color: var(--text, #0E1013);
  border: 1px solid var(--border, #E7E7E7);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  font-size: 12px; line-height: 1.5;
  opacity: 0; pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
#cite-pop.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
[data-theme="dark"] #cite-pop { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35); }

.cp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cp-title { font-weight: 700; color: var(--text, #0E1013); }
.cp-total { font-weight: 700; color: var(--text, #0E1013); font-variant-numeric: tabular-nums; }

/* Time runs left to right (oldest on the left), as on a chart axis, inside the RTL page. */
.cp-bars {
  display: flex; align-items: stretch; gap: 2px;
  height: 88px; direction: ltr;
  border-bottom: 1px solid var(--border, #E7E7E7);
}
.cp-col { flex: 1 1 0; min-width: 3px; display: flex; align-items: flex-end; }
.cp-bar {
  width: 100%;
  background: var(--cite-bar);
  border-radius: 4px 4px 0 0;
}
.cp-bar.cp-zero { background: transparent; }
.cp-col.on .cp-bar { filter: brightness(0.85); }
[data-theme="dark"] .cp-col.on .cp-bar { filter: brightness(1.25); }
.cp-col.on { background: var(--surface-2, #f5f5f5); border-radius: 3px 3px 0 0; }

.cp-axis {
  display: flex; justify-content: space-between; direction: ltr;
  margin-top: 4px; font-size: 11px; color: var(--text-muted, #616368);
  font-variant-numeric: tabular-nums;
}
.cp-readout { margin-top: 4px; min-height: 18px; color: var(--text-muted, #616368); }

@media (prefers-reduced-motion: reduce) {
  #cite-pop { transition: none; transform: none; }
}
