/* ========================= Slideshow overlay ========================= */

.slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---- Media canvas (holds current + next for crossfade) ---- */

.slideshow-canvas {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-media {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 600ms ease;
  pointer-events: none;
}

.slideshow-media.active {
  opacity: 1;
}

/* ---- Controls bar ---- */

.slideshow-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  opacity: 1;
  transition: opacity 300ms ease;
  z-index: 4001;
}

.slideshow-controls.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Nav buttons */

.slideshow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 150ms;
}

.slideshow-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.slideshow-btn:active {
  background: rgba(255, 255, 255, 0.35);
}

.slideshow-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Speed pills */

.slideshow-speed {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}

.slideshow-speed-btn {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.slideshow-speed-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.slideshow-speed-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Counter (e.g. "3 / 12") */

.slideshow-counter {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-family: inherit;
  pointer-events: none;
  z-index: 4001;
  opacity: 1;
  transition: opacity 300ms ease;
}

.slideshow-counter.hidden {
  opacity: 0;
}
