/* Dodas Einwilligung – Banner. Nutzt die Farben des Themes, mit Rückfallwerten. */

.dodas-einw {
	position: fixed;
	z-index: 2147483000;
	left: 50%;
	bottom: 1rem;
	transform: translateX(-50%);
	box-sizing: border-box;
	width: min(44rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow: auto;
	padding: 1.25rem 1.5rem;
	background: var(--dw-surface, #121722);
	color: var(--dw-text, #ece6d6);
	border: 1px solid var(--dw-border, #2a3346);
	border-radius: var(--dw-radius, 0.75rem);
	box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.45);
	font-family: var(--dw-font-body, system-ui, sans-serif);
	font-size: 1rem;
	line-height: 1.5;
	text-align: left;
}

.dodas-einw *,
.dodas-einw *::before,
.dodas-einw *::after {
	box-sizing: border-box;
}

.dodas-einw__titel {
	margin: 0 2rem 0.5rem 0;
	color: var(--dw-heading, #fbf7ec);
	font-family: var(--dw-font-display, Georgia, serif);
	font-size: 1.25rem;
	line-height: 1.25;
}

.dodas-einw__titel:focus {
	outline: none;
}

.dodas-einw__text {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
}

.dodas-einw__liste {
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--dw-border, #2a3346);
}

.dodas-einw__liste[hidden] {
	display: none;
}

.dodas-einw__dienst {
	margin: 0;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--dw-border, #2a3346);
}

.dodas-einw__label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.625rem;
	cursor: pointer;
}

.dodas-einw__label input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	accent-color: var(--dw-primary, #5fae45);
}

.dodas-einw__anbieter,
.dodas-einw__zweck,
.dodas-einw__links {
	color: var(--dw-muted, #a9a69c);
	font-size: 0.875rem;
}

.dodas-einw__zweck {
	margin: 0.25rem 0 0 1.875rem;
}

.dodas-einw__dienst--immer .dodas-einw__zweck {
	margin-left: 0;
}

.dodas-einw__knoepfe {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0 0 0.75rem;
}

.dodas-einw__knopf {
	flex: 1 1 10rem;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	border: 2px solid var(--dw-primary, #5fae45);
	border-radius: var(--dw-radius-sm, 0.5rem);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* „Nur notwendige“ und „Alle akzeptieren“ sehen bewusst gleich aus. */
.dodas-einw__knopf--haupt {
	background: var(--dw-primary, #5fae45);
	color: var(--dw-on-primary, #0b0e14);
}

.dodas-einw__knopf--neben {
	background: transparent;
	color: var(--dw-text, #ece6d6);
}

.dodas-einw__knopf:hover {
	filter: brightness(1.1);
}

.dodas-einw__knopf:focus-visible,
.dodas-einw__label input:focus-visible,
.dodas-einw a:focus-visible {
	outline: 3px solid var(--dw-gold, #d8ae5a);
	outline-offset: 2px;
}

.dodas-einw__links {
	margin: 0;
}

.dodas-einw__links a {
	color: inherit;
	text-decoration: underline;
	white-space: nowrap;
}

.dodas-einw__links a:hover {
	color: var(--dw-link-hover, #eb8b1d);
}

.dodas-einw__zu {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	flex: none;
	width: 2.5rem;
	min-height: 2.5rem;
	padding: 0;
	background: transparent;
	border-color: transparent;
	color: var(--dw-muted, #a9a69c);
	font-size: 1.5rem;
	line-height: 1;
}

.dodas-einw-fusslink {
	margin: 0;
	padding: 0.75rem 1rem;
	text-align: center;
	font-size: 0.875rem;
}

@media (max-width: 30rem) {
	.dodas-einw {
		bottom: 0.5rem;
		width: calc(100vw - 1rem);
		max-height: calc(100vh - 1rem);
		max-height: calc(100dvh - 1rem);
		padding: 1rem;
	}

	.dodas-einw__knopf {
		flex-basis: 100%;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.dodas-einw {
		animation: dodas-einw-rein 200ms ease-out;
	}
}

@keyframes dodas-einw-rein {
	from {
		opacity: 0;
		transform: translate(-50%, 1rem);
	}
}

@media print {
	.dodas-einw,
	.dodas-einw-fusslink {
		display: none;
	}
}

/* In der Auswahl bleiben die Knöpfe beim Scrollen sichtbar. */
.dodas-einw--auswahl .dodas-einw__knoepfe {
	position: sticky;
	bottom: -1.25rem;
	margin: 0 0 0.5rem;
	padding: 0.75rem 0;
	background: var(--dw-surface, #121722);
}

@media (max-width: 30rem) {
	.dodas-einw--auswahl .dodas-einw__knoepfe {
		bottom: -1rem;
	}

	.dodas-einw--auswahl .dodas-einw__knopf {
		flex-basis: 30%;
		padding-inline: 0.25rem;
		font-size: 0.875rem;
	}
}
