/* DJV Cookie- und Consent-Banner, Platzhalter für externe Medien, Cookie-Übersicht. Alle Klassen mit Präfix djv-consent bzw. djv-embed. */

.djv-consent,
.djv-embed,
.djv-consent-uebersicht {
	--djv-c-blau: #013879;
	--djv-c-blau-dunkel: #012a5c;
	--djv-c-orange: #e97023;
	--djv-c-text: #3c3c3b;
	--djv-c-kachel: #e6ebf2;
	--djv-c-rand: #b9c4d4;
	font-family: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--djv-c-text);
}

.djv-consent *,
.djv-consent *::before,
.djv-consent *::after,
.djv-embed *,
.djv-embed *::before,
.djv-embed *::after,
.djv-consent-uebersicht *,
.djv-consent-uebersicht *::before,
.djv-consent-uebersicht *::after {
	box-sizing: border-box;
}

.djv-consent[hidden],
.djv-consent [hidden],
.djv-embed [hidden] {
	display: none !important;
}

.djv-consent .djv-sr-only,
.djv-embed .djv-sr-only,
.djv-consent-uebersicht .djv-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ===== Banner ===== */
.djv-consent {
	position: fixed;
	z-index: 2147483000;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
}

.djv-consent--ebene2 {
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(1, 42, 92, 0.6);
	pointer-events: auto;
}

.djv-consent__dialog {
	width: 100%;
	max-width: 920px;
	margin: 0 auto;
	padding: 24px 28px;
	border-top: 4px solid var(--djv-c-orange);
	background: #fff;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.22);
	pointer-events: auto;
	overflow-wrap: anywhere;
}

.djv-consent--ebene1 .djv-consent__dialog {
	margin-bottom: 16px;
	width: calc(100% - 32px);
}

