/* ACF Lite Gallery — lightbox v3.0.1
   Standalone: the overlay only. Enqueue with the alg-lightbox handle.
   The overlay is appended to <body>, so its variable lives on :root. */

:root {
	--alg-overlay: rgba(0, 0, 0, 0.92);
}

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

.alg-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--alg-overlay, rgba(0, 0, 0, 0.92));
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	overscroll-behavior: contain;
}

.alg-lb.is-open {
	opacity: 1;
	visibility: visible;
}

.alg-lb__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 4vmin 8vmin;
	box-sizing: border-box;
}

.alg-lb__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 2px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.alg-lb__img.is-loaded {
	opacity: 1;
}

.alg-lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.alg-lb__btn:hover,
.alg-lb__btn:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

.alg-lb__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.alg-lb__btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.alg-lb__close {
	top: 16px;
	right: 16px;
}

.alg-lb__prev {
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.alg-lb__next {
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.alg-lb__btn[hidden],
.alg-lb__bar[hidden] {
	display: none;
}

.alg-lb__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
	color: #fff;
	font-size: 0.85rem;
	line-height: 1.4;
	text-align: center;
	pointer-events: none;
}

.alg-lb__caption {
	max-width: 60ch;
}

.alg-lb__counter {
	opacity: 0.7;
	font-variant-numeric: tabular-nums;
}

.alg-lb__caption[hidden] {
	display: none;
}

.alg-lb__spinner {
	position: absolute;
	width: 28px;
	height: 28px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: alg-spin 0.7s linear infinite;
	pointer-events: none;
}

.alg-lb__spinner[hidden] {
	display: none;
}

body.alg-lb-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.alg-lb__stage {
		padding: 12vmin 4vmin;
	}

	.alg-lb__prev {
		left: 8px;
	}

	.alg-lb__next {
		right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.alg-lb,
	.alg-lb__img {
		transition: none;
		animation: none;
	}
}
