/*
 * Tasklytic Kern: Einwilligungsbanner und Datenschutz-Einstellungen. Farben aus dem Theme, mit Ersatzwerten.
 * Gleiche Gestaltung wie das Fenster „Barrierefreiheit“ des Themes: dunkle Fläche, feiner blauer Rand, runde Ecken.
 */

.tl-einwilligung[hidden],
.tl-einwilligung [hidden] {
	display: none !important;
}

/* ---------- Gemeinsam: Banner und Einstellungen ---------- */

.tl-einwilligung__banner,
.tl-einwilligung__dialog {
	box-sizing: border-box;
	border: 1px solid rgba(60, 184, 255, 0.35);
	border-radius: 18px;
	background: var(--tl-nacht, #00070e);
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
	color: var(--tl-text-hell, #e7edf3);
	font-family: var(--tl-schrift, system-ui, sans-serif);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.tl-einwilligung__banner p,
.tl-einwilligung__banner ul,
.tl-einwilligung__dialog p {
	margin: 0 0 10px;
}

.tl-einwilligung__banner a,
.tl-einwilligung__dialog a {
	color: var(--tl-blau-hell, #3cb8ff);
	text-underline-offset: 3px;
}

.tl-einwilligung__banner :focus-visible,
.tl-einwilligung__dialog :focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 3px;
}

.tl-einwilligung__kopf {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
}

.tl-einwilligung__symbol {
	flex: none;
	width: 28px;
	height: 28px;
	fill: none;
	stroke: var(--tl-blau-titel, #0aa6f0);
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tl-einwilligung__titel {
	margin: 0;
	color: #ffffff;
	font-family: var(--tl-schrift-titel, system-ui, sans-serif);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

.tl-einwilligung__klein {
	color: var(--tl-grau-dunkel, #9aa6b4);
	font-size: 0.875rem;
}

/* Ablehnen und Zustimmen sind gleich gestaltet, keine Wahl wird hervorgehoben. */
.tl-einwilligung__knopf {
	min-height: 44px;
	padding: 0 18px;
	border: 1.5px solid var(--tl-blau, #00a7fe);
	border-radius: var(--tl-radius, 6px);
	background: var(--tl-blau, #00a7fe);
	color: var(--tl-tinte, #08111b);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s;
}

.tl-einwilligung__knopf:hover,
.tl-einwilligung__knopf:focus-visible {
	border-color: #35bbff;
	background: #35bbff;
}

/* ---------- Banner unten links, auf dem Handy über die ganze Breite ---------- */

.tl-einwilligung__banner {
	position: fixed;
	left: max(20px, env(safe-area-inset-left, 0px));
	bottom: max(20px, env(safe-area-inset-bottom, 0px));
	z-index: 70;
	width: min(440px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 20px 22px 14px;
}

.tl-einwilligung__liste {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
	list-style: none;
}

.tl-einwilligung__liste li + li {
	margin-top: 6px;
}

.tl-einwilligung__liste strong {
	color: #ffffff;
}

.tl-einwilligung__knoepfe {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 14px;
}

.tl-einwilligung__textknopf {
	grid-column: 1 / -1;
	justify-self: center;
	min-height: 44px;
	padding: 0 12px;
	border: 0;
	background: transparent;
	color: var(--tl-blau-hell, #3cb8ff);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.tl-einwilligung__textknopf:hover {
	color: #ffffff;
}

/* ---------- Einstellungen ---------- */

.tl-einwilligung__dialog {
	width: min(480px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	padding: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.tl-einwilligung__dialog::backdrop {
	background: rgba(0, 7, 14, 0.55);
}

/* Kopf mit Schließen bleibt beim Blättern stehen. */
.tl-einwilligung__kopf--dialog {
	position: sticky;
	top: 0;
	z-index: 1;
	margin: 0;
	padding: 14px 10px 12px 22px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: var(--tl-nacht, #00070e);
}

.tl-einwilligung__kopf--dialog .tl-einwilligung__titel {
	flex: 1 1 auto;
}

/* Auf schmalen Geräten ohne Schild, damit „Datenschutz-Einstellungen“ in eine Zeile passt */
@media (max-width: 420px) {
	.tl-einwilligung__kopf--dialog {
		padding-left: 18px;
	}

	.tl-einwilligung__kopf--dialog .tl-einwilligung__symbol {
		display: none;
	}

	.tl-einwilligung__kopf--dialog .tl-einwilligung__titel {
		font-size: 1rem;
	}
}

.tl-einwilligung__zu {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
}

.tl-einwilligung__zu:hover,
.tl-einwilligung__zu:focus-visible {
	background: rgba(255, 255, 255, 0.1);
}

.tl-einwilligung__zu svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.tl-einwilligung__inhalt {
	display: grid;
	gap: 12px;
	padding: 18px 22px 4px;
}

.tl-einwilligung__gruppe {
	margin: 0;
	padding: 14px 16px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
}

.tl-einwilligung__gruppe p {
	color: var(--tl-grau-dunkel, #9aa6b4);
	font-size: 0.875rem;
}

.tl-einwilligung__gruppe p:last-child,
p.tl-einwilligung__gruppe {
	margin-bottom: 0;
}

.tl-einwilligung__zeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 32px;
	margin-bottom: 6px;
}

.tl-einwilligung__zeile h3 {
	margin: 0;
	color: #ffffff;
	font-size: 0.9375rem;
	font-weight: 600;
}

.tl-einwilligung__marke {
	flex: none;
	padding: 2px 10px;
	border: 1px solid rgba(60, 184, 255, 0.45);
	border-radius: 999px;
	color: var(--tl-blau-hell, #3cb8ff);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Schalter: das Kästchen selbst als Regler, Knopf als Verlauf (keine Pseudo-Elemente am Eingabefeld). */
.tl-einwilligung__schalter {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	margin-bottom: 4px;
	color: #ffffff;
	font-weight: 600;
	cursor: pointer;
}

.tl-einwilligung__schalter input {
	flex: none;
	width: 48px;
	height: 28px;
	margin: 0;
	border: 1.5px solid rgba(255, 255, 255, 0.6);
	border-radius: 999px;
	background: radial-gradient(circle at 13px 50%, #ffffff 9px, transparent 10px) rgba(255, 255, 255, 0.1);
	cursor: pointer;
	appearance: none;
	transition: background-color 0.15s, border-color 0.15s;
}

.tl-einwilligung__schalter input:checked {
	border-color: var(--tl-blau, #00a7fe);
	background: radial-gradient(circle at 33px 50%, var(--tl-nacht, #00070e) 9px, transparent 10px) var(--tl-blau, #00a7fe);
}

.tl-einwilligung__fuss {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 16px 22px 18px;
}

.tl-einwilligung__fuss a {
	font-size: 0.875rem;
}

.tl-einwilligung__fuss .tl-einwilligung__knopf {
	min-width: 160px;
}

.tl-einwilligung__unsichtbar {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 640px) {
	.tl-einwilligung__banner {
		left: max(12px, env(safe-area-inset-left, 0px));
		right: max(12px, env(safe-area-inset-right, 0px));
		bottom: max(12px, env(safe-area-inset-bottom, 0px));
		width: auto;
		padding: 16px 16px 8px;
		font-size: 0.875rem;
		line-height: 1.5;
	}

	.tl-einwilligung__banner .tl-einwilligung__kopf {
		margin-bottom: 8px;
	}

	.tl-einwilligung__banner .tl-einwilligung__titel {
		font-size: 1rem;
	}

	.tl-einwilligung__banner .tl-einwilligung__symbol {
		width: 24px;
		height: 24px;
	}

	.tl-einwilligung__liste {
		padding: 8px 10px;
	}

	.tl-einwilligung__klein {
		font-size: 0.8125rem;
	}

	.tl-einwilligung__knoepfe {
		margin-top: 10px;
	}

	.tl-einwilligung__fuss .tl-einwilligung__knopf {
		flex: 1 1 100%;
	}
}

/* Windows-Kontrastmodus: Verläufe fallen weg, deshalb das normale Kästchen */
@media (forced-colors: active) {
	.tl-einwilligung__schalter input {
		width: 22px;
		height: 22px;
		appearance: auto;
	}
}

@media print {
	.tl-einwilligung {
		display: none !important;
	}
}
