/*
 * NextGEN Pro, moved out of the RIC child theme.
 * The ID refers to themes/ricamsterdam/CUSTOMIZATIONS.md.
 */

/* P-09 Use full height for the lightbox, otherwise no images are shown on mobile devices */
.galleria-theme-nextgen_pro_lightbox .galleria-stage {
  height: 100% !important;
}

/*
 * #70 A thumbnail grid that fits the screen: columns of at least 150px across the
 * content width, so 2 on a phone and 6 or 7 on a desktop. The thumbnails are 240x180,
 * with a 480x360 copy for high-resolution screens. NextGEN sets a margin per gallery
 * and a maximum size on each image inline, hence the !important. Only in the content,
 * not in a sidebar widget.
 */
main .nextgen_pro_thumbnail_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 4px;
}

main .nextgen_pro_thumbnail_grid .image-wrapper {
  display: block;
  margin: 0 !important;
}

main .nextgen_pro_thumbnail_grid img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none !important;
  max-height: none !important;
}

/* Pagination, and the line breaks of a fixed column count, span the whole row. */
main .nextgen_pro_thumbnail_grid > :not(.image-wrapper) {
  grid-column: 1 / -1;
}
