/**
 * Farben folgen den Theme-Variablen der Seite (--accent/--base-3), damit die
 * Lightbox-Buttons zum aktuellen Seiten-Look passen. Der dunkle Overlay-Hintergrund
 * bleibt bewusst fix (unabhängig vom Theme), das ist bei Lightboxen Standard und
 * sorgt für maximalen Bildkontrast.
 */

html.taitl-lightbox-open {
	overflow: hidden;
}

.taitl-lightbox-trigger {
	cursor: zoom-in;
}

.taitl-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 8, 16, 20, 0.92 );
	padding: 2.5em;
}

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

.taitl-lightbox-figure {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75em;
}

.taitl-lightbox-image {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.5 );
}

.taitl-lightbox-caption {
	color: var( --base-3, #fff );
	font-size: 0.9em;
	text-align: center;
	max-width: 70ch;
}

.taitl-lightbox-caption:empty {
	display: none;
}

.taitl-lightbox-counter {
	position: absolute;
	bottom: 1.25em;
	left: 50%;
	transform: translateX( -50% );
	color: var( --base-3, #fff );
	font-size: 0.85em;
	background: rgba( 255, 255, 255, 0.15 );
	padding: 0.25em 0.75em;
	border-radius: 999px;
}

.taitl-lightbox-button {
	position: absolute;
	border: none;
	background: rgba( 255, 255, 255, 0.15 );
	color: var( --base-3, #fff );
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.15s ease;
}

.taitl-lightbox-button:hover,
.taitl-lightbox-button:focus-visible {
	background: var( --accent, #1e3a5f );
	outline: none;
}

.taitl-lightbox-close {
	top: 1.25em;
	right: 1.25em;
	width: 44px;
	height: 44px;
	font-size: 1.75em;
	line-height: 1;
}

.taitl-lightbox-prev,
.taitl-lightbox-next {
	top: 50%;
	transform: translateY( -50% );
	width: 52px;
	height: 52px;
	font-size: 2em;
	line-height: 1;
}

.taitl-lightbox-prev {
	left: 1em;
}

.taitl-lightbox-next {
	right: 1em;
}

@media ( max-width: 600px ) {
	.taitl-lightbox-overlay {
		padding: 1em;
	}

	.taitl-lightbox-prev,
	.taitl-lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 1.5em;
	}

	.taitl-lightbox-close {
		width: 38px;
		height: 38px;
		font-size: 1.5em;
	}
}
