.ucw-gallery-grid__link {
	position: relative;
	display: block;
	height: 100%;
	overflow: hidden;
	color: #fff;
}

.ucw-gallery-grid__zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgb(255 255 255 / 72%);
	border-radius: 50%;
	background: rgb(20 43 74 / 82%);
	color: #fff;
	font-size: 1.45rem;
	line-height: 1;
	transition: background-color 180ms ease, transform 180ms ease;
}

.ucw-gallery-grid__link:hover .ucw-gallery-grid__zoom,
.ucw-gallery-grid__link:focus-visible .ucw-gallery-grid__zoom {
	background: #142b4a;
	transform: scale(1.06);
}

body.ucw-lightbox-open {
	overflow: hidden;
}

.ucw-lightbox[hidden] {
	display: none !important;
}

.ucw-lightbox {
	position: fixed;
	z-index: 1000000;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 28px 82px 30px;
	color: #fff;
}

.ucw-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(5 13 23 / 94%);
	cursor: zoom-out;
}

.ucw-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	width: min(1180px, 100%);
	height: min(850px, calc(100vh - 58px));
	outline: none;
}

.ucw-lightbox__stage {
	display: grid;
	place-items: center;
	min-height: 0;
	overflow: hidden;
}

.ucw-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: var(--ucw-content-radius, 5px);
	object-fit: contain;
}

.ucw-lightbox__close,
.ucw-lightbox__previous,
.ucw-lightbox__next {
	position: absolute;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	min-height: 48px;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 68%);
	border-radius: 50%;
	background: rgb(20 43 74 / 86%);
	color: #fff;
	font: inherit;
	font-size: 1.7rem;
	line-height: 1;
	cursor: pointer;
}

.ucw-lightbox__close {
	top: 20px;
	right: 22px;
}

.ucw-lightbox__previous,
.ucw-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
}

.ucw-lightbox__previous {
	left: 18px;
}

.ucw-lightbox__next {
	right: 18px;
}

.ucw-lightbox :is(button):hover:not(:disabled),
.ucw-lightbox :is(button):focus-visible {
	border-color: #fff;
	background: #fff;
	color: #142b4a;
}

.ucw-lightbox :is(button):focus-visible {
	outline: 3px solid #b9875a;
	outline-offset: 3px;
}

.ucw-lightbox :is(button):disabled {
	display: none;
}

.ucw-lightbox__meta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	align-items: start;
	min-height: 32px;
	padding-top: 14px;
	font-size: .92rem;
	line-height: 1.45;
}

.ucw-lightbox__caption {
	margin: 0;
	color: #fff;
}

.ucw-lightbox__counter {
	white-space: nowrap;
	color: rgb(255 255 255 / 78%);
}

@media (max-width: 767px) {
	.ucw-lightbox {
		padding: 68px 16px 24px;
	}

	.ucw-lightbox__dialog {
		height: calc(100dvh - 92px);
	}

	.ucw-lightbox__close {
		top: 12px;
		right: 14px;
	}

	.ucw-lightbox__previous,
	.ucw-lightbox__next {
		top: auto;
		bottom: 76px;
		transform: none;
	}

	.ucw-lightbox__previous {
		left: 14px;
	}

	.ucw-lightbox__next {
		right: 14px;
	}

	.ucw-lightbox__meta {
		padding-inline: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ucw-gallery-grid__zoom {
		transition: none;
	}
}
