.bg7-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .94);
	padding: 30px;
	box-sizing: border-box;
}

.bg7-lightbox.is-open { display: flex; }

.bg7-lightbox-inner {
	position: relative;
	width: 100%;
	height: 100%;
	max-width: 1500px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 25px;
}

/* Main image is on the LEFT; thumbnails are on the RIGHT. */
.bg7-lightbox-main {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bg7-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.bg7-lightbox-thumbs {
	order: 2;
	width: 110px;
	height: 100%;
	max-height: 800px;
	flex: 0 0 110px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 5px;
	box-sizing: border-box;
	scrollbar-width: thin;
}

.bg7-lightbox-thumb {
	width: 100px;
	height: 75px;
	object-fit: cover;
	display: block;
	flex: 0 0 auto;
	cursor: pointer;
	opacity: .5;
	border: 2px solid transparent;
	box-sizing: border-box;
	transition: opacity .2s ease, border-color .2s ease;
}

.bg7-lightbox-thumb:hover { opacity: .85; }
.bg7-lightbox-thumb.active { opacity: 1; border-color: #fff; }

.bg7-lightbox-close,
.bg7-lightbox-prev,
.bg7-lightbox-next {
	position: absolute;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	cursor: pointer;
	z-index: 10;
	transition: background .2s ease;
}

.bg7-lightbox-close:hover,
.bg7-lightbox-prev:hover,
.bg7-lightbox-next:hover { background: rgba(255, 255, 255, .3); }

.bg7-lightbox-close {
	top: 5px;
	right: 5px;
	width: 45px;
	height: 45px;
	font-size: 30px;
	line-height: 1;
}

.bg7-lightbox-prev,
.bg7-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	font-size: 34px;
	line-height: 1;
}

.bg7-lightbox-prev { left: 15px; }
.bg7-lightbox-next { right: 15px; }

@media (max-width: 700px) {
	.bg7-lightbox { padding: 15px; }

	.bg7-lightbox-inner {
		flex-direction: column;
		gap: 10px;
	}

	.bg7-lightbox-main {
		height: calc(100% - 85px);
	}

	.bg7-lightbox-thumbs {
		order: 2;
		width: 100%;
		height: 75px;
		max-height: 75px;
		flex: 0 0 75px;
		flex-direction: row;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.bg7-lightbox-thumb {
		width: 80px;
		height: 60px;
	}

	.bg7-lightbox-image {
		max-width: 100%;
		max-height: 80vh;
	}

	.bg7-lightbox-prev,
	.bg7-lightbox-next {
		width: 42px;
		height: 42px;
		font-size: 26px;
	}

	.bg7-lightbox-prev { left: 5px; }
	.bg7-lightbox-next { right: 5px; }
}
