/* Post image lightbox (PhotoSwipe 5.4.4) - brand layer over vendor/photoswipe-5.4.4/photoswipe.css. */
.pswp {
	--pswp-bg: #0a1531;
	--pswp-placeholder-bg: #16244a;
	--pswp-icon-color: #ffffff;
	--pswp-icon-color-secondary: #0a1531;
	--pswp-icon-stroke-color: #0a1531;
	--pswp-error-text-color: #ffffff;
	font-family: inherit;
}
.pswp__counter { font-size: 1.4rem; font-weight: 500; opacity: 0.85; }
.pswp__button:focus-visible { outline: 2px solid var(--accent, #f3c653); outline-offset: -4px; }

.pswp__rm-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 40%;
	overflow-y: auto;
	padding: 2.4rem 2rem calc(1.8rem + env(safe-area-inset-bottom));
	background: linear-gradient(to top, rgba(10, 21, 49, 0.9), rgba(10, 21, 49, 0));
	color: #ffffff;
	font-size: 1.5rem;
	line-height: 1.5;
	text-align: center;
	pointer-events: none;
	transition: opacity 250ms ease;
}
.pswp__rm-caption:empty { display: none; }
.pswp:not(.pswp--ui-visible) .pswp__rm-caption { opacity: 0; }

/* Thumbnails in post content: the whole image is the link. */
:is(.rm-prose, .brxe-post-content) a.rm-pswp { cursor: zoom-in; }
:is(.rm-prose, .brxe-post-content) a.rm-pswp:focus-visible { outline: 2px solid var(--primary, #0f2a6a); outline-offset: 3px; }
:is(.rm-prose, .brxe-post-content) .wp-block-gallery.has-nested-images figure.wp-block-image > a.rm-pswp { display: flex; flex-direction: column; flex-grow: 1; margin: 0; }
:is(.rm-prose, .brxe-post-content) .rm-pswp-single > a.rm-pswp { display: block; }
:is(.rm-prose, .brxe-post-content) .gallery a.rm-pswp { display: block; }

@media (prefers-reduced-motion: reduce) {
	.pswp__rm-caption { transition: none; }
}