/* ImageLightbox CSS - Compiled from SCSS */
/* Feature-rich image lightbox component for Bootstrap 5.3 */

/* Main Lightbox Container */
.image-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 300ms ease, visibility 300ms ease;
}

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

/* Backdrop */
.lightbox-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(var(--bs-dark-rgb), 0.9);
	backdrop-filter: blur(2px);
	cursor: pointer;
}

/* Main Container */
.lightbox-container {
	position: relative;
	max-width: 95vw;
	max-height: 95vh;
	display: flex;
	flex-direction: column;
	z-index: 1;
}

/* Content Container */
.lightbox-content {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border-radius: var(--bs-border-radius-lg);
	overflow: hidden;
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

/* Main Image */
.lightbox-image {
	max-width: 100%;
	max-height: 80vh;
	width: auto;
	height: auto;
	display: block;
	border-radius: var(--bs-border-radius-lg);
	transition: transform 300ms ease, opacity 300ms ease;
	user-select: none;
	-webkit-user-drag: none;
}

.lightbox-image:hover {
	cursor: grab;
}

.lightbox-image:active {
	cursor: grabbing;
}

/* Loading Indicator */
.lightbox-loading {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(var(--bs-dark-rgb), 0.7);
	border-radius: var(--bs-border-radius-lg);
	z-index: 2;
}

.lightbox-loading .spinner-border {
	width: 3rem;
	height: 3rem;
}

/* Info Panel */
.lightbox-info {
	position: absolute;
	bottom: -4rem;
	left: 0;
	right: 0;
	background: rgba(var(--bs-dark-rgb), 0.8);
	color: var(--bs-light);
	padding: 1rem;
	border-radius: var(--bs-border-radius);
	text-align: center;
	transition: bottom 300ms ease;
	backdrop-filter: blur(10px);
}

.lightbox-container:hover .lightbox-info {
	bottom: -0.5rem;
}

.lightbox-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
	color: var(--bs-light);
}

.lightbox-description {
	font-size: 0.9rem;
	color: var(--bs-light-emphasis);
	margin-bottom: 0.5rem;
	line-height: 1.4;
}

.lightbox-counter {
	font-size: 0.8rem;
	color: var(--bs-secondary);
	font-weight: 500;
}

/* Close Button */
.lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 3rem;
	height: 3rem;
	background: rgba(var(--bs-light-rgb), 0.1);
	border: none;
	border-radius: var(--bs-border-radius);
	color: var(--bs-light);
	font-size: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 300ms ease, transform 0.1s ease;
	backdrop-filter: blur(10px);
	z-index: 3;
}

.lightbox-close:hover {
	background: rgba(var(--bs-light-rgb), 0.2);
	transform: scale(1.1);
}

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

.lightbox-close span {
	line-height: 1;
	font-weight: 300;
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 4rem;
	height: 4rem;
	background: rgba(var(--bs-light-rgb), 0.1);
	border: none;
	border-radius: var(--bs-border-radius);
	color: var(--bs-light);
	font-size: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 300ms ease, transform 0.1s ease, opacity 300ms ease;
	backdrop-filter: blur(10px);
	z-index: 3;
	opacity: 0.7;
}

.lightbox-prev:hover,
.lightbox-next:hover {
	background: rgba(var(--bs-light-rgb), 0.2);
	opacity: 1;
	transform: translateY(-50%) scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
	transform: translateY(-50%) scale(0.95);
}

.lightbox-prev span,
.lightbox-next span {
	line-height: 1;
	font-weight: 300;
}

.lightbox-prev {
	left: 1rem;
}

.lightbox-next {
	right: 1rem;
}

/* Trigger Image Hover Effects */
.lightbox-trigger {
	cursor: pointer;
	transition: transform 300ms ease;
}

.lightbox-trigger:hover {
	transform: scale(1.05);
}

/* Body modifications when lightbox is open */
body.lightbox-open {
	overflow: hidden;
	padding-right: var(--bs-scrollbar-width, 0);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
	.lightbox-container {
		max-width: 100vw;
		max-height: 100vh;
		padding: 1rem;
	}

	.lightbox-image {
		max-height: 70vh;
	}

	.lightbox-close {
		top: 0.5rem;
		right: 0.5rem;
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.25rem;
	}

	.lightbox-prev,
	.lightbox-next {
		width: 3rem;
		height: 3rem;
		font-size: 1.5rem;
	}

	.lightbox-prev {
		left: 0.5rem;
	}

	.lightbox-next {
		right: 0.5rem;
	}

	.lightbox-info {
		margin-top: 0.5rem;
		padding: 0.75rem;
	}

	.lightbox-title {
		font-size: 1rem;
	}

	.lightbox-description {
		font-size: 0.85rem;
	}

	.lightbox-counter {
		font-size: 0.75rem;
	}
}

/* Small Mobile Devices */
@media (max-width: 480px) {
	.lightbox-container {
		padding: 0.5rem;
	}

	.lightbox-image {
		max-height: 60vh;
	}

	.lightbox-close {
		width: 2rem;
		height: 2rem;
		font-size: 1rem;
	}

	.lightbox-prev,
	.lightbox-next {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.25rem;
	}
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	.lightbox-image {
		image-rendering: -webkit-optimize-contrast;
		image-rendering: crisp-edges;
	}
}

/* Print Styles (Hide lightbox in print) */
@media print {
	.image-lightbox {
		display: none !important;
	}
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
	.image-lightbox,
	.lightbox-image,
	.lightbox-info,
	.lightbox-close,
	.lightbox-prev,
	.lightbox-next,
	.lightbox-trigger {
		transition: none !important;
		animation: none !important;
	}
}

/* Focus Styles for Accessibility */
.lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
	outline: 2px solid var(--bs-primary);
	outline-offset: 2px;
}

/* Dark Theme Adjustments */
[data-bs-theme="dark"] .image-lightbox .lightbox-backdrop {
	background: rgba(0, 0, 0, 0.95);
}

[data-bs-theme="dark"] .image-lightbox .lightbox-info {
	background: rgba(0, 0, 0, 0.9);
}

[data-bs-theme="dark"] .image-lightbox .lightbox-loading {
	background: rgba(0, 0, 0, 0.8);
}