/*
 * Bildergalerie (Bootstrap 6: <dialog> + Carousel)
 * Gemeinsam genutzt vom Inhaltselement imagegallery und der Produkt-Detailansicht (Show.html).
 */

.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  background: none;
  border: 0;
  position: relative;
}

.gallery-open img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-controls {
  display: flex;
  gap: .5rem;
  justify-content: center;
}

.gallery-dialog {
  --bs-dialog-width: min(64rem, 95vw);
  --bs-dialog-padding: .5rem;
}

.gallery-dialog .dialog-header { padding: .5rem 1rem; }

/* Lightbox: Bild groß, Pfeile über dem Bild, Beschriftung im Bild; darunter nur die Punkte */
.gallery-dialog .carousel { position: relative; }

.gallery-dialog .carousel-item figure {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto !important;
}

.gallery-dialog .carousel-item img {
  width: auto;
  max-width: 100%;
  max-height: 75vh;
  display: block;
}

.gallery-dialog figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0 !important;
  padding: 1.5rem .75rem .5rem;
  color: #fff;
  text-align: center;
  background: linear-gradient(transparent, rgb(0 0 0 / .6));
  border-radius: 0 0 .5rem .5rem;
}

.gallery-dialog .gallery-controls {
  position: absolute;
  inset: 0 0 1.75rem;
  z-index: 2;
  align-items: center;
  justify-content: space-between;
  padding-inline: .5rem;
  pointer-events: none;
}

.gallery-dialog .gallery-controls .btn {
  pointer-events: auto;
  background: rgb(255 255 255 / .85);
}

.gallery-dialog .carousel-indicators {
  position: static;
  margin: .5rem 0 .25rem;
}

/* Abstand unter dem Inhaltselement imagegallery (nach der Bildunterschrift), passend zum Rasterabstand */
.imagegallery-container {
  margin-bottom: 1.5rem;
}
