/**
 * Checkbox-toggled lightbox, shared by every block that shows a photo.
 *
 * Lives in its own stylesheet (handle `cr-lightbox`) rather than inside one
 * block's style.css: block styles are only enqueued when that block is on the
 * page, so a Paragliding block on a page without any Pitch block would render
 * the full-size image inline instead of as an overlay.
 */

.pitch-lightbox__toggle {
	display: none;
}

.pitch-lightbox__thumb {
	display: inline-block;
	cursor: zoom-in;
}

.pitch-lightbox__thumb img {
	max-width: 280px;
	width: 100%;
	height: auto;
	border-radius: 4px;
	transition: opacity 0.15s;
}

.pitch-lightbox__thumb:hover img {
	opacity: 0.85;
}

.pitch-lightbox__overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba( 0, 0, 0, 0.88 );
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	cursor: zoom-out;
}

.pitch-lightbox__overlay img {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 8px 40px rgba( 0, 0, 0, 0.6 );
}

.pitch-lightbox__toggle:checked ~ .pitch-lightbox__overlay {
	display: flex;
}
