/* 
 * Streamline Custom Lightbox
 */
.sl-lightbox-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.9);
	z-index: 999999;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sl-lightbox-overlay.sl-active {
	opacity: 1;
	visibility: visible;
}

.sl-lightbox-header {
	display: flex;
	justify-content: flex-end;
	padding: 20px;
}
.sl-lightbox-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 30px;
	cursor: pointer;
	line-height: 1;
	opacity: 0.7;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	flex-shrink: 0;
}
.sl-lightbox-close:hover { opacity: 1; }

.sl-lightbox-main {
	flex: 1;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 60px;
	min-height: 0; /* Crucial for flexbox to constrain image height */
	overflow: hidden;
}
.sl-lightbox-image {
	max-width: 100%;
	max-height: 100%;
	height: 100%;
	width: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.sl-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.1);
	border: none;
	color: #fff;
	font-size: 24px;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	flex-shrink: 0;
}
.sl-lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.sl-lightbox-prev { left: 20px; }
.sl-lightbox-next { right: 20px; }

.sl-lightbox-footer {
	padding: 20px;
	background: rgba(0,0,0,0.5);
}
.sl-lightbox-meta {
	text-align: center;
	color: #fff;
	margin-bottom: 15px;
	font-size: 14px;
}
.sl-lightbox-title {
	font-weight: bold;
	margin-right: 15px;
	text-transform: uppercase;
	letter-spacing: 1px;
}
.sl-lightbox-counter {
	color: #aaa;
}

.sl-lightbox-thumbs {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding-bottom: 10px;
	justify-content: center;
}
.sl-lightbox-thumbs::-webkit-scrollbar {
	height: 6px;
}
.sl-lightbox-thumbs::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,0.3);
	border-radius: 3px;
}
.sl-lightbox-thumb {
	width: 80px;
	height: 60px;
	flex-shrink: 0;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	border: 2px solid transparent;
	border-radius: 4px;
	opacity: 0.6;
	transition: all 0.2s;
}
.sl-lightbox-thumb:hover { opacity: 0.9; }
.sl-lightbox-thumb.sl-active {
	opacity: 1;
	border-color: #e53e3e; /* Red border from reference */
}
@media (max-width: 768px) {
	.sl-lightbox-main {
		padding: 0 15px;
	}
	.sl-lightbox-nav {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}
	.sl-lightbox-prev { left: 5px; }
	.sl-lightbox-next { right: 5px; }
	
	.sl-lightbox-thumb {
		width: 60px;
		height: 45px;
	}
}
