/* Reusable image lightbox.
 *
 * Any element carrying .js-listo-lightbox becomes a click/tap target that opens
 * a full-screen preview of the <img> inside it. Progressively enhanced by
 * lightbox.js — without JS the image is just a normal inline image. Reuse it by
 * adding the class to any image block across the site. */

.js-listo-lightbox,
.js-listo-lightbox img {
	cursor: zoom-in;
}

.listo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vmin;
	background: rgba(9, 9, 11, 0.9);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.18s ease;
}

.listo-lightbox.is-open {
	opacity: 1;
}

.listo-lightbox[hidden] {
	display: none;
}

.listo-lightbox__img {
	max-width: 96vw;
	max-height: 92vh;
	width: auto;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.listo-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.listo-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.listo-lightbox__close:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #11b981);
	outline-offset: 2px;
}

body.listo-lightbox-open {
	overflow: hidden;
}
