/*
 * Lightbox (assets/js/lightbox.js and the offer gallery): full-screen dark
 * <dialog>, image contained, arrows at the sides, count and close on top.
 */
.e-lightbox {
	box-sizing: border-box;
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	color: var(--wp--preset--color--text-inverse);
	background: transparent;
	border: 0;
}

.e-lightbox::backdrop {
	background-color: rgb(14 14 12 / 0.94);
}

.e-lightbox[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
}

.e-lightbox__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 8px 8px 20px;
}

.e-lightbox__count {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm);
	font-variant-numeric: tabular-nums;
}

.e-lightbox__stage {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	place-items: center;
	min-height: 0;
	margin: 0;
	padding: 0 8px 16px;
}

.e-lightbox__image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	touch-action: pan-y;
	user-select: none;
}

.e-lightbox__caption {
	padding-top: 12px;
	font-size: var(--wp--preset--font-size--sm);
	text-align: center;
}

.e-lightbox__caption:empty {
	display: none;
}

:is(.e-lightbox__close, .e-lightbox__prev, .e-lightbox__next) {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1;
	color: inherit;
	cursor: pointer;
	background: rgb(14 14 12 / 0.5);
	border: 1px solid rgb(240 240 230 / 0.25);
	border-radius: 50%;
}

:is(.e-lightbox__prev, .e-lightbox__next) {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
}

.e-lightbox__prev {
	left: 16px;
}

.e-lightbox__next {
	right: 16px;
}

.e-lightbox.is-single :is(.e-lightbox__prev, .e-lightbox__next) {
	display: none;
}

@media (max-width: 599px) {

	:is(.e-lightbox__prev, .e-lightbox__next) {
		display: none;
	}
}
