/*
 * PURITS Consent — Banner, Platzhalter und Knopf.
 *
 * Farben und Schrift kommen als Variablen aus banner.js, abgelesen an der
 * Seite selbst. Hier steht nur der Aufbau. Alles ist unter eigenen Klassen
 * eingeschlossen und setzt die wichtigsten Eigenschaften selbst, damit das
 * Theme das Banner nicht verbiegt.
 */

.purits-consent,
.purits-consent-platzhalter,
.purits-consent-wieder {
	--pc-schrift: system-ui, sans-serif;
	--pc-groesse: 16px;
	--pc-hg: #fff;
	--pc-text: #111;
	--pc-akzent: #2563eb;
	--pc-akzent-text: #fff;
	--pc-rand: #2563eb;
	--pc-linie: rgba(0, 0, 0, 0.18);
	box-sizing: border-box;
	font-family: var(--pc-schrift);
	font-size: var(--pc-groesse);
	line-height: 1.5;
	color: var(--pc-text);
	text-align: left;
	letter-spacing: normal;
	text-transform: none;
}

.purits-consent *,
.purits-consent-platzhalter * {
	box-sizing: border-box;
	font-family: inherit;
	letter-spacing: inherit;
	text-transform: none;
}

.purits-consent[hidden],
.purits-consent-wieder[hidden],
.purits-consent [hidden] {
	display: none !important;
}

/* --- Banner ---------------------------------------------------------------- */

.purits-consent {
	position: fixed;
	z-index: 2147483000;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: center;
	padding: 12px;
	pointer-events: none;
}

.purits-consent .pc-karte {
	pointer-events: auto;
	width: 100%;
	max-width: 44rem;
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	background: var(--pc-hg);
	color: var(--pc-text);
	border: 1px solid var(--pc-linie);
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
	padding: 1.25em 1.25em 1em;
}

.purits-consent .pc-titel {
	margin: 0 0 0.4em;
	padding: 0;
	font-size: 1.2em;
	line-height: 1.3;
	font-weight: 700;
	color: inherit;
	border: 0;
	background: none;
}

.purits-consent p {
	margin: 0 0 0.75em;
	padding: 0;
	font-size: 0.95em;
	color: inherit;
}

.purits-consent a,
.purits-consent-platzhalter a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.purits-consent .pc-links {
	font-size: 0.9em;
}

.purits-consent .pc-klein,
.purits-consent-platzhalter .pc-klein {
	font-size: 0.85em;
	opacity: 0.85;
}

/* --- Kategorien ------------------------------------------------------------ */

.purits-consent .pc-auswahl {
	margin: 0.5em 0 1em;
	border-top: 1px solid var(--pc-linie);
}

.purits-consent .pc-kat {
	padding: 0.75em 0;
	border-bottom: 1px solid var(--pc-linie);
}

.purits-consent .pc-kat p {
	margin: 0.25em 0 0.35em 1.9em;
}

.purits-consent .pc-kat-kopf {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	font-weight: 700;
	cursor: pointer;
}

.purits-consent .pc-kat-kopf input {
	width: 1.25em;
	height: 1.25em;
	margin: 0;
	flex: none;
	accent-color: var(--pc-akzent);
	cursor: pointer;
}

.purits-consent .pc-kat-kopf input:disabled {
	cursor: default;
}

.purits-consent details {
	margin: 0 0 0 1.9em;
	font-size: 0.9em;
}

.purits-consent summary {
	cursor: pointer;
	display: list-item;
}

.purits-consent .pc-dienste {
	margin: 0.4em 0 0;
	padding: 0;
	list-style: none;
}

.purits-consent .pc-dienste li {
	margin: 0 0 0.6em;
	padding: 0.5em 0.65em;
	border-left: 3px solid var(--pc-linie);
}

.purits-consent .pc-zeile {
	display: block;
}

/* --- Knöpfe: alle drei gleich, keiner hervorgehoben ------------------------ */

.purits-consent .pc-knoepfe,
.purits-consent-platzhalter .pc-knoepfe {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.purits-consent .pc-knoepfe .pc-knopf {
	flex: 1 1 10em;
}

.purits-consent .pc-knopf,
.purits-consent-platzhalter .pc-knopf {
	display: inline-block;
	margin: 0;
	padding: 0.65em 1em;
	min-height: 44px;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: var(--pc-akzent-text);
	background: var(--pc-akzent);
	border: 2px solid var(--pc-rand);
	border-radius: 6px;
	box-shadow: none;
	cursor: pointer;
	text-decoration: none;
	white-space: normal;
}

.purits-consent .pc-knopf:hover,
.purits-consent-platzhalter .pc-knopf:hover {
	filter: brightness(1.08);
}

.purits-consent .pc-knopf:focus-visible,
.purits-consent-platzhalter .pc-knopf:focus-visible,
.purits-consent-platzhalter .pc-link:focus-visible,
.purits-consent-wieder:focus-visible,
.purits-consent a:focus-visible {
	outline: 3px solid var(--pc-text);
	outline-offset: 2px;
}

/* --- Platzhalter über gesperrten Inhalten ---------------------------------- */

.purits-consent-platzhalter {
	display: flex;
	flex-direction: column;
	justify-content: center;
	/* Passt der Text nicht in den Rahmen, oben anfangen statt oben abschneiden. */
	justify-content: safe center;
	gap: 0.25em;
	width: 100%;
	min-height: 10em;
	margin: 0 0 1em;
	padding: 1.25em;
	background: var(--pc-hg);
	border: 1px solid var(--pc-linie);
	border-radius: 8px;
	overflow: auto;
}

.purits-consent-platzhalter.pc-gefuellt {
	min-height: 0;
	margin: 0;
	padding: 0.75em 1em;
	font-size: 0.9em;
}

.purits-consent-platzhalter p {
	margin: 0 0 0.6em;
	font-size: 0.95em;
}

.purits-consent-platzhalter .pc-link {
	margin: 0;
	padding: 0.4em 0.2em;
	font-size: 0.9em;
	color: inherit;
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

/* --- Knopf zum Wiederöffnen ------------------------------------------------ */

.purits-consent-wieder {
	position: fixed;
	z-index: 2147482999;
	left: 12px;
	bottom: 12px;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pc-akzent-text);
	background: var(--pc-akzent);
	border: 2px solid var(--pc-rand);
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	opacity: 0.85;
}

.purits-consent-wieder:hover {
	opacity: 1;
}

/* Aus dem Shortcode: sieht aus wie ein Link im Text. */
.purits-consent-oeffnen {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 480px) {
	.purits-consent {
		padding: 0;
	}

	.purits-consent .pc-karte {
		max-height: 85vh;
		border-radius: 10px 10px 0 0;
	}

	.purits-consent .pc-knoepfe .pc-knopf {
		flex-basis: 100%;
	}
}

@media print {
	.purits-consent,
	.purits-consent-wieder {
		display: none !important;
	}
}
