/**
 * Einwilligungsbanner.
 *
 * Die Farben kommen als CSS-Variablen aus den Einstellungen – wahlweise
 * aus der Palette des Themes. Deshalb steht hier nur Struktur, keine feste
 * Farbe.
 */

.pcc-huelle {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	padding: clamp(0.75rem, 3vw, 1.5rem);
	pointer-events: none;
}

.pcc-huelle[hidden] { display: none; }

.pcc-huelle.hat-schleier::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	pointer-events: auto;
	animation: pcc-ein 0.3s ease both;
}

.pcc-huelle[data-position="unten"] { align-items: flex-end; justify-content: center; }
.pcc-huelle[data-position="oben"] { align-items: flex-start; justify-content: center; }
.pcc-huelle[data-position="mitte"] { align-items: center; justify-content: center; }

.pcc-banner {
	position: relative;
	pointer-events: auto;
	width: 100%;
	max-width: 44rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: clamp(1.25rem, 4vw, 2rem);
	background: var(--pcc-grund, #fff);
	color: var(--pcc-text, #1a1a1a);
	border-radius: var(--pcc-ecken, 16px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 24px 60px rgba(0, 0, 0, 0.22);
	font-size: 15px;
	line-height: 1.6;
	animation: pcc-auf 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pcc-huelle[data-layout="leiste"] .pcc-banner { max-width: 62rem; }

@keyframes pcc-ein { from { opacity: 0; } to { opacity: 1; } }

@keyframes pcc-auf {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

.pcc-banner__titel {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
}

.pcc-banner__text { margin: 0 0 1.25rem; }
.pcc-banner__text p { margin: 0 0 0.5rem; }
.pcc-banner__text p:last-child { margin-bottom: 0; }
.pcc-banner__text a { color: inherit; }

/* Auswahl der Kategorien */
.pcc-auswahl {
	margin: 0 0 1.25rem;
	padding: 1rem 0 0;
	border-top: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 18%, transparent);
	display: grid;
	gap: 1rem;
}

.pcc-auswahl[hidden] { display: none; }

.pcc-kategorie__kopf {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
	cursor: pointer;
}

.pcc-kategorie__schalter {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0;
	accent-color: var(--pcc-aktion, #333);
	flex: 0 0 auto;
	cursor: pointer;
}

.pcc-kategorie__schalter:disabled { cursor: default; opacity: 0.55; }

.pcc-kategorie__pflicht {
	font-size: 0.75rem;
	font-weight: 500;
	opacity: 0.65;
	margin-left: auto;
}

.pcc-kategorie__text {
	margin: 0.25rem 0 0 1.75rem;
	font-size: 0.8125rem;
	opacity: 0.8;
}

/*
 * Schaltflächen: „Annehmen“ und „Ablehnen“ sind bewusst identisch gestaltet.
 * Ein hervorgehobenes „Annehmen“ neben einem blassen „Ablehnen“ gilt als
 * unzulässige Beeinflussung.
 */
.pcc-knoepfe {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.pcc-knopf {
	flex: 1 1 10rem;
	padding: 0.85rem 1.25rem;
	border: 2px solid var(--pcc-aktion, #333);
	border-radius: 999px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: filter 0.18s ease, transform 0.15s ease;
}

.pcc-knopf--haupt {
	background: var(--pcc-aktion, #333);
	color: var(--pcc-aktion-text, #fff);
}

.pcc-knopf--neben {
	background: transparent;
	color: var(--pcc-text, #1a1a1a);
	border-color: color-mix(in srgb, currentColor 30%, transparent);
	flex: 0 1 auto;
}

.pcc-knopf:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pcc-knopf:focus-visible { outline: 3px solid var(--pcc-aktion, #333); outline-offset: 2px; }

.pcc-banner__fuss {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	opacity: 0.75;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pcc-banner__fuss a { color: inherit; }

/* Knopf zum erneuten Öffnen */
.pcc-widerruf {
	position: fixed;
	left: 1rem;
	bottom: 1rem;
	z-index: 99998;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--pcc-text, #1a1a1a) 15%, transparent);
	border-radius: 999px;
	background: var(--pcc-grund, #fff);
	color: var(--pcc-text, #1a1a1a);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.pcc-widerruf:hover { opacity: 1; transform: scale(1.05); }

/* Verweis im Fließtext */
.pcc-oeffnen--link {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.pcc-oeffnen--knopf {
	padding: 0.6rem 1.1rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}

/* Platzhalter für gesperrte Einbettungen */
.pcc-gesperrt {
	display: grid;
	place-items: center;
	min-height: 260px;
	padding: 1.5rem;
	background: color-mix(in srgb, var(--pcc-text, #1a1a1a) 6%, transparent);
	border: 1px dashed color-mix(in srgb, var(--pcc-text, #1a1a1a) 25%, transparent);
	border-radius: var(--pcc-ecken, 16px);
	text-align: center;
}

.pcc-gesperrt__inner { max-width: 32rem; }
.pcc-gesperrt__titel { margin: 0 0 0.35rem; font-weight: 700; }
.pcc-gesperrt__text { margin: 0 0 1rem; font-size: 0.875rem; opacity: 0.8; }

.pcc-gesperrt__knopf,
.pcc-gesperrt__immer {
	padding: 0.7rem 1.25rem;
	margin: 0.25rem;
	border-radius: 999px;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.pcc-gesperrt__knopf {
	background: var(--pcc-aktion, #333);
	color: var(--pcc-aktion-text, #fff);
	border: 2px solid var(--pcc-aktion, #333);
}

.pcc-gesperrt__immer {
	background: transparent;
	color: inherit;
	border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 600px) {
	.pcc-knopf { flex: 1 1 100%; }
	.pcc-widerruf { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
	.pcc-banner,
	.pcc-huelle.hat-schleier::before { animation: none; }
	.pcc-knopf, .pcc-widerruf { transition: none; }
}

/* Wo color-mix fehlt, greifen einfache Ersatzwerte. */
@supports not (color: color-mix(in srgb, #000 10%, transparent)) {
	.pcc-auswahl { border-top-color: rgba(128, 128, 128, 0.3); }
	.pcc-knopf--neben { border-color: rgba(128, 128, 128, 0.4); }
	.pcc-gesperrt { background: rgba(128, 128, 128, 0.08); border-color: rgba(128, 128, 128, 0.35); }
}


/* -------------------------------------------------------------------------
 * Cookie-Richtlinie
 *
 * Tabellen sind auf dem Telefon der klassische Ausreißer. Deshalb bricht
 * jede Zeile dort zu einem kleinen Block um, mit der Spaltenüberschrift
 * davor - lesbar, ohne seitwärts schieben zu müssen.
 * ---------------------------------------------------------------------- */

.pcc-richtlinie__stand {
	font-size: 0.9em;
	opacity: 0.75;
}

.pcc-richtlinie__gruppe {
	margin: 0 0 2.5rem;
}

.pcc-richtlinie__tabelle {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.8rem;
	font-size: 0.95em;
}

.pcc-richtlinie__tabelle th,
.pcc-richtlinie__tabelle td {
	padding: 0.6rem 0.7rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.pcc-richtlinie__tabelle th {
	font-weight: 600;
	white-space: nowrap;
}

.pcc-richtlinie__tabelle code {
	font-size: 0.95em;
	word-break: break-word;
}

.pcc-richtlinie__dienst,
.pcc-richtlinie__hinweis {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.85em;
	opacity: 0.75;
}

.pcc-richtlinie__widerruf {
	margin-top: 2rem;
}

@media (max-width: 640px) {
	.pcc-richtlinie__tabelle thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.pcc-richtlinie__tabelle tr {
		display: block;
		margin-bottom: 1rem;
		padding-bottom: 0.6rem;
		border-bottom: 2px solid rgba(0, 0, 0, 0.12);
	}

	.pcc-richtlinie__tabelle td {
		display: block;
		border: 0;
		padding: 0.25rem 0;
	}

	.pcc-richtlinie__tabelle td::before {
		content: attr(data-spalte) ": ";
		font-weight: 600;
	}
}
