/* Copied from markdown-slides: the structure reveal.js themes expect, the same rendering */
/* The structure reveal.js themes expect : .reveal > .slides > section. Colors and fonts come from the theme. */

.deck-host {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.reveal {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pinch-zoom;
  font-size: 40px;
  font-weight: normal;
  color: #222;
}

.reveal .slides {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  overflow: visible;
  z-index: 1;
  text-align: center;
  pointer-events: none;
  transform-origin: 50% 50%;
}

.reveal .slides > section,
.reveal .slides > section > section {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.4em;
  pointer-events: auto;
  z-index: 10;
}

.reveal .slides > section[hidden],
.reveal .slides > section > section[hidden] {
  display: none;
}

.reveal .slides > section.stack {
  padding: 0;
  top: 0;
  height: 100%;
  pointer-events: none;
}

.reveal .slides > section.stack > section {
  pointer-events: auto;
}

/* reveal.js resets */
.reveal .slides section *,
.reveal .slides section *::before,
.reveal .slides section *::after {
  box-sizing: border-box;
}

.reveal img,
.reveal video,
.reveal iframe {
  max-width: 95%;
  max-height: 95%;
}

.reveal iframe {
  border: 0;
}

.reveal .stretch,
.reveal .r-stretch {
  max-width: none;
  max-height: none;
}

/* fragments */
.reveal .fragment {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.reveal .fragment.visible {
  opacity: 1;
  visibility: inherit;
}

.reveal .fragment.fade-up { transform: translateY(20%); }
.reveal .fragment.fade-down { transform: translateY(-20%); }
.reveal .fragment.fade-left { transform: translateX(20%); }
.reveal .fragment.fade-right { transform: translateX(-20%); }
.reveal .fragment.grow, .reveal .fragment.shrink, .reveal .fragment.highlight-red, .reveal .fragment.highlight-blue, .reveal .fragment.highlight-green, .reveal .fragment.semi-fade-out, .reveal .fragment.fade-out, .reveal .fragment.strike { opacity: 1; visibility: inherit; }
.reveal .fragment.fade-up.visible, .reveal .fragment.fade-down.visible, .reveal .fragment.fade-left.visible, .reveal .fragment.fade-right.visible { transform: none; }
.reveal .fragment.grow.visible { transform: scale(1.3); }
.reveal .fragment.shrink.visible { transform: scale(0.7); }
.reveal .fragment.fade-out.visible { opacity: 0; visibility: hidden; }
.reveal .fragment.semi-fade-out.visible { opacity: 0.5; }
.reveal .fragment.strike.visible { text-decoration: line-through; }
.reveal .fragment.highlight-red.visible { color: #ff2c2d; }
.reveal .fragment.highlight-green.visible { color: #17ff2e; }
.reveal .fragment.highlight-blue.visible { color: #1b91ff; }
.reveal .fragment.fade-in-then-out:not(.current-fragment) { opacity: 0; visibility: hidden; }
.reveal .fragment.fade-in-then-semi-out.visible:not(.current-fragment) { opacity: 0.5; }

/* backgrounds */
.reveal .backgrounds {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.reveal .slide-background {
  position: absolute;
  inset: 0;
}

.reveal .slide-background video,
.reveal .slide-background iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

/* controls, progress, slide number */
.reveal .controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 110px;
  height: 110px;
  z-index: 11;
  pointer-events: none;
}

.reveal .controls button {
  position: absolute;
  width: 0;
  height: 0;
  padding: 0;
  border: 12px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.1;
  pointer-events: none;
  transition: opacity 0.2s;
}

.reveal .controls button.enabled {
  opacity: 0.7;
  pointer-events: auto;
}

.reveal .controls button.enabled:hover,
.reveal .controls button.enabled:focus-visible {
  opacity: 1;
}

.reveal .controls .navigate-left { left: 0; top: 43px; border-right: 22px solid #2a76dd; border-left: 0; }
.reveal .controls .navigate-right { right: 0; top: 43px; border-left: 22px solid #2a76dd; border-right: 0; }
.reveal .controls .navigate-up { left: 43px; top: 0; border-bottom: 22px solid #2a76dd; border-top: 0; }
.reveal .controls .navigate-down { left: 43px; bottom: 0; border-top: 22px solid #2a76dd; border-bottom: 0; }

.reveal .progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.2);
}

.reveal .progress span {
  display: block;
  height: 100%;
  width: 0;
  background: #2a76dd;
  transition: width 0.4s ease;
}

.reveal .slide-number {
  position: absolute;
  right: 140px;
  bottom: 10px;
  z-index: 31;
  padding: 4px 8px;
  font-family: Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1;
  color: gray;
}

.reveal [hidden] {
  display: none !important;
}

.reveal .pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s;
}

.reveal.paused .pause-overlay {
  opacity: 1;
  visibility: visible;
}

/* ===================================================================================================================
 * Markdown extensions
 */

.reveal pre.code-wrapper code.line-numbers {
  counter-reset: line;
}

.reveal pre code .code-line {
  display: inline-block;
  width: 100%;
}

.reveal pre code.line-numbers .code-line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 2.2em;
  margin-right: 0.8em;
  text-align: right;
  opacity: 0.45;
}

.reveal pre code .dim-line {
  opacity: 0.35;
}

.reveal pre code .highlight-line {
  background: rgba(255, 255, 255, 0.08);
}

.reveal mark {
  background: #ffe066;
  color: inherit;
  padding: 0 0.1em;
}

.reveal .emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.reveal .math-display {
  margin: 0.4em 0;
}

.reveal .katex {
  font-size: 1.05em;
}

.reveal .mermaid-diagram {
  margin: 0.3em auto;
}

.reveal pre.mermaid {
  width: auto;
  margin: 0 auto;
  box-shadow: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.6em;
  line-height: 1.2;
  text-align: center;
}

.reveal pre.mermaid:not([data-processed]) {
  visibility: hidden;
}

.reveal pre.mermaid svg {
  max-width: 100%;
  height: auto;
}

.reveal pre.mermaid-error {
  visibility: visible;
  text-align: left;
  color: #b00020;
  white-space: pre-wrap;
}

.reveal .svg-figure svg {
  max-width: 100%;
  height: auto;
}

/* a terminal window */
.reveal .terminal {
  width: 90%;
  margin: 20px auto;
  border-radius: 8px;
  overflow: hidden;
  background: #1e1f22;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.reveal .terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  background: #3a3c41;
  font-family: Helvetica, sans-serif;
  font-size: 14px;
  color: #c9ccd1;
}

.reveal .terminal-bar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.reveal .terminal-bar i:nth-child(2) { background: #febc2e; }
.reveal .terminal-bar i:nth-child(3) { background: #28c840; }
.reveal .terminal-bar span { margin-left: 8px; }

.reveal .terminal pre.terminal-body {
  width: 100%;
  margin: 0;
  box-shadow: none;
  line-height: 1.35;
}

.reveal .terminal pre.terminal-body code {
  display: block;
  max-height: 480px;
  padding: 12px 16px;
  overflow: auto;
  background: transparent;
  box-shadow: none;
  color: #d7dae0;
  font-size: 0.85em;
  white-space: pre;
}

.reveal .term-prompt { color: #7ee787; }
.reveal .term-command { color: #ffffff; font-weight: bold; }
.reveal .term-output { color: #b5bac1; }

/* themes give inline code a light background : on dark slides its text must stay dark */
.reveal section.has-dark-background :not(pre) > code { color: #1c2430; }

/* callouts */
.reveal blockquote.callout {
  width: 80%;
  padding: 0.4em 0.8em;
  border-left: 6px solid #2a76dd;
  font-style: normal;
  text-align: left;
  background: rgba(42, 118, 221, 0.08);
}

.reveal blockquote.callout .callout-title {
  font-weight: bold;
  font-size: 0.8em;
}

.reveal blockquote.callout-tip { border-color: #2da44e; background: rgba(45, 164, 78, 0.08); }
.reveal blockquote.callout-important { border-color: #8250df; background: rgba(130, 80, 223, 0.08); }
.reveal blockquote.callout-warning { border-color: #d29922; background: rgba(210, 153, 34, 0.1); }
.reveal blockquote.callout-caution { border-color: #cf222e; background: rgba(207, 34, 46, 0.08); }

.reveal input[type="checkbox"] {
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.3em;
}

.reveal li:has(> input[type="checkbox"]) {
  list-style: none;
}

/* a slide drawn small and still */
.static-slide {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--slide-ratio, 960 / 700);
  pointer-events: none;
}

.static-slide .reveal {
  position: absolute;
  inset: 0;
}

.static-slide .fragment {
  transition: none;
}

/* overview, from the markdown-slides player */
.deck-overview {
  position: absolute;
  inset: 0;
  z-index: 150;
  display: flex;
  gap: 18px;
  padding: 28px;
  overflow: auto;
  background: rgba(20, 25, 32, 0.94);
}

.overview-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 220px;
}

.overview-slide {
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.overview-slide.current { border-color: #ffc21a; }
.overview-slide > div { width: 100%; }

.overview-slide span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(20, 25, 32, 0.88);
  color: #eef1f5;
  font-size: 12px;
}

@media (max-width: 600px) {
  .deck-overview { flex-direction: column; padding: 16px; }
  .overview-stack { flex: none; flex-direction: row; overflow-x: auto; }
  .overview-stack .overview-slide { flex: 0 0 200px; }
}
