/* Animation and widget styles for notes that also build a slide deck (one source, note + deck, through
   _filters/deck-note.lua). First used by courses/sfm/sfm-slides/fg-series.qmd: its auto-animate equation
   rows, the crank table, and the two SVG widgets drawn by img/js/fg-series-widgets.js.

   To use it in another page, add to its YAML (path relative to the page):
       css: ../../../styles/deck-animation.css

   Rules under .reveal apply to the deck only. The widget rules (.widget, .widget-svg, .widget-label,
   .widget-small, .widget-tick, .widget-bar) apply to both the note and the deck: put class="widget" on the
   container, and have the script give its SVG, text and control bar the other classes.
   Colours are the _manstyle palette: maroon = r terms, blue = v terms, amber = terms that vanish.
   Rotating-frame deck (02-rotating-frames.qmd), same palette (sfm-slides/codes/_palette.py): blue = omega-cross
   terms (.om), amber = centrifugal (.cen), purple = Euler term (.eul), black = relative quantities. */

/* one equation, split into terms that Reveal's auto-animate can move individually */
.reveal .eqrow {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0.3em;
  margin: 0.7em 0;
  font-size: 1.05em;
}
.reveal .eqrow > span { display: inline-block; white-space: nowrap; }
.reveal .rt   { color: #6b1f1f; }
.reveal .vt   { color: #2f5ea8; }
.reveal .pt   { color: #b45309; }
.reveal .om   { color: #2f5ea8; }
.reveal .cen  { color: #b45309; }
.reveal .eul  { color: #7e22ce; }
.reveal .eqrow.tight { font-size: 0.85em; }
/* a small figure in the top right corner of a slide; the text wraps round it */
.reveal .corner-fig { float: right; width: 30%; margin: 0 0 0.5em 1em; }
.reveal .corner-fig img { width: 100%; display: block; }
.reveal .dim  { opacity: 0.12; }
.reveal .gone { opacity: 0; font-size: 0.3em; }
.reveal .bx   { border: 1.5px solid currentColor; padding: 0.1em 0.45em; }
.reveal .why  { font-size: 0.8em; color: #555; text-align: center; }

/* the crank table: cells that fade in, and the sources of the newest row lit up */
.reveal .crank td, .reveal .crank th { padding: 0.25em 0.9em; }

/* widgets: used by the deck AND by the note, so no .reveal prefix */
.widget { width: 100%; margin: 0 auto; }
.widget-svg { width: 100%; height: auto; display: block; }
.widget-label   { font-size: 21px; fill: #2b2b2b; }
.widget-small { font-size: 17px; fill: #2b2b2b; }
.widget-tick  { font-size: 15px; fill: #555; }
.widget-bar { display: flex; flex-wrap: wrap; gap: 0.5em; justify-content: center; align-items: center; margin: 0.3em 0 0.6em; }
.widget-bar button {
  font: inherit; font-size: 0.85rem; padding: 0.15em 0.7em; border-radius: 4px;
  border: 1px solid #6b1f1f; background: #fffdf7; color: #6b1f1f; cursor: pointer;
}
.widget-bar button.on { background: #6b1f1f; color: #fffdf7; }
.widget-bar input[type=range] { width: 40%; accent-color: #6b1f1f; }
.reveal .widget-bar button { font-size: 0.55em; }
