.image-viewer-open {
	overflow: hidden;
}

.image-viewer {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.88);
	color: #fff;
}

.image-viewer::backdrop {
	background: rgba(0, 0, 0, 0.88);
}

.image-viewer__content {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 48px 64px;
}

.image-viewer__image {
	display: block;
	max-width: calc(100vw - 128px);
	max-height: calc(100vh - 96px);
	width: auto;
	height: auto;
	object-fit: contain;
}

.image-viewer__close,
.image-viewer__previous,
.image-viewer__next {
	position: absolute;
	z-index: 2;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font: 40px/1 sans-serif;
}

.image-viewer__close {
	top: 16px;
	right: 20px;
	width: 44px;
	height: 44px;
}

.image-viewer__previous,
.image-viewer__next {
	top: 50%;
	width: 48px;
	height: 64px;
	transform: translateY(-50%);
}

.image-viewer__previous {
	left: 12px;
}

.image-viewer__next {
	right: 12px;
}

.image-viewer__caption {
	position: absolute;
	right: 0;
	bottom: 12px;
	left: 0;
	text-align: center;
	font-size: 14px;
}

.image-viewer button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.image-viewer__content {
		padding: 48px 32px 56px;
	}

	.image-viewer__image {
		max-width: calc(100vw - 64px);
		max-height: calc(100vh - 104px);
	}

	.image-viewer__previous {
		left: 0;
	}

	.image-viewer__next {
		right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.image-viewer,
	.image-viewer * {
		scroll-behavior: auto;
	}
}
