/*
 * bm-lightbox: Ersatz für die Bildanzeige von Highslide (hs.expand).
 * Nicht-modal: keine Abdunklung, die Seite bleibt bedienbar; mehrere Fenster gleichzeitig.
 */

/* Vorschaubilder wie bisher mit highslide.css */
.highslide {
	outline: none;
	text-decoration: none;
}
.highslide img {
	border: 2px solid silver;
}
.highslide:hover img {
	border-color: gray;
}

.bm-lb {
	--bm-lb-frame: #fff;
	--bm-lb-bar-bg: rgba(20, 20, 20, 0.62);
	position: absolute;
	left: 0;
	top: 0;
	z-index: 1060;
	box-sizing: content-box;
	padding: 5px;
	background: var(--bm-lb-frame);
	border-radius: 8px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30), 0 2px 6px rgba(0, 0, 0, 0.18);
	transform-origin: 0 0;
	cursor: move;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	outline: none;
}
.bm-lb.bm-lb-active {
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42), 0 3px 8px rgba(0, 0, 0, 0.22);
}
.bm-lb.bm-lb-dragging,
.bm-lb.bm-lb-dragging .bm-lb-img {
	cursor: grabbing;
}
[data-bs-theme="dark"] .bm-lb {
	--bm-lb-frame: #343a40;
}

.bm-lb-img {
	display: block;
	max-width: none;
	border-radius: 4px;
	cursor: zoom-out;
	-webkit-user-drag: none;
}

.bm-lb-error {
	padding: 1rem 1.25rem;
	font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #842029;
	cursor: default;
}
.bm-lb-error a {
	display: inline-block;
	margin-top: 0.4rem;
}

/* HTML-Fenster (hs.htmlExpand): Kopfleiste zum Ziehen, Inhalt normal bedienbar */
.bm-lb-html {
	cursor: default;
	user-select: auto;
	-webkit-user-select: auto;
	touch-action: auto;
	padding: 0;
	overflow: hidden;
	background: var(--bs-body-bg, #fff);
	color: var(--bs-body-color, #212529);
	border: 1px solid var(--bs-border-color, #dee2e6);
}
.bm-lb-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.4rem 0.35rem 0.75rem;
	background: var(--bs-tertiary-bg, #f8f9fa);
	border-bottom: 1px solid var(--bs-border-color, #dee2e6);
	cursor: move;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
}
.bm-lb-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.bm-lb-head button {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.bm-lb-head button:hover,
.bm-lb-head button:focus-visible {
	background: rgba(127, 127, 127, 0.2);
	outline: none;
}
.bm-lb-head svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bm-lb-body {
	position: relative;
	box-sizing: border-box;
	min-height: 80px;
	padding: 0.75rem;
	overflow: auto;
}
.bm-lb-body iframe {
	display: block;
	width: 100%;
	border: 0;
}
.bm-lb-body:has(> iframe) {
	padding: 0;
}

/* Bedienleiste: erscheint beim Überfahren und kurz nach dem Öffnen */
.bm-lb-bar {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: var(--bm-lb-bar-bg);
	color: #fff;
	opacity: 0;
	transition: opacity 0.2s ease;
	cursor: default;
}
.bm-lb:hover .bm-lb-bar,
.bm-lb:focus-within .bm-lb-bar,
.bm-lb.bm-lb-show-bar .bm-lb-bar {
	opacity: 1;
}
@media (hover: none) {
	.bm-lb-bar {
		opacity: 1;
	}
}
.bm-lb-bar button {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.bm-lb-bar button:hover,
.bm-lb-bar button:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	outline: none;
}
.bm-lb-bar button:disabled {
	opacity: 0.35;
	cursor: default;
	background: transparent;
}
.bm-lb-bar svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bm-lb-counter {
	padding: 0 6px 0 8px;
	font: 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	white-space: nowrap;
}
.bm-lb-single .bm-lb-nav,
.bm-lb-single .bm-lb-counter {
	display: none;
}

/* Ladeanzeige (am Vorschaubild bzw. im Fenster beim Blättern) */
.bm-lb-spin {
	position: absolute;
	z-index: 1080;
	width: 26px;
	height: 26px;
	margin: -13px 0 0 -13px;
	box-sizing: border-box;
	border: 3px solid rgba(255, 255, 255, 0.85);
	border-top-color: #0d6efd;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.25);
	animation: bm-lb-spin 0.8s linear infinite;
	pointer-events: none;
}
.bm-lb .bm-lb-spin {
	left: 50%;
	top: 50%;
}
@keyframes bm-lb-spin {
	to {
		transform: rotate(360deg);
	}
}
a.bm-lb-loading {
	cursor: progress;
}
