/* Subtle pace indicator: a thin line under the slide number.
   Grows left = behind, right = ahead; length = how far off schedule. */
.reveal-pacer-line {
  position: fixed;
  height: 3px;  /* set by JS: thicker the further behind */
  width: 0;
  left: 0;
  top: 0;
  border-radius: 2px;
  opacity: 0;
  transition: left 2s, width 2s, height 2s, opacity 2s, background-color 2s;
  z-index: 30;
  pointer-events: none;
}

.reveal-pacer-line.ahead  { background-color: #4a7bd0; opacity: 0.3; }
.reveal-pacer-line.behind { background-color: #d09a2a; opacity: 0.4; }
.reveal-pacer-line.way    { background-color: #c0392b; opacity: 0.5; }
.reveal-pacer-line.reset  { background-color: #2e9e5b; opacity: 0.7; transition: none; }

/* Countdown in place of the hidden slide number on the title slide;
   font, size and color are copied from the slide number by JS */
.reveal-pacer-clock {
  position: fixed;
  display: none;
  z-index: 31;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* Time left and pace, shown for a few seconds when pressing 'T' */
.reveal-pacer-peek {
  position: fixed;
  display: none;
  z-index: 31;
  pointer-events: none;
  text-align: right;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.reveal-pacer-peek-time {
  font-size: 150%;
  font-weight: bold;
}

@media print {
  .reveal-pacer-line, .reveal-pacer-clock, .reveal-pacer-peek, .reveal-pacer-report { display: none !important; }
}

/* Report of the recorded transitions ('T' then 'S') */
.reveal-pacer-report {
  position: fixed;
  inset: 3vh 3vw;
  display: none;
  z-index: 40;
  overflow: auto;
  padding: 1em 1.5em;
  background: #fff;
  color: #222;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.reveal-pacer-report h2 { font-size: 22px; margin: 0 0 0.3em; }
.reveal-pacer-report h3 { font-size: 17px; margin: 1.2em 0 0.4em; }
.reveal-pacer-report p { margin: 0.3em 0; }
.reveal-pacer-report a { color: #2a5db0; }
.reveal-pacer-report table { border-collapse: collapse; width: 100%; }
.reveal-pacer-report th, .reveal-pacer-report td {
  padding: 2px 8px; border-bottom: 1px solid #e4e4e4; text-align: left; white-space: nowrap;
}
.reveal-pacer-report td:nth-child(2) { white-space: normal; }
.reveal-pacer-report th { position: sticky; top: -1em; background: #fff; }
.reveal-pacer-report td.behind { color: #b9770e; font-weight: bold; }
.reveal-pacer-report td.ahead { color: #2a5db0; font-weight: bold; }
.reveal-pacer-report tr.kind-step td, .reveal-pacer-report tr.kind-step-back td { color: #888; }
.reveal-pacer-report tr.kind-adjust td, .reveal-pacer-report tr.kind-start td { font-style: italic; }
.reveal-pacer-report-close {
  position: sticky; top: 0; float: right;
  border: none; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #666;
}
.reveal-pacer-chart { width: 100%; max-height: 300px; display: block; margin: 0.6em 0 0; }
.reveal-pacer-chart text { font-size: 12px; fill: #666; }
.reveal-pacer-chart line.grid { stroke: #eee; }
.reveal-pacer-chart line.end { stroke: #c0392b; stroke-dasharray: 4 3; }
.reveal-pacer-chart polyline { fill: none; stroke-width: 2; }
.reveal-pacer-chart polyline.plan { stroke: #aaa; stroke-dasharray: 5 4; }
.reveal-pacer-chart circle.plan { fill: #aaa; }
.reveal-pacer-chart polyline.actual { stroke: #2a5db0; }
.reveal-pacer-report .legend { font-size: 12px; color: #666; }
.reveal-pacer-report .legend .plan { color: #999; }
.reveal-pacer-report .legend .actual { color: #2a5db0; }
.reveal-pacer-report .legend .end { color: #c0392b; }
.reveal-pacer-report-btn {
  font: inherit; padding: 3px 12px; border: 1px solid #bbb; border-radius: 4px;
  background: #f6f6f6; color: #222; cursor: pointer;
}
.reveal-pacer-report-btn:hover { background: #eaeaea; }
.reveal-pacer-report-msg { color: #2e9e5b; margin-left: 0.5em; }
