/* ═══════════════ ExposeJS ═══════════════ */

/* ── Scroll lock ── */
.expose-noscroll,
.expose-noscroll body {
  overflow: hidden !important;
}

/* ── Overlay ── */
.expose {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

/* ── Slide container ── */
.expose__slides {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Individual slide ── */
.expose__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px 80px;
  overflow: hidden;
}

/* ── Slide content ── */
.expose__slide-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ── Image ── */
.expose__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
  transition: transform 0.15s ease;
  will-change: transform;
}

/* ── Video ── */
.expose__video {
  max-width: 100%;
  max-height: 100%;
  outline: none;
}

/* ── Iframe ── */
.expose__slide-content--iframe {
  width: 90%;
  height: 90%;
}

.expose__iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
}

/* ── Custom content ── */
.expose__slide-content--custom {
  max-width: 90%;
  max-height: 90%;
  color: #e0e0e0;
}

/* ── Autoplay progress bar ── */
.expose__autoplay-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #7b93ff;
  z-index: 30;
  pointer-events: none;
}

.expose__autoplay-bar--active {
  animation-name: expose-autoplay-progress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes expose-autoplay-progress {
  from { width: 0; }
  to { width: 100%; }
}

/* ── Slide transform wrapper (rotation/flip) ── */
.expose__slide-transform {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

/* ── Navigation arrows ── */
.expose__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.expose__nav::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  transform: scale(0);
  transition: transform 0.35s ease;
}

.expose__nav:hover { color: #fff; }
.expose__nav:hover::before { transform: scale(1); }

.expose__nav > svg { position: relative; z-index: 1; display: block; pointer-events: none; }

.expose__nav--prev { left: 12px; }
.expose__nav--next { right: 12px; }

/* ── Toolbar ── */
.expose__toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.expose__toolbar-btn {
  position: relative;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.expose__toolbar-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  transform: scale(0);
  transition: transform 0.35s ease;
}

.expose__toolbar-btn:hover { color: #fff; }
.expose__toolbar-btn:hover::before { transform: scale(1); }

.expose__toolbar-btn > svg { position: relative; z-index: 1; display: block; pointer-events: none; }

.expose__toolbar-btn--active { color: #7b93ff; }
.expose__toolbar-btn--active::before { transform: scale(1); background-color: rgba(123, 147, 255, 0.14); }

/* ── Counter ── */
.expose__counter {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  margin-right: auto;
  padding: 8px;
  overflow: hidden;
}

.expose__counter-num {
  display: inline-block;
}

/* ── Caption ── */
.expose__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 16px 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  pointer-events: none;
}

/* ── Thumbnails ── */
.expose__thumbnails {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 12px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.expose__thumbnails::-webkit-scrollbar {
  display: none;
}

.expose__thumbnails-track {
  display: flex;
  gap: 6px;
  justify-content: center;
  min-width: min-content;
}

.expose__thumb {
  flex-shrink: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
  background-color: #222;
  padding: 0;
}

.expose__thumb:hover {
  opacity: 0.8;
}

.expose__thumb--active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.8);
}

.expose__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.expose__thumb--placeholder::after {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Adjust padding when thumbnails or captions present ── */
.expose:has(.expose__thumbnails) .expose__slide {
  padding-bottom: 100px;
}

.expose:has(.expose__caption) .expose__slide {
  padding-bottom: 80px;
}

.expose:has(.expose__thumbnails):has(.expose__caption) .expose__slide {
  padding-bottom: 120px;
}

.expose:has(.expose__thumbnails) .expose__caption {
  bottom: 60px;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .expose__slide {
    padding: 50px 16px 60px;
  }

  .expose__nav {
    width: 32px;
    font-size: 1.5rem;
  }

  .expose:has(.expose__thumbnails) .expose__slide {
    padding-bottom: 90px;
  }

  .expose:has(.expose__caption) .expose__slide {
    padding-bottom: 70px;
  }

  .expose:has(.expose__thumbnails):has(.expose__caption) .expose__slide {
    padding-bottom: 110px;
  }
}
