/**
 * Car Showcase Lightbox Gallery Styles
 */

/* Prevent scroll when open */
body.cse-lightbox-active {
	overflow: hidden !important;
	touch-action: none;
}

/* Lightbox Modal Root */
.cse-lightbox-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.cse-lightbox-modal.cse-open {
	opacity: 1;
	visibility: visible;
}

/* Backdrop */
.cse-lightbox-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(10, 15, 29, 0.94);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

/* Top Header Bar */
.cse-lightbox-header {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	padding: 20px 24px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 10;
	pointer-events: none;
}

.cse-lightbox-counter {
	color: #e2e8f0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	background: rgba(255, 255, 255, 0.12);
	padding: 6px 14px;
	border-radius: 20px;
	pointer-events: auto;
	user-select: none;
}

.cse-lightbox-close {
	background: rgba(255, 255, 255, 0.14);
	border: none;
	color: #ffffff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	transition: background 0.2s ease, transform 0.15s ease;
	pointer-events: auto;
}

.cse-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.06);
}

/* Image Container */
.cse-lightbox-content {
	position: relative;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 90vw;
	max-height: 82vh;
	user-select: none;
}

.cse-lightbox-img {
	max-width: 100%;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.cse-lightbox-img.cse-transitioning {
	opacity: 0.3;
	transform: scale(0.98);
}

/* Arrow Navigation Buttons */
.cse-lightbox-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
	user-select: none;
}

.cse-lightbox-btn:hover {
	background: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-50%) scale(1.08);
}

.cse-lightbox-btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.cse-lightbox-prev {
	left: 24px;
}

.cse-lightbox-next {
	right: 24px;
}

.cse-lightbox-btn svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

/* Bottom Thumbnail Strip */
.cse-lightbox-thumbs {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	gap: 8px;
	max-width: 90vw;
	overflow-x: auto;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(6px);
	border-radius: 12px;
}

.cse-lightbox-thumb {
	width: 48px;
	height: 36px;
	border-radius: 4px;
	overflow: hidden;
	opacity: 0.5;
	cursor: pointer;
	border: 2px solid transparent;
	transition: opacity 0.2s, border-color 0.2s;
	flex-shrink: 0;
}

.cse-lightbox-thumb.cse-active-thumb {
	opacity: 1;
	border-color: #3b82f6;
}

.cse-lightbox-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Responsive */
@media (max-width: 640px) {
	.cse-lightbox-btn {
		width: 42px;
		height: 42px;
	}

	.cse-lightbox-prev {
		left: 10px;
	}

	.cse-lightbox-next {
		right: 10px;
	}

	.cse-lightbox-content {
		max-width: 96vw;
		max-height: 75vh;
	}

	.cse-lightbox-img {
		max-height: 75vh;
	}

	.cse-lightbox-thumbs {
		bottom: 10px;
	}

	.cse-lightbox-thumb {
		width: 40px;
		height: 30px;
	}
}
