/**
 * Vanilla Lightbox Styles
 * Event Gallery Showcase
 */

.egs-lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(10, 15, 29, 0.94);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 999999;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
	user-select: none;
	box-sizing: border-box;
}

.egs-lightbox-overlay.egs-active {
	opacity: 1;
	visibility: visible;
}

/* Top bar: counter & close button */
.egs-lightbox-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 24px;
	color: #ffffff;
	z-index: 10;
}

.egs-lightbox-counter {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.75);
	letter-spacing: 0.5px;
}

.egs-lightbox-controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.egs-lightbox-btn {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
	padding: 0;
}

.egs-lightbox-btn:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.08);
}

.egs-lightbox-btn:active {
	transform: scale(0.95);
}

.egs-lightbox-btn svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
}

/* Center Stage */
.egs-lightbox-stage {
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	padding: 10px 80px;
}

.egs-lightbox-img-wrap {
	max-width: 100%;
	max-height: calc(100vh - 180px);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(0.95);
	opacity: 0;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.egs-lightbox-overlay.egs-active .egs-lightbox-img-wrap {
	transform: scale(1);
	opacity: 1;
}

.egs-lightbox-image {
	max-width: 100%;
	max-height: calc(100vh - 180px);
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
	transition: opacity 0.2s ease;
}

/* Navigation Arrow Buttons */
.egs-lightbox-prev,
.egs-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	z-index: 10;
}

.egs-lightbox-prev {
	left: 20px;
}

.egs-lightbox-next {
	right: 20px;
}

.egs-lightbox-prev:hover {
	transform: translateY(-50%) scale(1.08);
}

.egs-lightbox-next:hover {
	transform: translateY(-50%) scale(1.08);
}

/* Spinner */
.egs-lightbox-spinner {
	position: absolute;
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: egs-spin 0.8s linear infinite;
	display: none;
}

@keyframes egs-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Bottom Caption Bar */
.egs-lightbox-bottombar {
	padding: 16px 24px;
	background: rgba(15, 23, 42, 0.8);
	text-align: center;
	max-height: 120px;
	overflow-y: auto;
	color: #ffffff;
	z-index: 10;
}

.egs-lightbox-title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 4px 0;
	color: #ffffff;
}

.egs-lightbox-caption {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.8);
	margin: 0;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.egs-lightbox-topbar {
		padding: 14px 18px;
	}

	.egs-lightbox-btn.egs-lightbox-close {
		width: 44px;
		height: 44px;
	}

	.egs-lightbox-stage {
		padding: 10px 12px;
	}

	.egs-lightbox-prev,
	.egs-lightbox-next {
		width: 44px;
		height: 44px;
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
		background: rgba(15, 23, 42, 0.6);
		backdrop-filter: blur(4px);
	}

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

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

	.egs-lightbox-image {
		max-height: calc(100vh - 190px);
		border-radius: 6px;
	}

	.egs-lightbox-bottombar {
		padding: 12px 16px;
		max-height: 90px;
	}

	.egs-lightbox-title {
		font-size: 14px;
	}

	.egs-lightbox-caption {
		font-size: 12px;
	}
}
