/* Extras layered on top of the clean reveal.js theme (grantmcdermott/clean) */

.center {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

/* Clean-theme-friendly version of the old .square-box (was dracula-cyan) */
.square-box {
  border-radius: 12px;
  border: 1px solid #d5d5db;
  background-color: #f5f5f7;
  color: #1a1a1a;
  padding: 12px 16px;
  text-align: left;
  font-size: 1em;
}

.reveal img { border-radius: 8px; }
.reveal .slide-number { font-size: 0.7em; }

/* Reusable two-column layout for slides that pair an explanation with a figure.
   Ratio modifiers use flex weights, so Reveal's column gap is included safely. */
.reveal .figure-split {
  display: flex;
  align-items: stretch;
}

.reveal .figure-split > .column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.reveal .figure-split-tall,
.reveal .figure-split-tall > .column {
  min-height: 500px;
}

.reveal .split-balanced > .column {
  flex: 1 1 0;
  width: auto;
}

.reveal .split-52-48 > .column:first-child {
  flex: 52 1 0;
  width: auto;
}

.reveal .split-52-48 > .column:last-child {
  flex: 48 1 0;
  width: auto;
}

.reveal .split-48-52 > .column:first-child {
  flex: 48 1 0;
  width: auto;
}

.reveal .split-48-52 > .column:last-child {
  flex: 52 1 0;
  width: auto;
}

/* UniTrento colour logo, sized for the light theme */
.reveal .slide-logo {
  max-height: unset !important;
  height: 44px !important;
}

/* Placeholder for CONTENT THAT IS STILL MISSING FROM THE SLIDE — a link, a
   number, a figure. Renders as a visible orange box ON THE SLIDE, so the room
   sees it: never use it for your own reminders or for decisions still to make
   (those belong on the Notion project page), and clear every one before you
   present. For notes only you should see, use ::: {.notes} instead — reveal.js
   puts those in speaker view. Usage:
   ::: {.fig-todo}
   **🖼️ Figure TODO —** describe the figure to add.
   :::
   ::: {.todo}
   **📝 TODO —** describe what still has to be filled in.
   ::: */
.fig-todo,
.todo {
  border-left: 8px solid #e8871e;
  background: #fff3e0;
  color: #7a3e00;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82em;
  /* border instead of box-shadow, see .caveat */
  border-top: 1px solid #f6d3a8;
  border-right: 1px solid #f6d3a8;
  border-bottom: 1px solid #f6d3a8;
}

/* A framing aside that IS content — scope limits, "what this is not", caveats.
   Deliberately cool, so it never reads as the orange .todo (which means the slide
   is still missing something). Usage:
   ::: {.fragment}
   ::: {.caveat}
   **What it is *not*** — …
   :::
   ::: */
.caveat {
  border-left: 8px solid #4a6fa5;
  background: #eef2f8;
  color: #22354d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82em;
  /* a border, not a box-shadow: PDF viewers flatten shadows from decktape into a grey frame */
  border-top: 1px solid #d5deeb;
  border-right: 1px solid #d5deeb;
  border-bottom: 1px solid #d5deeb;
}

/* Tables that *are* the content of a slide: full width, roomier cells. Usage:
   ::: {.wide-table style="font-size: 0.8em;"} ... table ... ::: */
.reveal .wide-table table {
  width: 100%;
  margin: 0.2em 0 0.5em 0;
}

.reveal .wide-table th,
.reveal .wide-table td {
  padding: 0.3em 0.55em;
  vertical-align: top;
}

/* Grid-table cells holding bullet lists (multi-line rows): keep them compact so
   the taller rows still fit a slide. Usage: pandoc grid table inside .wide-table */
.reveal .wide-table td ul {
  margin: 0;
  padding-left: 1em;
}

.reveal .wide-table td li {
  margin: 0.08em 0;
  line-height: 1.3;
}

/* Source credits, pinned to the bottom-left of the slide and out of the flow, so they
   never push the content around and always sit in the same place from slide to slide.
   References are written as: Surname, I. et al. (Year). *Title*. Venue.
   One paragraph per reference. Usage:
   ::: {.fig-credit}
   Radford, A. et al. (2021). *Learning transferable visual models from natural language supervision*. ICML.
   :::
   Add .refs-compact when a slide stacks three or more references. */
.reveal .slides section .fig-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;   /* above the footer line and clear of the logo */
  text-align: left;
  font-size: 0.66em;
  opacity: 0.6;
  line-height: 1.4;
  margin: 0;
}

.reveal .slides section .fig-credit p {
  max-width: none;
  margin: 0 0 0.3em;
  text-indent: -1.1em;
  padding-left: 1.1em;
}

.reveal .slides section .fig-credit p:last-child { margin-bottom: 0; }

.reveal .slides section .fig-credit.refs-compact { font-size: 0.58em; }
