.nffat-lightbox-trigger {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: var(--nffat-radius-inner);
	background: none;
	cursor: zoom-in;
	overflow: hidden;
}

.nffat-lightbox-trigger img {
	transition: transform 600ms var(--wp--custom--ease--out);
}

.nffat-lightbox-trigger:focus-visible {
	outline: 3px solid var(--wp--preset--color--magenta);
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.nffat-lightbox-trigger:hover img {
		transform: scale(1.04);
	}
}

html:has(.nffat-lightbox[open]) {
	overflow: hidden;
}

.nffat-lightbox {
	inset: 0;
	width: auto;
	max-width: none;
	height: auto;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(4 41 39 / 0.94);
	color: var(--wp--preset--color--white);
	opacity: 0;
	transition: opacity 260ms var(--wp--custom--ease--out), overlay 260ms allow-discrete, display 260ms allow-discrete;
}

.nffat-lightbox[open] {
	opacity: 1;
}

@starting-style {
	.nffat-lightbox[open] {
		opacity: 0;
	}
}

.nffat-lightbox::backdrop {
	background: transparent;
}

.nffat-lightbox__track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior: contain;
	scrollbar-width: none;
	outline: none;
}

.nffat-lightbox__slide {
	flex: 0 0 100%;
	display: grid;
	place-items: center;
	margin: 0;
	padding: 72px clamp(16px, 7vw, 112px);
	box-sizing: border-box;
	scroll-snap-align: center;
}

.nffat-lightbox__slide img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: var(--nffat-radius-inner);
	object-fit: contain;
	scale: 0.96;
	transition: scale 360ms var(--wp--custom--ease--out);
}

.nffat-lightbox[open] .nffat-lightbox__slide img {
	scale: 1;
}

@starting-style {
	.nffat-lightbox[open] .nffat-lightbox__slide img {
		scale: 0.96;
	}
}

.nffat-lightbox__count {
	position: absolute;
	top: 24px;
	left: 24px;
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.nffat-lightbox__close,
.nffat-lightbox__nav {
	position: absolute;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--teal-900);
	cursor: pointer;
	transition: background-color 200ms, color 200ms, transform 160ms var(--wp--custom--ease--out);
}

.nffat-lightbox__close svg,
.nffat-lightbox__nav svg {
	width: 22px;
	height: 22px;
}

.nffat-lightbox__close {
	top: 16px;
	right: 24px;
}

.nffat-lightbox__nav {
	top: 50%;
	translate: 0 -50%;
}

.nffat-lightbox__nav.is-prev {
	left: 24px;
}

.nffat-lightbox__nav.is-prev svg {
	rotate: 180deg;
}

.nffat-lightbox__nav.is-next {
	right: 24px;
}

.nffat-lightbox.is-single .nffat-lightbox__nav,
.nffat-lightbox.is-single .nffat-lightbox__count {
	display: none;
}

.nffat-lightbox__close:active,
.nffat-lightbox__nav:active {
	transform: scale(0.94);
}

.nffat-lightbox__close:focus-visible,
.nffat-lightbox__nav:focus-visible {
	outline: 3px solid var(--wp--preset--color--magenta);
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.nffat-lightbox__close:hover,
	.nffat-lightbox__nav:hover {
		background: var(--wp--preset--color--magenta);
		color: var(--wp--preset--color--white);
	}
}

@media (max-width: 699px) {
	.nffat-lightbox__nav {
		top: auto;
		bottom: 20px;
		translate: none;
	}

	.nffat-lightbox__slide {
		padding: 72px 0 96px;
	}

	.nffat-lightbox__slide img {
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nffat-lightbox,
	.nffat-lightbox__slide img,
	.nffat-lightbox-trigger img {
		transition: none;
	}
}
