/* -------------------------------------------------------
   AOO Lightbox
   ------------------------------------------------------- */

/* Wrapper om elke afbeelding */
.aoo-lightbox-wrap {
  position: relative;
  display: inline-block;
  line-height: 0; /* Verwijdert ruimte onder afbeelding */
}

/* Vergroot-knop rechtsboven op de afbeelding */
.aoo-lightbox-trigger {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
}

/* Knop tonen bij hover over wrapper of focus */
.aoo-lightbox-wrap:hover .aoo-lightbox-trigger,
.aoo-lightbox-trigger:focus-visible {
  opacity: 1;
}

.aoo-lightbox-trigger:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Altijd tonen op touch-apparaten */
@media (hover: none) {
  .aoo-lightbox-trigger {
    opacity: 1;
  }
}

/* Scroll vergrendelen als lightbox open is */
body.aoo-lightbox-open {
  overflow: hidden;
}

/* Overlay */
.aoo-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: aoo-lb-fade-in 0.2s ease;
}

.aoo-lightbox-overlay[hidden] {
  display: none;
}

@keyframes aoo-lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Inner container */
.aoo-lightbox-inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Sluitknop rechtsboven in de overlay */
.aoo-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 1;
}

.aoo-lightbox-close:hover,
.aoo-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

/* Afbeelding */
.aoo-lightbox-figure {
  margin: 0;
  line-height: 0;
}

.aoo-lightbox-img {
  display: block;
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  line-height: 0;
}

/* Caption */
.aoo-lightbox-caption {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.4;
  max-width: min(90vw, 1200px);
}

.aoo-lightbox-caption[hidden] {
  display: none;
}