/* Picture Viewer Component Styles */

/* Gallery Container - Responsive Heights */
#main_container {
	margin-bottom: 2rem;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Stacked gallery (mobile only) */
.stacked-gallery {
	display: none;
}

.stacked-gallery img {
	width: 100%;
	display: block;
	margin-bottom: 1rem;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.stacked-gallery img.loaded {
	opacity: 1;
}

/* Mobile: hide viewer, show stacked */
@media (max-width: 768px) {
	#main_container,
	.gallery-nav {
		display: none !important;
	}

	.stacked-gallery {
		display: block;
	}
}

/* Gallery Image */
#main_container img {
	width: 100%;
	height: 100%;
	max-height: 700px;
	object-fit: contain;
	transition: opacity 0.3s ease;
}

/* Image Loader */
.gallery-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(245, 245, 245, 0.6);
	z-index: 5;
	pointer-events: none;
}

.gallery-loader-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: #1a1a1a;
	border-radius: 50%;
	animation: gallery-spin 0.7s linear infinite;
}

@keyframes gallery-spin {
	to { transform: rotate(360deg); }
}

/* LQIP Blur-up */
#main_container img.lqip-blur {
	filter: blur(3px);
	opacity: 0.7;
}

#main_container img.lqip-loaded {
	filter: blur(0);
	opacity: 1;
	transition: filter 0.6s ease-out, opacity 0.6s ease-out;
}

/* Stacked gallery blur-up */
.stacked-gallery img.lqip-blur {
	filter: blur(20px);
	transform: scale(1.05);
}

.stacked-gallery img.lqip-loaded {
	filter: blur(0);
	transform: scale(1);
	transition: filter 0.5s ease, transform 0.5s ease, opacity 0.6s ease;
}

/* Navigation Arrows */
.gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	color: white;
	border: none;
	padding: 1rem;
	cursor: pointer;
	z-index: 10;
	border-radius: 4px;
	transition: background 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-arrow:hover {
	background: rgba(0, 0, 0, 0.8);
}

.gallery-arrow.prev {
	left: 1rem;
}

.gallery-arrow.next {
	right: 1rem;
}

.gallery-arrow svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
}

/* Page Number Buttons */
.page-number-btn {
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	background: white;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.9rem;
	border-radius: 4px;
}

.page-number-btn.active {
	background: #1a1a1a;
	color: white;
	border-color: #1a1a1a;
}

.page-number-btn:hover {
	border-color: #1a1a1a;
	transform: scale(1.08);
}

.gallery-arrow:active {
	transform: translateY(-50%) scale(0.95);
}
