/**
 * Mediathek – Dokument-Viewer (eigene Seite, auch eingebettet per iframe).
 * Eigene Seite ohne Theme: Farben und Schriften sind hier vollständig festgelegt.
 */

:root {
	--prm-v-primaer: #24527a;
	--prm-v-text: #1d2327;
	--prm-v-leise: #50575e;
	--prm-v-rand: #dfe3e8;
	--prm-v-flaeche: #fff;
	--prm-v-grund: #e9eef2;
	--prm-v-fokus: 0 0 0 2px #fff, 0 0 0 4px #24527a;
}

html,
body.prm-viewer-seite {
	height: 100%;
	margin: 0;
	padding: 0;
	background: var(--prm-v-grund);
	color: var(--prm-v-text);
	font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.prm-viewer {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.prm-v-leiste {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	padding: 6px 10px;
	border-bottom: 1px solid var(--prm-v-rand);
	background: var(--prm-v-flaeche);
}

.prm-v-titel {
	flex: 1 1 180px;
	min-width: 0;
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.prm-v-marke {
	flex: 0 0 auto;
	padding: 2px 8px;
	border: 1px solid currentcolor;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0.8;
	cursor: help;
}

.ist-eingebettet .prm-v-titel {
	flex-basis: 100px;
	font-size: 13px;
}

.prm-v-gruppe {
	display: flex;
	gap: 4px;
	align-items: center;
}

.prm-v-gruppe.ist-rechts {
	margin-left: auto;
}

.prm-v-knopf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--prm-v-rand);
	border-radius: 6px;
	background: var(--prm-v-flaeche);
	color: var(--prm-v-text);
	text-decoration: none;
	cursor: pointer;
}

.prm-v-knopf:hover {
	border-color: var(--prm-v-primaer);
	color: var(--prm-v-primaer);
}

.prm-v-knopf:focus-visible,
.prm-v-seite:focus-visible,
.prm-v-zoom:focus-visible,
.prm-v-suchfeld:focus-visible,
.prm-v-mini:focus-visible,
.prm-v-behaelter:focus-visible {
	outline: none;
	box-shadow: var(--prm-v-fokus);
}

.prm-v-knopf[disabled] {
	opacity: 0.4;
	cursor: default;
}

.prm-v-knopf[aria-pressed="true"] {
	border-color: var(--prm-v-primaer);
	background: #e9eef2;
	color: var(--prm-v-primaer);
}

.prm-v-knopf svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.prm-v-seite {
	width: 56px;
	height: 34px;
	padding: 0 6px;
	border: 1px solid var(--prm-v-rand);
	border-radius: 6px;
	color: var(--prm-v-text);
	font: inherit;
	text-align: center;
}

.prm-v-gesamt,
.prm-v-treffer {
	min-width: 42px;
	color: var(--prm-v-leise);
	font-size: 13px;
	white-space: nowrap;
}

.prm-v-zoom,
.prm-v-suchfeld {
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--prm-v-rand);
	border-radius: 6px;
	background: var(--prm-v-flaeche);
	color: var(--prm-v-text);
	font: inherit;
}

.prm-v-suchfeld {
	width: 180px;
}

.prm-v-buehne {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.prm-v-miniaturen[hidden] {
	display: none;
}

.prm-v-miniaturen {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
	box-sizing: border-box;
	width: 160px;
	padding: 12px 8px;
	overflow-y: auto;
	border-right: 1px solid var(--prm-v-rand);
	background: #f4f6f8;
}

.prm-v-mini {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	padding: 4px;
	border: 2px solid transparent;
	border-radius: 6px;
	background: none;
	color: var(--prm-v-leise);
	font: 12px/1 system-ui, sans-serif;
	cursor: pointer;
}

.prm-v-mini[aria-current="page"] {
	border-color: var(--prm-v-primaer);
	color: var(--prm-v-primaer);
}

.prm-v-mini-bild {
	display: block;
	width: 120px;
	min-height: 150px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.15);
}

.prm-v-mini-bild canvas {
	display: block;
	width: 120px;
}

.prm-v-behaelter {
	position: absolute;
	inset: 0;
	overflow: auto;
}

.prm-v-miniaturen:not([hidden]) + .prm-v-behaelter {
	left: 160px;
}

/* stylelint-disable-next-line selector-class-pattern -- Klassen von PDF.js. */
.prm-v-behaelter .pdfViewer .page {
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.18);
}

.prm-v-einfach {
	position: absolute;
	inset: 0;
	padding: 20px;
	overflow: auto;
	text-align: center;
}

.prm-v-bild {
	max-width: 100%;
	height: auto;
	background: #fff;
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.18);
}

.prm-v-text {
	display: inline-block;
	box-sizing: border-box;
	width: 100%;
	max-width: 900px;
	margin: 0;
	padding: 24px;
	background: #fff;
	color: var(--prm-v-text);
	font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace;
	text-align: left;
	white-space: pre-wrap;
	word-break: break-word;
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.18);
}

.prm-v-html {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
}

.prm-v-meldung {
	max-width: 560px;
	margin: 48px auto;
	padding: 20px 24px;
	border: 1px solid var(--prm-v-rand);
	border-radius: 8px;
	background: var(--prm-v-flaeche);
	text-align: center;
}

.prm-v-meldung.ist-fehler {
	border-color: #f3b4ae;
}

.prm-v-meldung p {
	margin: 0 0 12px;
}

.prm-v-link {
	color: var(--prm-v-primaer);
	font-weight: 600;
}

.prm-v-status {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.prm-viewer-hinweis {
	padding: 24px;
}

.prm-druck {
	display: none;
}

@media (max-width: 640px) {

	.prm-v-titel {
		flex-basis: 100%;
	}

	.prm-v-suchfeld {
		width: 120px;
	}

	.prm-v-miniaturen {
		width: 110px;
	}

	.prm-v-mini-bild,
	.prm-v-mini-bild canvas {
		width: 80px;
		min-height: 100px;
	}

	.prm-v-miniaturen:not([hidden]) + .prm-v-behaelter {
		left: 110px;
	}
}

@media print {

	html,
	body.prm-viewer-seite {
		height: auto;
		background: #fff;
	}

	body.ist-druck > :not(#prm-druck) {
		display: none !important;
	}

	body.ist-druck .prm-druck {
		display: block;
	}

	.prm-druck-seite {
		break-after: page;
		page-break-after: always;
	}

	.prm-druck-seite img {
		display: block;
		width: 100%;
		height: auto;
	}

	.prm-v-leiste,
	.prm-v-miniaturen {
		display: none !important;
	}

	.prm-v-einfach {
		position: static;
		padding: 0;
	}
}
