/* =============================================
   IIFE Forensic Lightbox v1.1
   Dunkel, clean, kein jQuery
   ============================================= */

/* ---- Overlay ---- */
#iife-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(0, 0, 0, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#iife-lightbox-overlay.iife-open {
  display: flex;
}

/* ---- Wrapper fuer Bild + Caption ---- */
#iife-lightbox-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 88dvh;
}

/* ---- Bild ---- */
#iife-lightbox-img {
  max-width: 90vw;
  max-height: 80dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  opacity: 0;
  transform: scale(0.93);
  transition: opacity 0.18s ease, transform 0.18s ease;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
#iife-lightbox-img.iife-loaded {
  opacity: 1;
  transform: scale(1);
}
/* Wow-Einblend-Keyframe beim erstmaligen Oeffnen */
@keyframes iife-img-in {
  from {
    opacity: 0;
    transform: scale(0.93);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
#iife-lightbox-img.iife-animate-in {
  animation: iife-img-in 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---- Caption ---- */
#iife-lightbox-caption {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-align: center;
  max-width: 72ch;
  line-height: 1.5;
  min-height: 1.2em;
}

/* ---- Schliessen-Button ---- */
#iife-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 99999;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
#iife-lightbox-close:hover,
#iife-lightbox-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---- Navigations-Pfeile ---- */
.iife-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99999;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
  display: none;
}
.iife-nav-btn:hover,
.iife-nav-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
#iife-lightbox-prev {
  left: 14px;
}
#iife-lightbox-next {
  right: 14px;
}
.iife-gallery-active .iife-nav-btn {
  display: block;
}

/* ---- Dot-Navigation ---- */
#iife-lightbox-dots {
  display: none;
  gap: 7px;
  margin-top: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.iife-gallery-active #iife-lightbox-dots {
  display: flex;
}
.iife-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, transform 0.18s ease;
}
.iife-dot.iife-dot-active {
  background: #fff;
  transform: scale(1.25);
}

/* ---- Cursor-Indicator am Overlay-Rand ---- */
#iife-lightbox-overlay {
  cursor: zoom-out;
}
#iife-lightbox-wrapper {
  cursor: default;
}

/* ---- Mobile-Anpassungen ---- */
@media (max-width: 600px) {
  #iife-lightbox-img {
    max-width: 96vw;
    max-height: 70dvh;
  }
  #iife-lightbox-wrapper {
    max-width: 96vw;
  }
  .iife-nav-btn {
    font-size: 1.2rem;
    padding: 12px 12px;
  }
  #iife-lightbox-prev {
    left: 4px;
  }
  #iife-lightbox-next {
    right: 4px;
  }
  #iife-lightbox-caption {
    font-size: 0.72rem;
    max-width: 90vw;
  }
}
