/**
 * Infographic lightbox.
 *
 * Scoped only to the Infographic archive lightbox overlay.
 */

html.infographic-lightbox-open,
html.infographic-lightbox-open body {
	overflow: hidden;
}

.infographic-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.85);
}

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

.infographic-lightbox__figure {
	margin: 0;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.infographic-lightbox__image {
	max-width: 90vw;
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.infographic-lightbox__caption {
	margin-top: 12px;
	color: #fff;
	font-size: 14px;
	text-align: center;
}

.infographic-lightbox__close {
	position: absolute;
	top: 16px;
	right: 20px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.infographic-lightbox__close:hover,
.infographic-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.3);
}

.infographic-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.infographic-lightbox__nav:hover,
.infographic-lightbox__nav:focus-visible {
	background: rgba(255, 255, 255, 0.3);
}

.infographic-lightbox__nav--prev {
	left: 16px;
}

.infographic-lightbox__nav--next {
	right: 16px;
}

@media (max-width: 600px) {
	.infographic-lightbox {
		padding: 12px;
	}

	.infographic-lightbox__figure,
	.infographic-lightbox__image {
		max-width: 96vw;
	}

	.infographic-lightbox__image {
		max-height: 74vh;
	}

	.infographic-lightbox__nav {
		width: 40px;
		height: 40px;
		font-size: 24px;
	}

	.infographic-lightbox__nav--prev {
		left: 8px;
	}

	.infographic-lightbox__nav--next {
		right: 8px;
	}
}
