/**
 * lightbox - theme alignment for the GLightbox vendor (clean skin).
 *
 * The vendor stylesheet draws the overlay/slide machinery; here we retune the
 * surfaces it hardcodes (the caption panel, buttons, loader) to our theme
 * tokens so captions match the app's cards in BOTH themes, and give the
 * controls a visible :focus-visible ring. The overlay itself stays dark in
 * both themes - that is what a lightbox is.
 */
.glightbox-clean .gslide-description {
  background: var(--genus-card-bg, var(--bs-body-bg));
}
.glightbox-clean .gslide-title {
  font-family: inherit;
  font-weight: 600;
  color: var(--bs-body-color);
  margin-bottom: 0.5rem;
}
.glightbox-clean .gslide-desc {
  font-family: inherit;
  color: var(--bs-secondary-color);
}
.glightbox-clean .gslide-desc .desc-more {
  color: var(--bs-primary);
}
.glightbox-clean .gprev,
.glightbox-clean .gnext,
.glightbox-clean .gclose {
  border-radius: 0.2rem;
  transition: background-color 0.15s ease;
}
.glightbox-clean .gprev:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gclose:hover {
  background-color: var(--bs-primary);
}
.glightbox-clean .gprev:focus-visible,
.glightbox-clean .gnext:focus-visible,
.glightbox-clean .gclose:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.gbtn.glightbox-button-hidden {
  display: none;
}

.gloader {
  border-color: var(--bs-primary);
  border-right-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .gloader {
    animation-duration: 1.6s;
  }
}
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}
.gallery figure {
  margin: 0;
  max-width: 12rem;
}
.gallery figure:only-child {
  max-width: 100%;
}
.gallery figure:only-child .gallery-thumb {
  max-height: 16rem;
}
.gallery figcaption {
  font-size: 0.875em;
  color: var(--bs-secondary-color);
  margin-top: 0.25rem;
}

.gallery-plate {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.gallery-plate:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  border-radius: 0.2rem;
}
.gallery-plate:hover .gallery-plate-zoom, .gallery-plate:focus-visible .gallery-plate-zoom {
  opacity: 1;
}

.gallery-thumb {
  max-height: 10rem;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 0.2rem;
  cursor: zoom-in;
}

.gallery-plate-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.2rem;
  background-color: rgba(0, 0, 0, 0.15);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-plate-zoom {
    transition: none;
  }
}
