/* =====================================================================
   presentation.css — shared styles for the 2RE Factory PDF slide decks.
   Used by template.html and every deck page created from it (duo.html…).

   The deck markup (built by presentation.js):
     <div class="presentation-stage" id="presentation-stage">
       <div class="reveal" id="presentation-reveal">…slides…</div>
       <div class="presentation-bar" id="presentation-bar">…toolbar…</div>
       <div class="presentation-status" id="presentation-status">…loading/error…</div>
     </div>
   ===================================================================== */

.presentation-stage {
  position: relative;
  background-color: #191919; /* matches the black Reveal theme */
}

/* Fullscreen: make sure the stage covers the entire screen in every
   browser. The Fullscreen API's UA stylesheet normally does this, but some
   browsers only apply `position: fixed` and leave the inline pixel height
   that layoutDeck() set for the window view in charge — so the deck would
   stop short of the screen edge. The !important beats both the stale
   inline height and any weaker UA rule. */
.presentation-stage:fullscreen,
.presentation-stage:-webkit-full-screen {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
}

/* The deck itself is sized in pixels from JavaScript so that it fills the
   viewport below the site header (or the whole screen in fullscreen mode). */
.presentation-stage .reveal {
  position: relative;
}

/* One slide = one PDF page. */
.pdf-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The <canvas> a PDF page is painted into. Width/height are set inline by
   presentation.js to the page's native size; the max-* rules keep pages
   with a different aspect ratio (mixed-size PDFs) from overflowing. */
.pdf-page {
  display: block;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  max-height: 100%;
}

/* Toolbar underneath the deck. */
.presentation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  background-color: #343a40;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.presentation-title {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.presentation-title small {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  margin-left: 0.5rem;
}

.presentation-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.presentation-actions .btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
  background-color: transparent;
}

.presentation-actions .btn:hover,
.presentation-actions .btn:focus {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.presentation-actions a.btn {
  text-decoration: none;
}

/* Loading / error overlay that covers the whole stage. */
.presentation-status {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background-color: rgba(25, 25, 25, 0.92);
}

.presentation-status.is-hidden {
  display: none;
}

.presentation-status-box {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.9);
}

.presentation-status-box h3 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.presentation-status-box p,
.presentation-status-box li {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.presentation-status-box code {
  color: #7ee787;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
}

.presentation-status-box .text-muted {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Spinner shown while the PDF is loading. */
.presentation-spinner {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: presentation-spin 0.9s linear infinite;
}

@keyframes presentation-spin {
  to { transform: rotate(360deg); }
}

/* Tune the Reveal controls/progress to the site's green. */
.reveal .controls {
  color: #28a745;
}

.reveal .progress {
  color: #28a745;
}
