.tir-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	padding: 2rem;
	background: rgba(10, 15, 24, 0.92);
}

.tir-lightbox[hidden] {
	display: none;
}

.tir-lightbox__figure {
	max-width: min(1100px, 92vw);
	max-height: 90vh;
	margin: 0;
	text-align: center;
}

.tir-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	margin: auto;
	object-fit: contain;
}

.tir-lightbox__caption {
	margin-top: 0.75rem;
	color: #fff;
	font-size: 1rem;
}

.tir-lightbox__counter {
	display: block;
	margin-top: 0.35rem;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.875rem;
}

.tir-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.tir-lightbox__nav {
	position: absolute;
	top: 50%;
	width: 52px;
	height: 52px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	transform: translateY(-50%);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.tir-lightbox__nav:hover,
.tir-lightbox__nav:focus-visible {
	background: var(--primary-color, #a98b63);
	transform: translateY(-50%) scale(1.06);
}

.tir-lightbox__nav--prev {
	left: max(1rem, calc((100vw - 1240px) / 2));
}

.tir-lightbox__nav--next {
	right: max(1rem, calc((100vw - 1240px) / 2));
}

@media (max-width: 767.98px) {
	.tir-lightbox {
		padding: 4rem 0.75rem 5rem;
	}

	.tir-lightbox__nav {
		top: auto;
		bottom: 1rem;
		width: 46px;
		height: 46px;
		transform: none;
	}

	.tir-lightbox__nav:hover,
	.tir-lightbox__nav:focus-visible {
		transform: scale(1.06);
	}

	.tir-lightbox__nav--prev {
		left: calc(50% - 58px);
	}

	.tir-lightbox__nav--next {
		right: calc(50% - 58px);
	}
}

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

[data-tir-lightbox] {
	cursor: zoom-in;
}
