.entry-content figure.wp-block-image > img,
.entry-content figure.wp-block-image > a[href$="#"] img,
.wp-block-post-content figure.wp-block-image > img,
/* Bilder, die auf die Bilddatei verlinken, öffnen ebenfalls die Lightbox – also auch Lupe statt Hand */
.entry-content a:is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".webp" i], [href$=".gif" i]) img,
.ms-termine-bild a img { cursor: zoom-in; }

.ms-lightbox-offen { overflow: hidden; }

.ms-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000; /* über der Admin-Leiste (99999) */
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .92);
}
.ms-lightbox.ist-offen { display: flex; }

.ms-lightbox__figur {
	margin: 0;
	max-width: calc(100vw - 120px);
	max-height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
	align-items: center;
}
.ms-lightbox__figur img {
	max-width: 100%;
	max-height: calc(100vh - 130px);
	object-fit: contain;
	transition: opacity .2s;
}
.ms-lightbox.ist-ladend .ms-lightbox__figur img { opacity: .3; }
.ms-lightbox__figur figcaption {
	margin-top: 10px;
	color: #eee;
	font-size: 15px;
	text-align: center;
}

.ms-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border: 0;
	margin: 0;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	width: 52px;
	height: 52px;
	min-width: 0;
	min-height: 0;
	border-radius: 50%;
	padding: 0;
	box-shadow: none;
	transition: background .15s;
}
.ms-lightbox button svg { display: block; }
.ms-lightbox button:hover { background: rgba(255, 255, 255, .3); }
.ms-lightbox button:focus { outline: none; }
.ms-lightbox button:focus-visible { background: rgba(255, 255, 255, .3); outline: 2px solid #fff; outline-offset: 2px; }
.ms-lightbox__zu { top: 16px; right: 16px; }
.ms-lightbox__zurueck { left: 16px; top: 50%; transform: translateY(-50%); }
.ms-lightbox__weiter { right: 16px; top: 50%; transform: translateY(-50%); }
.ms-lightbox.ist-einzeln .ms-lightbox__zurueck,
.ms-lightbox.ist-einzeln .ms-lightbox__weiter { display: none; }

.ms-lightbox__zaehler {
	position: absolute;
	top: 26px;
	left: 20px;
	color: #ccc;
	font-size: 14px;
}

@media (max-width: 600px) {
	.ms-lightbox__figur { max-width: 100vw; }
	.ms-lightbox__zurueck, .ms-lightbox__weiter { top: auto; bottom: 16px; transform: none; }
}
