/**
 * MH Spielturm Vergleich — Lightbox Styles
 * v5.0.3: Smaller desktop images (65vw×70vh, max 1200px), tablet/mobile breakpoints
 * Loaded alongside spielturm-vergleich.css.
 */

/* ── Lightbox ── */
.mh-stv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}
.mh-stv-lightbox.is-open {
	display: flex;
}
.mh-stv-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.95);
	cursor: pointer;
}

/* Content: full viewport, centered */
.mh-stv-lightbox-content {
	position: relative;
	z-index: 2;
	width: 90vw;
	height: 90vh;
	max-width: 1400px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Image wrapper (zoom + pan + swipe container) */
.mh-stv-lightbox-imgwrap {
	position: relative;
	overflow: hidden;
	border-radius: 6px;
	width: 88vw;
	height: 84vh;
	max-width: 1400px;
	cursor: default;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: none; /* Prevent browser zoom/scroll during pinch */
}
.mh-stv-lightbox-imgwrap.is-zoomed {
	cursor: grab;
}
.mh-stv-lightbox-imgwrap.is-zoomed:active {
	cursor: grabbing;
}
.mh-stv-lightbox-imgwrap.is-swiping {
	cursor: grabbing;
}

/* Main image — elegant sizing with breathing room */
.mh-stv-lightbox-img {
	position: absolute;
	width: 65vw;
	height: 70vh;
	max-width: 1200px;
	object-fit: contain;
	cursor: zoom-in;
	user-select: none;
	-webkit-user-drag: none;
	will-change: transform;
}
.mh-stv-lightbox-imgwrap.is-zoomed .mh-stv-lightbox-img {
	cursor: grab;
}
.mh-stv-lightbox-imgwrap.is-zoomed .mh-stv-lightbox-img:active {
	cursor: grabbing;
}

/* Peek image (slides in from side during swipe) */
.mh-stv-lightbox-peek {
	position: absolute;
	width: 65vw;
	height: 70vh;
	max-width: 1200px;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	will-change: transform;
	opacity: 0;
	pointer-events: none;
}
.mh-stv-lightbox-peek.is-visible {
	opacity: 1;
}

/* Smooth zoom-in/out animation (only for scale, not during drag/pinch) */
.mh-stv-lightbox-img.is-zoom-animating {
	transition: transform .25s cubic-bezier(.25,.1,.25,1);
}

/* ── Counter: top-center overlay ── */
.mh-stv-lightbox-counter {
	position: absolute;
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 4;
	color: rgba(255,255,255,.75);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .5px;
	background: rgba(0,0,0,.4);
	padding: 4px 14px;
	border-radius: 16px;
	pointer-events: none;
}

/* ── Thumbnail strip: semi-transparent overlay at bottom ── */
.mh-stv-lightbox-thumbs {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 4;
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 8px 14px;
	max-width: 90vw;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 12px;
}
.mh-stv-lightbox-thumbs::-webkit-scrollbar { display: none; }

.mh-stv-lb-thumb {
	width: 52px; height: 52px;
	flex-shrink: 0;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid rgba(255,255,255,.15);
	opacity: .5;
	transition: border-color .15s, opacity .15s;
	padding: 0;
	background: rgba(255,255,255,.05);
}
.mh-stv-lb-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
}
.mh-stv-lb-thumb:hover {
	opacity: .85;
	border-color: rgba(255,255,255,.4);
}
.mh-stv-lb-thumb:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 1px;
	opacity: .85;
}
.mh-stv-lb-thumb.is-active {
	border-color: #fff;
	opacity: 1;
}

/* ── Close button ── */
.mh-stv-lightbox-close {
	position: absolute;
	top: 16px; right: 16px;
	z-index: 5;
	width: 44px; height: 44px;
	border-radius: 50%;
	background: rgba(0,0,0,.5);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
}
.mh-stv-lightbox-close:hover { background: rgba(0,0,0,.75); }
.mh-stv-lightbox-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ── Nav buttons ── */
.mh-stv-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 48px; height: 48px;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, transform .1s;
}
.mh-stv-lightbox-nav:hover { background: rgba(0,0,0,.7); }
.mh-stv-lightbox-nav:active { transform: translateY(-50%) scale(.93); }
.mh-stv-lightbox-nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.mh-stv-lightbox-prev { left: 16px; }
.mh-stv-lightbox-next { right: 16px; }

/* ── 360° in-lightbox overlay ── */
.mh-stv-lb-360-overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,.35);
	cursor: default;
}
.mh-stv-lb-360-activate {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	border-radius: 12px;
	border: 2px solid rgba(255,255,255,.25);
	background: rgba(0,0,0,.6);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s, border-color .15s;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.mh-stv-lb-360-activate:hover {
	background: rgba(0,0,0,.75);
	border-color: rgba(255,255,255,.5);
}
.mh-stv-lb-360-activate svg {
	flex-shrink: 0;
}
/* 360° inline spinner wrapper */
.mh-stv-lb-360-inline {
	border-radius: 6px;
	overflow: hidden;
}
/* 360° lightbox thumb badge */
.mh-stv-lb-thumb-360 {
	position: relative;
}
.mh-stv-lb-thumb-360-badge {
	position: absolute;
	bottom: 2px; right: 2px;
	background: rgba(0,0,0,.7);
	color: #fff;
	font-size: 8px;
	font-weight: 700;
	line-height: 1;
	padding: 2px 4px;
	border-radius: 3px;
	pointer-events: none;
}

/* ── Responsive: tablet (larger images acceptable) ── */
@media (max-width: 1024px) {
	.mh-stv-lightbox-content { width: 96vw; height: 94vh; }
	.mh-stv-lightbox-imgwrap { width: 96vw; height: 90vh; }
	.mh-stv-lightbox-img,
	.mh-stv-lightbox-peek { width: 90vw; height: 78vh; }
}

/* ── Responsive: mobile ── */
@media (max-width: 480px) {
	.mh-stv-lightbox-content { width: 100vw; height: 100vh; }
	.mh-stv-lightbox-imgwrap { width: 100vw; height: 94vh; }
	.mh-stv-lightbox-img,
	.mh-stv-lightbox-peek { width: 96vw; height: 78vh; }
	.mh-stv-lightbox-nav { width: 40px; height: 40px; }
	.mh-stv-lightbox-prev { left: 8px; }
	.mh-stv-lightbox-next { right: 8px; }
	.mh-stv-lightbox-close { top: 8px; right: 8px; width: 38px; height: 38px; }
	.mh-stv-lb-thumb { width: 44px; height: 44px; }
	.mh-stv-lightbox-thumbs { bottom: 8px; padding: 6px 10px; gap: 5px; }
	.mh-stv-lightbox-counter { top: 10px; font-size: 12px; }
}
