/***********************************************************************
*  Modal / Lightbox (JS driven)
**********************************************************************/
.modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	padding: 10px;
	background-color: rgba(0, 0, 0, 0.95);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-content {
	position: relative;
	width: 92vw;
	height: 92vh;
	margin: 0 auto;
	display: flex;
	text-align: center;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#lb-main-img {
	margin: 0;
	display: block;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-height: calc(92vh - 170px);
	object-fit: contain;
	margin: 0 auto;
}

.prev,
.next {
	cursor: pointer;
	position: absolute;
	top: 50%;
	padding: 18px;
	margin-top: -34px;
	color: #fff;
	font-weight: bold;
	font-size: 42px;
	user-select: none;
	text-decoration: none;
	transform: translateY(-50%);
}

.prev {
	left: 0;
}
.next {
	right: 0;
}

.prev:hover,
.close:hover,
.next:hover {
	background-color: rgba(0, 0, 0, 0.35);
	color: #999;
}

.numbertext {
	position: absolute;
	top: 0;
	left: 0;
	color: #f2f2f2;
	font-size: 18px;
}

.close {
	position: absolute;
	top: 0;
	right: 0;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 44px;
	font-weight: bold;
	cursor: pointer;
}

.modal-nav {
	flex: 0 0 auto;
}

.caption-container {
	color: #fff;
	margin: 0 0 10px;
}

.lb-thumbs {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.lb-thumbs img {
	height: 64px;
	flex: 0 0 auto;
	opacity: 0.6;
	cursor: pointer;
}

.lb-thumbs img.is-active,
.lb-thumbs img:hover {
	opacity: 1;
}

html.lb-lock,
body.lb-lock {
	overflow: hidden;
	height: 100%;
	touch-action: none;
}
