.bpl-photo-gallery {
	--bpl-photo-gallery-gap: 5px;
	--bpl-photo-gallery-columns: 4;
	width: 100%;
	margin: 30px 0;
}

.bpl-photo-gallery__row {
	display: flex;
	gap: var(--bpl-photo-gallery-gap);
	align-items: flex-start;
	width: 100%;
	margin: 0 0 var(--bpl-photo-gallery-gap);
}

.bpl-photo-gallery__row:last-child {
	margin-bottom: 0;
}

.bpl-photo-gallery__item {
	flex: 0 0 auto;
	min-width: 0;
	margin: 0;
}

.bpl-photo-gallery__link {
	display: block;
	width: 100%;
	height: var(--bpl-photo-gallery-computed-row-height, auto);
	overflow: hidden;
	background: transparent;
}

.bpl-photo-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: opacity 0.2s ease;
}

.bpl-photo-gallery__link:hover .bpl-photo-gallery__image,
.bpl-photo-gallery__link:focus .bpl-photo-gallery__image {
	opacity: 0.82;
}

.bpl-photo-gallery__caption {
	margin: 8px 0 0;
	font-family: var(--sansserifreg), Helvetica, sans-serif;
	font-size: 0.875rem;
	line-height: 1.35;
	color: #555;
}

.bpl-photo-gallery .pswp-caption-content {
	display: none;
}

.pswp__dynamic-caption {
	display: none !important;
	font-family: var(--sansserifreg), Helvetica, sans-serif;
	font-size: 1rem;
	line-height: 1.45;
	color: #fff;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.pswp {
	--pswp-bg: #050505;
	z-index: 100000;
	background: #050505;
}

.pswp__bg {
	background: var(--pswp-bg);
}

.pswp__scroll-wrap,
.pswp__container,
.pswp__item {
	background: #050505;
}

.pswp__dynamic-caption--aside,
.pswp__dynamic-caption--below {
	position: fixed;
	top: auto !important;
	right: auto !important;
	bottom: 24px !important;
	left: 50% !important;
	box-sizing: border-box;
	width: auto;
	max-width: min(760px, calc(100vw - 64px));
	margin: 0;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.42);
	border-radius: 2px;
	transform: translateX(-50%);
}

.pswp__dynamic-caption--mobile {
	right: auto !important;
	bottom: 24px !important;
	left: 50% !important;
	box-sizing: border-box;
	width: auto;
	max-width: min(760px, calc(100vw - 64px));
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 2px;
	transform: translateX(-50%);
}

.pswp__button {
	opacity: 0.78;
	transition: opacity 0.18s ease;
}

.pswp__button:hover,
.pswp__button:focus {
	opacity: 1;
}

.pswp__button--arrow {
	width: 56px;
}

.pswp__button--arrow--prev {
	left: 18px;
}

.pswp__button--arrow--next {
	right: 18px;
}

.pswp__counter {
	margin: 18px 0 0 20px;
	color: rgba(255, 255, 255, 0.82);
	font-family: var(--sansserifreg), Helvetica, sans-serif;
	font-size: 0.875rem;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.pswp__top-bar {
	background: linear-gradient(rgba(0, 0, 0, 0.48), transparent);
}

.bpl-photo-gallery-lightbox-caption {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100001;
	box-sizing: border-box;
	width: 100%;
	max-height: min(32vh, 260px);
	overflow: auto;
	padding: 16px max(24px, calc((100vw - 960px) / 2)) 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.88) 22%, rgba(0, 0, 0, 0.96));
	color: rgba(255, 255, 255, 0.92);
	font-family: var(--sansserifreg), Helvetica, sans-serif;
	font-size: 0.9375rem;
	line-height: 1.5;
	text-align: left;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
	transform: none;
}

.bpl-photo-gallery-lightbox-caption:empty,
.bpl-photo-gallery-lightbox-caption[hidden] {
	display: none;
}

@media (max-width: 575px) {
	.bpl-photo-gallery__row {
		display: block;
	}

	.bpl-photo-gallery__item {
		width: 100% !important;
		margin: 0 0 var(--bpl-photo-gallery-gap);
	}

	.bpl-photo-gallery__link {
		height: auto;
	}

	.bpl-photo-gallery__image {
		height: auto;
	}
}
