/**
 * Gallery lightbox — fullscreen viewer with wipe transition.
 * Overlay: solid white. Edge chevrons share .nm-edge-nav with VA sliders.
 */

.nm-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 200ms ease, visibility 0s linear 200ms;
}

.nm-gallery-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 200ms ease, visibility 0s linear 0s;
}

.nm-gallery-lightbox__close {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 4;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
	color: #181818;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	transition: color 150ms ease, opacity 150ms ease;
}

.nm-gallery-lightbox__close:hover {
	background: transparent;
	border: none;
	box-shadow: none;
	color: #181818;
	opacity: 0.55;
}

.nm-gallery-lightbox__close:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

.nm-gallery-lightbox__close:focus-visible {
	background: transparent;
	border: none;
	box-shadow: none;
	color: #181818;
	opacity: 0.55;
	outline: 2px solid #181818;
	outline-offset: 2px;
}

/* Shape + edge inset come from shared .nm-edge-nav in style.css. */
.nm-gallery-lightbox__nav {
	display: none;
	z-index: 4;
	box-shadow: none;
}

.nm-gallery-lightbox.has-multiple .nm-gallery-lightbox__nav {
	display: flex;
}

.nm-gallery-lightbox__nav:disabled,
.nm-gallery-lightbox__nav[aria-disabled='true'] {
	opacity: 0.25;
	cursor: default;
	pointer-events: none;
}

.nm-gallery-lightbox__stage {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px 4.5rem;
	box-sizing: border-box;
}

.nm-gallery-lightbox__layers {
	position: relative;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}

.nm-gallery-lightbox__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	user-select: none;
	-webkit-user-drag: none;
}

.nm-gallery-lightbox__img--wipe {
	z-index: 2;
	clip-path: inset(0 0 0 0);
	transition: clip-path 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nm-gallery-lightbox__img--wipe.is-wipe-from-right {
	clip-path: inset(0 100% 0 0);
}

.nm-gallery-lightbox__img--wipe.is-wipe-from-left {
	clip-path: inset(0 0 0 100%);
}

.nm-gallery-lightbox__img--wipe.is-wipe-instant {
	transition: none;
}

body.nm-gallery-lightbox-open {
	overflow: hidden;
}

.wp-block-gallery figure img,
.wp-block-gallery .blocks-gallery-item img,
.nm-exhibit-gallery__image,
.nm-exhibit-gallery__item img {
	cursor: zoom-in;
}

@media (prefers-reduced-motion: reduce) {
	.nm-gallery-lightbox__img--wipe {
		transition: none;
	}
}

@media screen and (max-width: 1024px) {
	.nm-gallery-lightbox__stage {
		padding: 72px 3.25rem;
	}

	.nm-gallery-lightbox__close {
		top: 16px;
		right: 16px;
	}
}
