/* ---------- Auslöser ---------- */

.ist-vergroesserbar {
	cursor: zoom-in;
}

body.hat-lightbox-offen {
	overflow: hidden;
}

/* ---------- Overlay ---------- */

.hilwoge-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: rgba(30, 30, 30, 0.9);
}

.hilwoge-lightbox[hidden] {
	display: none;
}

.hilwoge-lightbox-buehne {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	max-height: 100%;
	flex: 1;
}

.hilwoge-lightbox-bild {
	max-width: 100%;
	max-height: calc(100vh - 100px);
	width: auto;
	height: auto;
	display: block;
	object-fit: contain;
	transition: opacity .15s ease;
}

.hilwoge-lightbox-bild.ist-ladend {
	opacity: 0;
}

/* ---------- Bedienelemente ---------- */

.hilwoge-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s ease;
}

.hilwoge-lightbox button:hover,
.hilwoge-lightbox button:focus-visible {
	background-color: rgba(255, 255, 255, 0.25);
}

.hilwoge-lightbox button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.hilwoge-lightbox button[hidden] {
	display: none;
}

.hilwoge-lightbox button svg {
	width: 24px;
	height: 24px;
}

.hilwoge-lightbox-schliessen {
	top: 16px;
	right: 16px;
}

.hilwoge-lightbox-zurueck {
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.hilwoge-lightbox-vor {
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
}

/* ---------- Zähler ---------- */

.hilwoge-lightbox-zaehler {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
}

.hilwoge-lightbox-zaehler[hidden] {
	display: none;
}

/* ---------- Mobil ---------- */

@media (max-width: 600px) {
	.hilwoge-lightbox {
		padding: 12px;
	}

	.hilwoge-lightbox button {
		width: 40px;
		height: 40px;
	}

	.hilwoge-lightbox-zurueck {
		left: 8px;
	}

	.hilwoge-lightbox-vor {
		right: 8px;
	}

	.hilwoge-lightbox-bild {
		max-height: calc(100vh - 140px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hilwoge-lightbox-bild,
	.hilwoge-lightbox button {
		transition: none;
	}
}
