/* Struktur-Vergleich – Ansicht auf der Website.
   Schrift und Textfarbe kommen vom Theme. Anpassen über Variablen, z. B. im Customizer unter „Zusätzliches CSS“:
   .rsv { --rsv-accent: #0a7d5a; --rsv-radius: 0px; } */

.rsv {
	--rsv-accent: #ff5000;
	--rsv-accent-ink: #fff;
	--rsv-radius: 6px;
	--rsv-max-height: 74vh;
	--rsv-pos: 50%;
	--rsv-mix: 1;
	position: relative;
	display: block;
	clear: both;
	margin-top: 1.5em;
	margin-bottom: 1.5em;
	-webkit-tap-highlight-color: transparent;
}

.rsv *,
.rsv *::before,
.rsv *::after {
	box-sizing: border-box;
}

/* ---------- Beispiel ---------- */

.rsv .rsv-item {
	display: none;
	float: none;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.rsv .rsv-item.is-active {
	display: block;
}

.rsv .rsv-view {
	position: relative;
	display: block;
	width: 100%;
	width: min(100%, calc(var(--rsv-max-height) * var(--rsv-ratio, 1.5)));
	aspect-ratio: var(--rsv-ratio, 1.5);
	margin: 0 auto;
	overflow: hidden;
	border-radius: var(--rsv-radius);
	background: #0b0d12;
	container-type: inline-size;
	isolation: isolate;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
	cursor: ew-resize;
}

.rsv[data-modus="blende"] .rsv-view {
	cursor: pointer;
}

.rsv .rsv-layer {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	/* Jede Seite ist eine eigene Ebene: Kacheln und Beschriftung von „ohne“ bleiben unter der Seite „mit“ */
	isolation: isolate;
}

.rsv .rsv-layer > img {
	position: absolute;
	inset: 0;
	display: block;
	width: var(--rsv-bw, 100%);
	height: var(--rsv-bh, 100%);
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
	transform: translate(var(--rsv-tx, 0px), var(--rsv-ty, 0px)) scale(var(--rsv-z, 1));
	transform-origin: 0 0;
}

/* ---------- Zoom: Kacheln über dem Grundbild ---------- */

.rsv .rsv-tiles {
	position: absolute;
	z-index: 1;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.rsv .rsv-tiles[hidden] {
	display: none;
}

.rsv .rsv-tiles img {
	position: absolute;
	display: block;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	opacity: 0;
	transition: opacity 0.18s ease;
	-webkit-user-drag: none;
}

.rsv .rsv-tiles img.is-da {
	opacity: 1;
}

.rsv.rsv-zoomed .rsv-view {
	touch-action: none;
	cursor: grab;
}

.rsv.rsv-zoomed .rsv-view.is-ondiv {
	cursor: ew-resize;
}

.rsv.rsv-zoomed .rsv-view.is-panning {
	cursor: grabbing;
}

/* ---------- Leiste im Bild: Zoom und Vollbild ---------- */

.rsv .rsv-zoom {
	position: absolute;
	z-index: 5;
	bottom: 10px;
	bottom: clamp(8px, 2cqw, 20px);
	left: 10px;
	left: clamp(8px, 2cqw, 20px);
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 8px;
	max-width: calc(100% - 16px);
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: default;
}

.rsv .rsv-zoom-g {
	display: flex;
	align-items: center;
	height: 44px;
	padding: 0 4px 0 0;
	border-radius: 999px;
	background: rgba(7, 9, 13, 0.72);
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.rsv .rsv-zoom-g[hidden],
.rsv .rsv-zoom-p[hidden],
.rsv .rsv-zoom-b[hidden] {
	display: none;
}

.rsv .rsv-zoom-t {
	padding: 0 6px 0 16px;
	opacity: 0.78;
}

.rsv .rsv-zoom-b {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 36px;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
}

/* Die ganze Schaltfläche färbt sich – das bleibt sichtbar, auch wenn ein großer Mauszeiger das Symbol verdeckt */
.rsv .rsv-zoom-b:hover:not(:disabled) {
	background: var(--rsv-accent);
	color: var(--rsv-accent-ink);
}

.rsv .rsv-zoom-b:focus-visible,
.rsv .rsv-zoom-voll:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.rsv .rsv-zoom-b:disabled {
	opacity: 0.35;
	cursor: default;
}

.rsv .rsv-zoom-b svg,
.rsv .rsv-zoom-voll svg {
	display: block;
	flex: none;
	width: 16px;
	height: 16px;
}

/* Hinweis über der Schaltfläche: sagt in Worten, was sie tut */
.rsv .rsv-zoom-b[data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 14px);
	left: 50%;
	padding: 7px 10px;
	border-radius: 6px;
	background: rgba(7, 9, 13, 0.9);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0.08em;
	white-space: nowrap;
	opacity: 0;
	transform: translate(-50%, 4px);
	transition: opacity 0.12s ease, transform 0.12s ease;
	pointer-events: none;
}

.rsv .rsv-zoom-b[data-tip]:hover:not(:disabled)::after,
.rsv .rsv-zoom-b[data-tip]:focus-visible::after {
	opacity: 1;
	transform: translate(-50%, 0);
}

.rsv .rsv-zoom-p {
	min-width: 4.4em;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.rsv .rsv-zoom-voll {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 9px;
	height: 44px;
	padding: 0 18px 0 15px;
	border-radius: 999px;
	background: var(--rsv-accent);
	color: var(--rsv-accent-ink);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	white-space: nowrap;
	cursor: pointer;
	transition: filter 0.12s ease;
}

.rsv .rsv-zoom-voll:hover {
	filter: brightness(1.12);
}

/* Schmale Ansicht (Handy, Hochformat): nur das Nötigste in der Leiste, der Copyright-Vermerk rückt darüber */
/* (Die Regel muss genauer sein als die allgemeine weiter unten – sonst gewinnt jene, und der Vermerk wird abgeschnitten.) */
@container (max-width: 760px) {
	.rsv .rsv-view > .rsv-credit {
		bottom: calc(var(--rsv-vb, 0px) + 64px);
		max-width: calc(100% - 20px);
	}
}

@container (max-width: 400px) {
	.rsv .rsv-zoom-t,
	.rsv .rsv-zoom-p {
		display: none;
	}

	.rsv .rsv-zoom-g {
		padding-left: 4px;
	}
}

/* Schieberegler: links vom Regler „mit“, rechts „ohne“ */
.rsv .rsv-layer-mit {
	-webkit-clip-path: inset(0 calc(100% - var(--rsv-pos)) 0 0);
	clip-path: inset(0 calc(100% - var(--rsv-pos)) 0 0);
}

/* Einblenden: „mit“ liegt über „ohne“ und wird durchsichtig */
.rsv[data-modus="blende"] .rsv-layer-mit {
	-webkit-clip-path: none;
	clip-path: none;
	opacity: var(--rsv-mix);
}

/* ---------- Regler im Bild ---------- */

.rsv .rsv-divider {
	position: absolute;
	z-index: 3;
	top: 0;
	bottom: 0;
	left: var(--rsv-pos);
	width: 2px;
	margin-left: -1px;
	background: #fff;
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.55);
	pointer-events: none;
}

.rsv[data-modus="blende"] .rsv-divider {
	display: none;
}

.rsv .rsv-knob {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	width: clamp(36px, 5.2cqw, 52px);
	height: clamp(36px, 5.2cqw, 52px);
	border-radius: 50%;
	background: #fff;
	color: #0c1018;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
	transform: translate(-50%, -50%);
}

.rsv .rsv-knob svg {
	display: block;
	width: 55%;
	height: 55%;
}

/* ---------- Beschriftung im Bild ---------- */

.rsv .rsv-tag {
	position: absolute;
	z-index: 2;
	top: 12px;
	top: calc(var(--rsv-vt, 0px) + clamp(8px, 2.6cqw, 26px));
	display: flex;
	flex-direction: column;
	gap: 0.2em;
	max-width: 46%;
	max-width: calc(var(--rsv-vw, 100%) * 0.46);
	margin: 0;
	padding: 0.5em 0.75em;
	border-radius: 0.25em;
	background: var(--rsv-accent);
	color: var(--rsv-accent-ink);
	font-family: inherit;
	font-size: 13px;
	font-size: clamp(11px, calc(var(--rsv-vw, 100cqw) * 0.021), 22px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	white-space: nowrap;
	overflow: hidden;
	pointer-events: none;
}

.rsv .rsv-tag-k {
	font-size: 0.55em;
	font-size: max(0.55em, 9px);
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(0, 0, 0, 0.72);
}

.rsv .rsv-tag-k,
.rsv .rsv-tag-l {
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Ohne Scan-Art steht nur „Ohne Struktur“ / „Mit Struktur“ – dann in voller Größe */
.rsv .rsv-tag-solo .rsv-tag-k {
	font-size: 1em;
	letter-spacing: 0.08em;
	color: var(--rsv-accent-ink);
}

.rsv .rsv-tag-mit {
	left: 12px;
	left: calc(var(--rsv-vl, 0px) + clamp(8px, 2.6cqw, 26px));
}

.rsv .rsv-tag-ohne {
	right: 12px;
	right: calc(var(--rsv-vr, 0px) + clamp(8px, 2.6cqw, 26px));
}

.rsv[data-modus="blende"] .rsv-tag {
	max-width: 80%;
	max-width: calc(var(--rsv-vw, 100%) * 0.8);
}

.rsv[data-modus="blende"] .rsv-tag-ohne {
	right: auto;
	left: 12px;
	left: calc(var(--rsv-vl, 0px) + clamp(8px, 2.6cqw, 26px));
	opacity: clamp(0, calc((0.6 - var(--rsv-mix)) / 0.2), 1);
}

.rsv[data-modus="blende"] .rsv-tag-mit {
	opacity: clamp(0, calc((var(--rsv-mix) - 0.4) / 0.2), 1);
}

/* ---------- Einzelbild: ein Scan ohne Vergleich – kein Regler, Zoom und Vollbild wie gewohnt ---------- */

.rsv .rsv-tag-bild {
	left: 12px;
	left: calc(var(--rsv-vl, 0px) + clamp(8px, 2.6cqw, 26px));
	max-width: 80%;
	max-width: calc(var(--rsv-vw, 100%) * 0.8);
}

.rsv:not(.rsv-zoomed) .rsv-einzel .rsv-view {
	cursor: default;
}

.rsv:not(.rsv-zoomed) .rsv-einzel.rsv-hat-zoom .rsv-view {
	cursor: zoom-in;
}

/* Regler und Darstellungswahl gehören zu den Bildpaaren */
.rsv.rsv-zeigt-einzel .rsv-modes,
.rsv.rsv-zeigt-einzel .rsv-range,
.rsv.rsv-zeigt-einzel .rsv-toggle,
.rsv.rsv-zeigt-einzel:not(.rsv-gross) .rsv-controls {
	display: none;
}

/* ---------- Copyright-Vermerk ---------- */

.rsv .rsv-credit {
	position: absolute;
	z-index: 4;
	right: 10px;
	right: calc(var(--rsv-vr, 0px) + clamp(6px, 2cqw, 20px));
	bottom: 10px;
	bottom: calc(var(--rsv-vb, 0px) + clamp(6px, 2cqw, 20px));
	max-width: calc(100% - 430px);
	margin: 0;
	padding: 0.35em 0.7em;
	border-radius: 0.4em;
	background: rgba(7, 9, 13, 0.65);
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	font-size: clamp(10px, 1.5cqw, 14px);
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

/* ---------- Bedienung unter dem Bild ---------- */

.rsv .rsv-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em 1.25em;
	margin: 0.9em 0 0;
	padding: 0;
}

.rsv .rsv-controls[hidden],
.rsv .rsv-toggle[hidden] {
	display: none;
}

.rsv .rsv-modes {
	display: inline-flex;
	flex: 0 1 auto;
	min-width: 0;
	max-width: 100%;
	padding: 3px;
	border: 1px solid rgba(128, 128, 128, 0.45);
	border-radius: 999px;
}

.rsv .rsv-mode,
.rsv .rsv-toggle {
	all: unset;
	box-sizing: border-box;
	display: inline-block;
	min-width: 0;
	padding: 0.45em 1em;
	border-radius: 999px;
	font-size: 14px;
	font-size: clamp(13px, 0.875em, 15px);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
}

.rsv .rsv-mode {
	flex: 0 1 auto;
}

.rsv .rsv-mode.is-on {
	background: var(--rsv-accent);
	color: var(--rsv-accent-ink);
}

.rsv .rsv-toggle {
	flex: 0 1 auto;
	border: 1px solid rgba(128, 128, 128, 0.45);
}

.rsv .rsv-toggle:hover {
	border-color: var(--rsv-accent);
}

.rsv .rsv-mode:focus-visible,
.rsv .rsv-toggle:focus-visible,
.rsv .rsv-thumb:focus-visible {
	outline: 2px solid var(--rsv-accent);
	outline-offset: 2px;
}

.rsv .rsv-range {
	display: flex;
	flex: 1 1 220px;
	align-items: center;
	gap: 0.6em;
	min-width: 0;
	margin: 0;
	padding: 0;
	font-size: 13px;
	font-size: clamp(12px, 0.8125em, 14px);
	font-weight: 400;
	line-height: 1.2;
}

.rsv .rsv-range-end {
	flex: none;
	opacity: 0.75;
}

.rsv .rsv-range input[type="range"] {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 1.75em;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	accent-color: var(--rsv-accent);
	cursor: pointer;
}

/* ---------- Beispielgalerie ---------- */

.rsv .rsv-gallery {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px 12px;
	margin: 1em 0 0;
	padding: 4px;
	list-style: none;
}

.rsv .rsv-gallery li {
	flex: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rsv .rsv-gallery li::before,
.rsv .rsv-gallery li::marker {
	content: none;
}

.rsv .rsv-thumb {
	all: unset;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	max-width: 190px;
	opacity: 0.68;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.rsv .rsv-thumb:hover,
.rsv .rsv-thumb:focus-visible,
.rsv .rsv-thumb.is-active {
	opacity: 1;
}

/* Vorschaubild: das ganze Bild, nicht beschnitten – die Breite ergibt sich aus dem Format */
.rsv .rsv-thumb-bild {
	display: block;
	height: 84px;
	overflow: hidden;
	border-radius: 4px;
	outline: 2px solid transparent;
	outline-offset: 2px;
	background: rgba(128, 128, 128, 0.15);
}

.rsv .rsv-thumb.is-active .rsv-thumb-bild {
	outline-color: var(--rsv-accent);
}

.rsv .rsv-thumb img {
	display: block;
	width: auto;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.rsv .rsv-thumb-wort {
	max-width: 100%;
	overflow: hidden;
	font-size: 12px;
	font-size: clamp(11px, 0.75em, 13px);
	line-height: 1.25;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rsv .rsv-thumb.is-active .rsv-thumb-wort {
	font-weight: 700;
}

.rsv .rsv-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Text unter dem Bild ---------- */

.rsv .rsv-caption {
	margin: 1.1em 0 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
	font-style: normal;
	text-align: left;
}

.rsv .rsv-title {
	margin: 0 0 0.25em;
	padding: 0;
	font-size: 1.2em;
	line-height: 1.3;
}

.rsv .rsv-meta {
	margin: 0 0 0.6em;
	font-size: 0.9em;
	opacity: 0.75;
}

.rsv .rsv-text {
	max-width: 70ch;
	margin: 0;
}

.rsv-leer {
	padding: 0.8em 1em;
	border: 1px dashed rgba(128, 128, 128, 0.6);
}

@media (max-width: 480px) {
	.rsv .rsv-thumb-bild {
		height: 68px;
	}

	.rsv .rsv-mode,
	.rsv .rsv-toggle {
		padding-right: 0.8em;
		padding-left: 0.8em;
	}

	.rsv .rsv-range {
		flex-basis: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rsv .rsv-thumb {
		transition: none;
	}
}

/* ---------- Vollbild: die Ansicht füllt etwa 90 % des Fensters ---------- */

.rsv .rsv-close {
	all: unset;
	box-sizing: border-box;
	flex: none;
	margin-left: auto;
	padding: 0.45em 1em;
	border: 1px solid rgba(128, 128, 128, 0.6);
	border-radius: 999px;
	font-size: 14px;
	font-size: clamp(13px, 0.875em, 15px);
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}

.rsv .rsv-close[hidden] {
	display: none;
}

.rsv .rsv-close:hover {
	border-color: var(--rsv-accent);
}

.rsv .rsv-close:focus-visible {
	outline: 2px solid var(--rsv-accent);
	outline-offset: 2px;
}

.rsv.rsv-gross {
	position: fixed;
	z-index: 2147483000;
	inset: 5vh 5vw;
	display: flex;
	flex-direction: column;
	width: auto;
	height: auto;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 14px;
	overflow: hidden;
	border: 0;
	border-radius: 10px;
	background: #0b0d12;
	color: #f2f4f8;
	/* zweiter Schatten: dunkelt den Rest der Seite ab */
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 0 100vmax rgba(5, 7, 10, 0.72);
}

.rsv.rsv-gross .rsv-item.is-active {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.rsv.rsv-gross .rsv-view {
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	aspect-ratio: auto;
	background: #05070a;
	touch-action: none;
}

.rsv.rsv-gross .rsv-caption {
	display: none;
}

.rsv.rsv-gross .rsv-controls,
.rsv.rsv-gross .rsv-gallery {
	flex: none;
}

.rsv.rsv-gross .rsv-gallery {
	flex-wrap: nowrap;
	margin-top: 0.7em;
	overflow-x: auto;
}

.rsv.rsv-gross .rsv-thumb-bild {
	height: 54px;
}

@media (max-width: 760px) {
	.rsv.rsv-gross {
		inset: 0;
		padding: 8px;
		border-radius: 0;
	}
}
