.featured-image-gallery-trigger {
	position: relative;
}

.featured-image-gallery-trigger [data-featured-image-gallery-trigger] {
	cursor: zoom-in;
}

.featured-image-gallery-button,
.featured-image-gallery-dialog button {
	align-items: center;
	background: #fff;
	border: 0;
	border-radius: 999px;
	color: #111;
	cursor: pointer;
	display: flex;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.featured-image-gallery-button {
	height: 2.5rem;
	position: absolute;
	right: 0.75rem;
	top: 0.75rem;
	width: 2.5rem;
	z-index: 1;
}

.featured-image-gallery-button svg,
.featured-image-gallery-dialog button svg {
	fill: currentcolor;
	height: 1.5rem;
	width: 1.5rem;
}

.featured-image-gallery-dialog {
	background: rgb(0 0 0 / 92%);
	border: 0;
	box-sizing: border-box;
	height: 100dvh;
	inset: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	padding: 3.5rem 4.5rem;
	width: 100vw;
}

.featured-image-gallery-dialog [hidden] {
	display: none;
}

.featured-image-gallery-dialog::backdrop {
	background: rgb(0 0 0 / 92%);
}

.featured-image-gallery-figure {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	margin: 0;
	position: relative;
	width: 100%;
}

.featured-image-gallery-image {
	height: auto;
	max-height: calc(100dvh - 8rem);
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.featured-image-gallery-caption {
	background: rgb(0 0 0 / 65%);
	bottom: 0;
	color: #fff;
	left: 50%;
	max-width: min(90%, 50rem);
	padding: 0.5rem 0.75rem;
	position: absolute;
	text-align: center;
	transform: translateX(-50%);
}

.featured-image-gallery-close,
.featured-image-gallery-previous,
.featured-image-gallery-next {
	height: 2.75rem;
	position: absolute;
	width: 2.75rem;
	z-index: 2;
}

.featured-image-gallery-close {
	right: 1rem;
	top: 1rem;
}

.featured-image-gallery-previous,
.featured-image-gallery-next {
	top: 50%;
	transform: translateY(-50%);
}

.featured-image-gallery-previous {
	left: 1rem;
}

.featured-image-gallery-next {
	right: 1rem;
}

.featured-image-gallery-position {
	bottom: 1rem;
	color: #fff;
	left: 50%;
	margin: 0;
	position: absolute;
	transform: translateX(-50%);
}

.featured-image-gallery-button:focus-visible,
.featured-image-gallery-dialog button:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 3px;
}

.has-featured-image-gallery-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.featured-image-gallery-dialog {
		padding: 4rem 1rem;
	}

	.featured-image-gallery-image {
		max-height: calc(100dvh - 9rem);
	}

	.featured-image-gallery-previous {
		left: 0.5rem;
	}

	.featured-image-gallery-next {
		right: 0.5rem;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.featured-image-gallery-dialog[open] {
		animation: featured-image-gallery-fade-in 160ms ease-out;
	}

	@keyframes featured-image-gallery-fade-in {
		from {
			opacity: 0;
		}

		to {
			opacity: 1;
		}
	}
}
