/**
 * Boleo Lightbox — vanilla-JS photo slider for utilaj galleries.
 * Zero dependencies. Matches brand color #E10600.
 */

/* Backdrop */
.blg-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	background: rgba(0, 0, 0, 0.94);
	opacity: 0;
	transition: opacity 0.25s ease;
	font-family: 'Roboto', system-ui, -apple-system, Segoe UI, sans-serif;
	color: #fff;
	-webkit-user-select: none;
	user-select: none;
	overscroll-behavior: contain;
	touch-action: pan-y;
}
.blg-lb.is-open {
	display: block;
	opacity: 1;
}

/* Image stage */
.blg-lb-stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px 72px;
	transform: scale(0.97);
	opacity: 0;
	transition: transform 0.25s ease, opacity 0.25s ease;
}
.blg-lb.is-open .blg-lb-stage {
	transform: scale(1);
	opacity: 1;
}
.blg-lb-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
	border-radius: 4px;
	background: #1a1a1a;
	transition: opacity 0.15s ease;
}
.blg-lb-loading .blg-lb-image {
	opacity: 0.35;
}

/* Top bar: counter + close */
.blg-lb-topbar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	padding: 16px 22px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
}
.blg-lb-counter {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	opacity: 0.9;
	pointer-events: auto;
	color: #fff;
}
.blg-lb-close {
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: #fff;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.18s ease, transform 0.18s ease;
	pointer-events: auto;
	padding: 0;
}
.blg-lb-close:hover,
.blg-lb-close:focus-visible {
	background: #E10600;
	transform: scale(1.06);
	outline: none;
}
.blg-lb-close svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* Prev / next arrows */
.blg-lb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: #fff;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background 0.18s ease, transform 0.18s ease;
	padding: 0;
}
.blg-lb-nav:hover,
.blg-lb-nav:focus-visible {
	background: #E10600;
	outline: none;
}
.blg-lb-nav:hover {
	transform: translateY(-50%) scale(1.06);
}
.blg-lb-nav svg {
	width: 22px;
	height: 22px;
	display: block;
}
.blg-lb-prev {
	left: 18px;
}
.blg-lb-next {
	right: 18px;
}
.blg-lb.blg-lb-single .blg-lb-nav {
	display: none;
}

/* Caption */
.blg-lb-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 14px 22px 18px;
	text-align: center;
	font-size: 13px;
	line-height: 1.4;
	color: #fff;
	opacity: 0.85;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
	max-height: 30%;
	overflow: hidden;
}
.blg-lb-caption:empty {
	display: none;
}

/* Body lock when open */
body.blg-lb-open {
	overflow: hidden;
}

/* Cursor hint on thumbnails wired to the lightbox */
a[data-lightbox] {
	cursor: zoom-in;
}

/* Mobile */
@media (max-width: 640px) {
	.blg-lb-stage {
		padding: 52px 8px 46px;
	}
	.blg-lb-nav {
		width: 40px;
		height: 40px;
	}
	.blg-lb-prev {
		left: 6px;
	}
	.blg-lb-next {
		right: 6px;
	}
	.blg-lb-close {
		width: 38px;
		height: 38px;
	}
	.blg-lb-topbar {
		padding: 12px 14px;
	}
	.blg-lb-counter {
		font-size: 12px;
	}
	.blg-lb-caption {
		font-size: 12px;
		padding: 10px 14px 12px;
	}
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.blg-lb,
	.blg-lb-stage,
	.blg-lb-close,
	.blg-lb-nav {
		transition: none !important;
	}
}
