.gallery-lightbox {
	align-items: center;
	background: #111;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.75rem;
	box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.65);
	box-sizing: border-box;
	color: #fff;
	display: flex;
	height: min(90vh, 900px);
	justify-content: center;
	max-height: 90vh;
	max-width: 1100px;
	opacity: 0;
	overflow: hidden;
	padding: 3.5rem 1rem 1rem;
	transform: scale(0.97);
	transition: opacity 220ms ease, transform 220ms ease;
	width: calc(100vw - 2rem);
}

.gallery-lightbox[open] {
	margin: auto;
}

.gallery-lightbox.is-visible {
	opacity: 1;
	transform: scale(1);
}

.gallery-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.82);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 220ms ease;
}

.gallery-lightbox.is-visible::backdrop {
	opacity: 1;
}

.gallery-lightbox__close {
	align-items: center;
	appearance: none;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 2rem;
	height: 2.75rem;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 0.75rem;
	top: 0.75rem;
	width: 2.75rem;
	z-index: 1;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

.gallery-lightbox__close:focus-visible {
	outline: 2px solid #eeee22;
	outline-offset: 3px;
}

.gallery-lightbox__navigation {
	align-items: center;
	appearance: none;
	background: rgba(0, 0, 0, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.65);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 2.5rem;
	height: 3rem;
	justify-content: center;
	line-height: 1;
	padding: 0 0 0.25rem;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	z-index: 1;
}

.gallery-lightbox__navigation:hover,
.gallery-lightbox__navigation:focus-visible {
	background: rgba(255, 255, 255, 0.24);
}

.gallery-lightbox__navigation:focus-visible {
	outline: 2px solid #eeee22;
	outline-offset: 3px;
}

.gallery-lightbox__navigation--previous {
	left: 0.75rem;
}

.gallery-lightbox__navigation--next {
	right: 0.75rem;
}

.gallery-lightbox__navigation[hidden] {
	display: none;
}

.gallery-lightbox__content {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.gallery-lightbox__figure {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	height: 100%;
	justify-content: center;
	margin: 0;
	max-width: 100%;
	width: 100%;
}

.gallery-lightbox__media {
	display: block;
	height: auto;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

video.gallery-lightbox__media {
	height: 100%;
	width: 100%;
}

.gallery-lightbox__figure figcaption {
	color: #fff;
	font-size: 0.95rem;
	text-align: center;
}

@media (max-width: 600px) {
	.gallery-lightbox {
		border-radius: 0;
		height: 100vh;
		max-height: 100vh;
		padding: 3.5rem 3.25rem 0.5rem;
		width: 100vw;
	}

	.gallery-lightbox[open] {
		margin: auto;
	}

	.gallery-lightbox__navigation--previous {
		left: 0.5rem;
	}

	.gallery-lightbox__navigation--next {
		right: 0.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gallery-lightbox,
	.gallery-lightbox::backdrop {
		transition-duration: 0.01ms;
	}
}
