/* ==========================================================================
   Elementor Grid Gallery Lightbox – Styles
   Version: 1.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Thumbnail cursor hint
   -------------------------------------------------------------------------- */
.egl-gallery img,
.egl-gallery-auto img {
	cursor: zoom-in;
	transition: filter 0.25s ease, transform 0.25s ease;
}

.egl-gallery img:hover,
.egl-gallery-auto img:hover {
	filter: brightness(1.12);
	transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   2. Overlay
   -------------------------------------------------------------------------- */
.egl-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Prevent body scroll when lightbox is open */
body.egl-lightbox-open {
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   3. Image container & image
   -------------------------------------------------------------------------- */
.egl-lightbox-image-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 60px 80px;
	box-sizing: border-box;
}

.egl-lightbox-image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
	transform: scale(0.92);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
	            opacity 0.3s ease;
	user-select: none;
	-webkit-user-drag: none;
}

.egl-lightbox-overlay.egl-active .egl-lightbox-image {
	transform: scale(1);
	opacity: 1;
}

/* Directional slide animations for image navigation */

/* Slide OUT to the left (used when going NEXT) */
.egl-lightbox-image.egl-slide-out-left {
	animation: eglSlideOutLeft 0.28s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

/* Slide OUT to the right (used when going PREV) */
.egl-lightbox-image.egl-slide-out-right {
	animation: eglSlideOutRight 0.28s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

/* Slide IN from the right (used when going NEXT) */
.egl-lightbox-image.egl-slide-in-right {
	animation: eglSlideInRight 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Slide IN from the left (used when going PREV) */
.egl-lightbox-image.egl-slide-in-left {
	animation: eglSlideInLeft 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes eglSlideOutLeft {
	from {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
	to {
		opacity: 0;
		transform: translateX(-80px) scale(0.95);
	}
}

@keyframes eglSlideOutRight {
	from {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
	to {
		opacity: 0;
		transform: translateX(80px) scale(0.95);
	}
}

@keyframes eglSlideInRight {
	from {
		opacity: 0;
		transform: translateX(80px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

@keyframes eglSlideInLeft {
	from {
		opacity: 0;
		transform: translateX(-80px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

/* --------------------------------------------------------------------------
   4. Spinner / loading
   -------------------------------------------------------------------------- */
.egl-lightbox-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: #fff;
	border-radius: 50%;
	animation: egl-spin 0.7s linear infinite;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.egl-lightbox-spinner.egl-visible {
	opacity: 1;
}

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

/* --------------------------------------------------------------------------
   5. Navigation arrows
   -------------------------------------------------------------------------- */
.egl-lightbox-overlay .egl-lightbox-nav,
.egl-lightbox-overlay .egl-lightbox-nav:link,
.egl-lightbox-overlay .egl-lightbox-nav:visited {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: none !important;
	border-radius: 50%;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: rgba(255, 255, 255, 0.55) !important;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
	outline: none !important;
	padding: 0 !important;
	margin: 0;
	box-shadow: none !important;
	text-decoration: none !important;
	-webkit-appearance: none;
	appearance: none;
	line-height: 1;
	font-size: 0;
	letter-spacing: 0;
	text-indent: 0;
}

.egl-lightbox-overlay .egl-lightbox-nav:hover,
.egl-lightbox-overlay .egl-lightbox-nav:focus {
	color: rgba(255, 255, 255, 0.95) !important;
	background: transparent !important;
	background-color: transparent !important;
	transform: translateY(-50%) scale(1.1);
	opacity: 1;
	box-shadow: none !important;
}

.egl-lightbox-overlay .egl-lightbox-nav:active {
	transform: translateY(-50%) scale(0.9);
}

.egl-lightbox-overlay .egl-lightbox-nav:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.4) !important;
	outline-offset: 2px;
}

.egl-lightbox-prev {
	left: 16px;
}

.egl-lightbox-next {
	right: 16px;
}

.egl-lightbox-overlay .egl-lightbox-nav svg {
	width: 28px;
	height: 28px;
	fill: none !important;
	stroke: rgba(255, 255, 255, 0.55) !important;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	color: inherit;
}

.egl-lightbox-overlay .egl-lightbox-nav:hover svg,
.egl-lightbox-overlay .egl-lightbox-nav:focus svg {
	stroke: rgba(255, 255, 255, 0.95) !important;
}

/* --------------------------------------------------------------------------
   6. Close button
   -------------------------------------------------------------------------- */
.egl-lightbox-overlay .egl-lightbox-close,
.egl-lightbox-overlay .egl-lightbox-close:link,
.egl-lightbox-overlay .egl-lightbox-close:visited {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none !important;
	border-radius: 50%;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: rgba(255, 255, 255, 0.55) !important;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
	outline: none !important;
	padding: 0 !important;
	margin: 0;
	box-shadow: none !important;
	text-decoration: none !important;
	-webkit-appearance: none;
	appearance: none;
	line-height: 1;
	font-size: 0;
}

.egl-lightbox-overlay .egl-lightbox-close:hover,
.egl-lightbox-overlay .egl-lightbox-close:focus {
	color: rgba(255, 255, 255, 0.95) !important;
	background: transparent !important;
	background-color: transparent !important;
	transform: scale(1.1);
	box-shadow: none !important;
}

.egl-lightbox-overlay .egl-lightbox-close:active {
	transform: scale(0.9);
}

.egl-lightbox-overlay .egl-lightbox-close:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.4) !important;
	outline-offset: 2px;
}

.egl-lightbox-overlay .egl-lightbox-close svg {
	width: 22px;
	height: 22px;
	fill: none !important;
	stroke: rgba(255, 255, 255, 0.55) !important;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.egl-lightbox-overlay .egl-lightbox-close:hover svg,
.egl-lightbox-overlay .egl-lightbox-close:focus svg {
	stroke: rgba(255, 255, 255, 0.95) !important;
}

/* --------------------------------------------------------------------------
   7. Counter (e.g. "3 / 6")
   -------------------------------------------------------------------------- */
.egl-lightbox-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
	             Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue",
	             sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.65);
	background: rgba(0, 0, 0, 0.45);
	padding: 6px 16px;
	border-radius: 20px;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	user-select: none;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. Thumbnail strip (bottom)
   -------------------------------------------------------------------------- */
.egl-lightbox-thumbs {
	position: absolute;
	bottom: 56px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	gap: 8px;
	max-width: 80%;
	overflow-x: auto;
	padding: 6px 10px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.egl-lightbox-thumbs::-webkit-scrollbar {
	height: 4px;
}

.egl-lightbox-thumbs::-webkit-scrollbar-track {
	background: transparent;
}

.egl-lightbox-thumbs::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
}

.egl-lightbox-thumb {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	cursor: pointer;
	opacity: 0.45;
	border: 2px solid transparent;
	transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	user-select: none;
	-webkit-user-drag: none;
}

.egl-lightbox-thumb:hover {
	opacity: 0.75;
	transform: scale(1.05);
}

.egl-lightbox-thumb.egl-thumb-active {
	opacity: 1;
	border-color: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------------------
   9. Responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.egl-lightbox-image-wrapper {
		padding: 50px 16px 90px;
	}

	.egl-lightbox-nav {
		width: 40px;
		height: 40px;
	}

	.egl-lightbox-prev {
		left: 8px;
	}

	.egl-lightbox-next {
		right: 8px;
	}

	.egl-lightbox-nav svg {
		width: 20px;
		height: 20px;
	}

	.egl-lightbox-close {
		top: 10px;
		right: 10px;
		width: 38px;
		height: 38px;
	}

	.egl-lightbox-close svg {
		width: 18px;
		height: 18px;
	}

	.egl-lightbox-counter {
		bottom: 14px;
		font-size: 13px;
	}

	.egl-lightbox-thumbs {
		bottom: 44px;
		gap: 6px;
		padding: 4px 8px;
	}

	.egl-lightbox-thumb {
		width: 38px;
		height: 38px;
	}
}

/* --------------------------------------------------------------------------
   10. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.egl-lightbox-overlay,
	.egl-lightbox-image,
	.egl-lightbox-nav,
	.egl-lightbox-close,
	.egl-lightbox-thumb,
	.egl-gallery img,
	.egl-gallery-auto img {
		transition: none;
	}

	.egl-lightbox-image.egl-slide-out-left,
	.egl-lightbox-image.egl-slide-out-right,
	.egl-lightbox-image.egl-slide-in-left,
	.egl-lightbox-image.egl-slide-in-right {
		animation: none;
	}

	.egl-lightbox-spinner {
		animation: none;
	}
}
