/**
 * CPM Bilddatenbank — lightbox styles for [cpm_bild] images. Self-contained;
 * scoped to .cpm-lb-* so it can't collide with the theme. High z-index to clear
 * sticky headers. The caption mirrors the in-content style (white on the dark
 * overlay) so the lightbox feels consistent with the article.
 */
a.cpm-lightbox {
	display: inline-block;
	cursor: zoom-in;
}

.cpm-lb-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba( 0, 0, 0, 0.9 );
	cursor: zoom-out;
}

.cpm-lb-overlay.is-open {
	display: flex;
}

.cpm-lb-fig {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 92vw;
	max-height: 88vh;
	cursor: default;
}

.cpm-lb-img {
	width: auto;
	height: auto;
	max-width: 92vw;
	max-height: 80vh;
	object-fit: contain;
	box-shadow: 0 4px 40px rgba( 0, 0, 0, 0.5 );
}

.cpm-lb-cap {
	margin-top: 10px;
	max-width: 80vw;
	color: #fff;
	text-align: center;
	font-size: 14px;
	line-height: 1.4;
}

.cpm-lb-cap .cpm-lb-title {
	display: block;
}

.cpm-lb-cap .cpm-lb-credit {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	opacity: 0.7;
}

.cpm-lb-close {
	position: absolute;
	top: 16px;
	right: 20px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.12 );
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.cpm-lb-close:hover {
	background: rgba( 255, 255, 255, 0.25 );
}
