/* Styles for pptanim.js players.
   Slide text is set in Roboto (400/700); the page must load it so text metrics match PowerPoint, e.g.
   <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet"> */

.ppt-anim {
  position: relative;
  width: 100%;
  font-family: Roboto, Arial, sans-serif;
}

.ppt-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.ppt-inner {
  position: absolute;
  inset: 0;
}

.ppt-static .ppt-stage { cursor: zoom-in; }

.ppt-stage:focus-visible {
  outline: 2px solid #7e6999;
  outline-offset: 2px;
}

/* Full screen: fit the slide into the screen, controls underneath. */
.ppt-anim:fullscreen,
.ppt-anim:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  padding: 2vh 2vw;
  background: #fff;
}
.ppt-anim:fullscreen .ppt-stage,
.ppt-anim:fullscreen .ppt-controls {
  width: min(96vw, calc((96vh - 48px) * var(--ppt-ar, 1.7778)));
}
.ppt-anim:-webkit-full-screen .ppt-stage,
.ppt-anim:-webkit-full-screen .ppt-controls {
  width: min(96vw, calc((96vh - 48px) * var(--ppt-ar, 1.7778)));
}
.ppt-static:fullscreen .ppt-stage { cursor: zoom-out; }
.ppt-static:-webkit-full-screen .ppt-stage { cursor: zoom-out; }

.ppt-slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
}
.ppt-slide.ppt-on { visibility: visible; }

.ppt-plane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  text-rendering: geometricPrecision;
}

.ppt-video {
  position: absolute;
  object-fit: fill;
  background: #000;
}

/* control bar */
.ppt-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: content-box;
  min-height: 28px; /* reserved before the slide data loads, so nothing shifts */
  padding: 6px 2px 0;
  opacity: .55;
  transition: opacity .2s;
}
.ppt-anim:hover .ppt-controls,
.ppt-controls:focus-within { opacity: 1; }

.ppt-btn {
  flex: none;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4a4a4a;
  cursor: pointer;
}
.ppt-btn:hover { background: rgba(0, 0, 0, .06); }
.ppt-btn svg { width: 100%; height: 100%; fill: currentColor; display: block; }

.ppt-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, .12);
  cursor: pointer;
  touch-action: none;
}
.ppt-track::before { /* larger hit area */
  content: '';
  position: absolute;
  inset: -10px 0;
}
.ppt-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: #7e6999;
}
.ppt-track i { /* slide boundaries in a sequence */
  position: absolute;
  top: -2px;
  width: 1px;
  height: 8px;
  background: rgba(0, 0, 0, .25);
}
.ppt-track i:first-of-type { display: none; }
