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

.image-lightbox {
	position: fixed;
	inset: 0;
	z-index: 3000;
	display: grid;
	box-sizing: border-box;
	padding: clamp(56px, 7vw, 96px) clamp(16px, 4vw, 64px);
	overflow: auto;
	place-items: center;
	background: rgb(0 0 0 / 92%);
	cursor: zoom-out;
}

.image-lightbox__figure {
	display: grid;
	max-width: 100%;
	margin: auto;
	place-items: center;
	cursor: default;
}

.image-lightbox__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: calc(100dvh - clamp(112px, 14vw, 192px));
	object-fit: contain;
}

.image-lightbox__caption {
	max-width: 760px;
	margin: 16px 0 0;
	color: #fff;
	font-size: calc(15px * var(--a11y-text-scale, 1));
	line-height: 1.35;
	text-align: center;
}

.image-lightbox__close {
	position: fixed;
	top: max(16px, env(safe-area-inset-top));
	right: max(16px, env(safe-area-inset-right));
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: #fff;
	background: transparent;
	cursor: pointer;
}

.image-lightbox__close::before,
.image-lightbox__close::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 1px;
	background: currentColor;
	content: "";
}

.image-lightbox__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.image-lightbox__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.image-lightbox__close:hover {
	opacity: 0.72;
}

.image-lightbox__close:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}

.image-lightbox__navigation {
	position: fixed;
	top: 50%;
	width: 52px;
	height: 64px;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: #fff;
	background: rgb(0 0 0 / 22%);
	cursor: pointer;
	transform: translateY(-50%);
}

.image-lightbox__navigation[hidden] {
	display: none;
}

.image-lightbox__navigation--previous {
	left: max(8px, env(safe-area-inset-left));
}

.image-lightbox__navigation--next {
	right: max(8px, env(safe-area-inset-right));
}

.image-lightbox__navigation::before {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	content: "";
}

.image-lightbox__navigation--previous::before {
	transform: translate(-35%, -50%) rotate(-135deg);
}

.image-lightbox__navigation--next::before {
	transform: translate(-65%, -50%) rotate(45deg);
}

.image-lightbox__navigation:hover {
	background: rgb(0 0 0 / 48%);
}

.image-lightbox__navigation:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: -3px;
}

.is-lightbox-enabled {
	cursor: zoom-in;
}

.is-lightbox-enabled:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.image-lightbox__close,
	.image-lightbox__navigation {
		transition: none;
	}
}

@media (max-width: 767px) {
	.image-lightbox {
		padding-inline: 8px;
	}

	.image-lightbox__navigation {
		width: 44px;
		height: 56px;
		background: rgb(0 0 0 / 38%);
	}
}
