/*
 * Keep the theme's generic button design system from resizing GLightbox's
 * embedded SVG controls. The icons themselves live in the custom GLightbox JS.
 */
.glightbox-container .gbtn {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  line-height: 1;
}

.glightbox-container .gbtn svg {
  flex: 0 0 auto;
}

/*
 * Size photos against the viewport, not their auto-sized flex parent. The
 * vendor's desktop max-width: 100% creates a circular sizing dependency.
 * This only guards layout; thumbnail cache isolation lives in the gallery JS.
 * Keep the vendor's height limit and aspect ratio, and leave side captions
 * (which share the available width) and zoom sizing to GLightbox.
 */
.glightbox-container .gslide:not(.zoomed) .ginner-container:not(.desc-left):not(.desc-right) .gslide-image img {
  max-width: 100vw;
  min-width: 0;
}