.djv-consent--ebene2 .djv-consent__dialog {
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.djv-consent__dialog:focus,
.djv-consent__dialog:focus-visible {
	/* Der Container nimmt nur den Fokus beim Öffnen auf; sichtbare Fokusrahmen haben alle bedienbaren Elemente. */
	outline: none;
}

.djv-consent__titel {
	margin: 0 0 8px;
	color: var(--djv-c-blau);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
}

.djv-consent__kopf {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
}

.djv-consent__text,
.djv-consent__kat-text {
	margin: 0 0 12px;
	font-size: 15px;
}

.djv-consent__links {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 600;
}

.djv-consent a,
.djv-embed a,
.djv-consent-uebersicht a {
	color: var(--djv-c-blau);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.djv-consent a:hover,
.djv-embed a:hover,
.djv-consent-uebersicht a:hover {
	color: var(--djv-c-blau-dunkel);
	text-decoration-thickness: 2px;
}

/* Knöpfe: "Alle akzeptieren" und "Nur notwendige" sind identisch gestaltet. */
.djv-consent .djv-consent-knopf[type="button"],
.djv-embed .djv-consent-knopf[type="button"],
.djv-consent-uebersicht .djv-consent-knopf[type="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 0;
	padding: 10px 22px;
	border: 2px solid var(--djv-c-blau);
	border-radius: 0;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none;
}

.djv-consent .djv-consent-knopf--voll[type="button"],
.djv-embed .djv-consent-knopf--voll[type="button"],
.djv-consent-uebersicht .djv-consent-knopf--voll[type="button"] {
	background: var(--djv-c-blau);
	color: #fff;
}

.djv-consent .djv-consent-knopf--voll[type="button"]:hover,
.djv-consent .djv-consent-knopf--voll[type="button"]:focus,
.djv-embed .djv-consent-knopf--voll[type="button"]:hover,
.djv-embed .djv-consent-knopf--voll[type="button"]:focus,
.djv-consent-uebersicht .djv-consent-knopf--voll[type="button"]:hover,
.djv-consent-uebersicht .djv-consent-knopf--voll[type="button"]:focus {
	border-color: var(--djv-c-blau-dunkel);
	background: var(--djv-c-blau-dunkel);
	color: #fff;
}

.djv-consent .djv-consent-knopf--rahmen[type="button"] {
	background: #fff;
	color: var(--djv-c-blau);
}

.djv-consent .djv-consent-knopf--rahmen[type="button"]:hover,
.djv-consent .djv-consent-knopf--rahmen[type="button"]:focus {
	border-color: var(--djv-c-blau-dunkel);
	background: var(--djv-c-kachel);
	color: var(--djv-c-blau-dunkel);
}

.djv-consent .djv-consent-knopf--klein[type="button"] {
	min-height: 40px;
	padding: 6px 16px;
	font-size: 15px;
}

.djv-consent .djv-consent-knopf[type="button"]:focus-visible,
.djv-embed .djv-consent-knopf[type="button"]:focus-visible,
.djv-consent-uebersicht .djv-consent-knopf[type="button"]:focus-visible,
.djv-consent a:focus-visible,
.djv-embed a:focus-visible,
.djv-consent-uebersicht a:focus-visible,
.djv-consent summary:focus-visible,
.djv-consent input:focus-visible,
.djv-embed input:focus-visible {
	outline: 3px solid var(--djv-c-orange);
	outline-offset: 3px;
}

.djv-consent__knoepfe {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.djv-consent__knoepfe .djv-consent-knopf {
	flex: 1 1 180px;
}

/* Zweite Ebene */
.djv-consent__form {
	margin: 0 0 12px;
}

.djv-consent__kategorie {
	margin: 0 0 12px;
	padding: 14px 16px;
	border: 1px solid var(--djv-c-rand);
	background: #fff;
	min-width: 0;
}

.djv-consent__schalter {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
}

.djv-consent__schalter-label {
	color: var(--djv-c-blau);
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
}

.djv-consent__immer {
	color: var(--djv-c-text);
	font-size: 14px;
	font-weight: 400;
}

.djv-consent .djv-consent__schalter-feld {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 52px;
	height: 30px;
	margin: 0;
	border: 2px solid var(--djv-c-blau);
	border-radius: 15px;
	background: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.djv-consent .djv-consent__schalter-feld::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--djv-c-blau);
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.djv-consent .djv-consent__schalter-feld:checked {
	background: var(--djv-c-blau);
}

.djv-consent .djv-consent__schalter-feld:checked::before {
	background: #fff;
	transform: translateX(22px);
}

.djv-consent .djv-consent__schalter-feld:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.djv-consent__details {
	margin-top: 4px;
}

.djv-consent__details summary {
	display: inline-block;
	padding: 4px 0;
	color: var(--djv-c-blau);
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.djv-consent__details[open] summary {
	margin-bottom: 8px;
}

/* Tabellen (Banner und Übersicht) */
.djv-consent-tabelle {
	width: 100%;
	margin: 0 0 12px;
	border-collapse: collapse;
	font-size: 14px;
	table-layout: fixed;
}

.djv-consent-tabelle th,
.djv-consent-tabelle td {
	padding: 8px 10px;
	border: 1px solid var(--djv-c-rand);
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
}

.djv-consent-tabelle th {
	background: var(--djv-c-kachel);
	color: var(--djv-c-blau);
	font-weight: 700;
}

.djv-consent-tabelle code {
	font-size: 13px;
	word-break: break-all;
}

.djv-consent-hinweis {
	margin: 0 0 12px;
	font-size: 14px;
}

/* Platz für das untere Banner, damit Impressum und Datenschutz im Footer erreichbar bleiben. */
body.djv-consent-unten {
	padding-bottom: var(--djv-consent-hoehe, 0);
}

html.djv-consent-sperre {
	overflow: hidden;
}

/* ===== Platzhalter für externe Medien ===== */
.djv-embed {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
	margin: 0 0 1em;
	padding: 20px;
	border: 1px solid var(--djv-c-rand);
	background: var(--djv-c-kachel);
	overflow-wrap: anywhere;
}

.wp-block-embed__wrapper:has(> .djv-embed)::before {
	display: none;
}

.djv-embed__inhalt,
.djv-embed__titel,
.djv-embed__name,
.djv-embed__text,
.djv-embed__noscript {
	display: block;
}

.djv-embed__inhalt {
	width: 100%;
	max-width: 560px;
}

.djv-embed__titel {
	margin: 0 0 6px;
	color: var(--djv-c-blau);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.djv-embed__name {
	margin: 0 0 6px;
	font-size: 14px;
	font-style: italic;
}

.djv-embed__text {
	margin: 0 0 12px;
	font-size: 14px;
}

.djv-embed__aktion {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 20px;
}

.djv-embed__immer {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.djv-embed__immer input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--djv-c-blau);
}

.djv-embed .djv-embed__inhalt a:link,
.djv-embed .djv-embed__inhalt a:visited {
	color: var(--djv-c-blau);
}

.djv-embed__noscript {
	margin: 12px 0 0;
	font-size: 14px;
}

/* ===== Übersicht /cookie/ ===== */
.djv-consent-uebersicht h2 {
	margin: 28px 0 8px;
	color: var(--djv-c-blau);
	font-size: 22px;
	line-height: 1.25;
}

.djv-consent-uebersicht__kat {
	margin-top: 8px;
}

.djv-consent-id code {
	display: inline-block;
	padding: 2px 8px;
	background: var(--djv-c-kachel);
	font-size: 14px;
	word-break: break-all;
}

/* ===== Mobil ===== */
@media (max-width: 767px) {

	.djv-consent__dialog {
		padding: 18px 16px;
	}

	.djv-consent--ebene1 .djv-consent__dialog {
		width: calc(100% - 16px);
		margin-bottom: 8px;
	}

	.djv-consent--ebene2 {
		padding: 8px;
	}

	.djv-consent--ebene2 .djv-consent__dialog {
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
	}

	.djv-consent__titel {
		font-size: 20px;
	}

	.djv-consent__knoepfe .djv-consent-knopf {
		flex: 1 1 100%;
	}

	/* Tabellen als gestapelte Karten, damit nichts seitlich scrollt. */
	.djv-consent-tabelle,
	.djv-consent-tabelle tbody,
	.djv-consent-tabelle tr,
	.djv-consent-tabelle td {
		display: block;
		width: 100%;
	}

	.djv-consent-tabelle thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.djv-consent-tabelle tr {
		margin-bottom: 10px;
		border: 1px solid var(--djv-c-rand);
	}

	.djv-consent-tabelle td {
		border: 0;
		border-bottom: 1px solid var(--djv-c-kachel);
	}

	.djv-consent-tabelle td::before {
		content: attr(data-label);
		display: block;
		color: var(--djv-c-blau);
		font-size: 12px;
		font-weight: 700;
		text-transform: uppercase;
	}

	.djv-embed {
		min-height: 200px;
		padding: 14px;
	}

	.djv-embed .djv-consent-knopf[type="button"] {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.djv-consent .djv-consent__schalter-feld,
	.djv-consent .djv-consent__schalter-feld::before {
		transition: none;
	}
}
