/* ─────────────────────────────────────────────────────────────
   annotate.css — present-mode annotation overlay. Pairs with annotate.js.

   Active ONLY while `body.presenting`, so it never touches the normal
   reading view. The canvas sits above the present-mode chrome and defaults
   to `pointer-events:none` so clicks on cards, tabs and figures pass
   straight through until the pen is switched on.

   Ported from reference/workshop-finance/annotate.css; the toolbar is
   re-tinted to the Synapxe palette and the ink swatches are chosen for a
   LIGHT page (see annotate.js for why the source's yellow was dropped).
   ───────────────────────────────────────────────────────────── */

/* The ink layer. Fixed and full-viewport so clientX/clientY map 1:1 onto it.
   `display:none` until present mode; `pointer-events:none` until the pen is
   on, so the page stays fully interactive while presenting. */
.pm-annotate-canvas {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  pointer-events: none;
  touch-action: none;
}
body.presenting .pm-annotate-canvas { display: block; }
body.pm-annotating .pm-annotate-canvas { pointer-events: auto; cursor: crosshair; }

/* The toolbar. Only shown while the pen is on, so a clean slide has nothing
   on it. Dims to near-invisible after a few seconds without drawing, and
   wakes on any tool change or hover. Sits just above the present dock. */
.pm-annotate-bar {
  position: fixed;
  left: 50%;
  bottom: 68px;
  transform: translateX(-50%);
  z-index: 2100;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(11, 5, 20, .88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 10px 34px rgba(11, 5, 20, .45);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: #fff;
  transition: opacity .35s ease;
  user-select: none;
}
body.pm-annotating .pm-annotate-bar { display: flex; }
.pm-annotate-bar.idle { opacity: .14; }
.pm-annotate-bar:hover { opacity: 1; }

.pm-annotate-bar .pm-ab-sw {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28);
  padding: 0; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.pm-annotate-bar .pm-ab-sw:hover { transform: scale(1.12); }
.pm-annotate-bar .pm-ab-sw.on {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .45);
}

.pm-annotate-bar .pm-ab-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: transparent;
  color: #fff;
  font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.pm-annotate-bar .pm-ab-btn:hover { background: rgba(255, 255, 255, .12); }
.pm-annotate-bar .pm-ab-btn.on {
  background: #fff;
  color: #2E1065;
  border-color: #fff;
}

.pm-annotate-bar .pm-ab-sep {
  width: 1px; height: 22px;
  background: rgba(255, 255, 255, .18);
}
.pm-annotate-bar .pm-ab-hint {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .06em;
  color: #A78BFA;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .pm-annotate-bar,
  .pm-annotate-bar .pm-ab-sw,
  .pm-annotate-bar .pm-ab-btn { transition: none; }
  .pm-annotate-bar.idle { opacity: 1; }
}
