/* Einwilligung – Cookie-Banner. Farben über --ewg-accent, --ewg-bg, --ewg-text (Einstellungen). */

.ewg-root,
.ewg-root *,
.ewg-placeholder,
.ewg-placeholder * {
	box-sizing: border-box;
}

.ewg-root[hidden],
.ewg-revisit[hidden] {
	display: none !important;
}

.ewg-root {
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ewg-text, #1f2937);
	letter-spacing: normal;
	text-transform: none;
}

.ewg-root p {
	margin: 0 0 .75em;
	color: inherit;
}

.ewg-root a {
	color: inherit;
	text-decoration: underline;
}

.ewg-title {
	font-size: 1.15em;
	font-weight: 700;
	margin: 0 0 .5em !important;
}

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

.ewg-banner {
	position: fixed;
	z-index: 2147483000;
	background: var(--ewg-bg, #fff);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
	outline: none;
}

.ewg-layout-bar {
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px 16px;
}

.ewg-layout-bar .ewg-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	gap: 24px;
	align-items: center;
}

.ewg-layout-bar .ewg-banner-content {
	flex: 1 1 auto;
}

.ewg-layout-bar .ewg-actions {
	flex: 0 0 auto;
	flex-direction: column;
	min-width: 220px;
}

.ewg-layout-box {
	right: 16px;
	bottom: 16px;
	width: 420px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 6px 32px rgba(0, 0, 0, .25);
}

.ewg-links a {
	margin-right: 1em;
	font-size: .9em;
}

.ewg-text {
	font-size: .95em;
}

/* ---------- Buttons: „Alle akzeptieren“ und „Alle ablehnen“ sind gleichwertig gestaltet ---------- */

.ewg-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ewg-btn {
	display: inline-block;
	flex: 1 1 auto;
	margin: 0;
	padding: 10px 18px;
	border: 2px solid var(--ewg-accent, #1f2937);
	border-radius: 4px;
	font: inherit;
	font-size: .95em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	min-height: 44px;
}

.ewg-btn-primary,
.ewg-btn-primary:hover,
.ewg-btn-primary:focus {
	background: var(--ewg-accent, #1f2937);
	color: var(--ewg-bg, #fff);
}

.ewg-btn-secondary,
.ewg-btn-secondary:hover,
.ewg-btn-secondary:focus {
	background: transparent;
	color: var(--ewg-text, #1f2937);
}

.ewg-btn:hover {
	filter: brightness(1.12);
}

.ewg-btn:focus-visible,
.ewg-close:focus-visible,
.ewg-revisit:focus-visible,
.ewg-switch input:focus-visible + .ewg-switch-ui,
.ewg-services summary:focus-visible,
.ewg-link-button:focus-visible {
	outline: 3px solid var(--ewg-accent, #1f2937);
	outline-offset: 2px;
}

/* ---------- Einstellungsfenster ---------- */

.ewg-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.ewg-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}

.ewg-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 640px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	background: var(--ewg-bg, #fff);
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
	outline: none;
}

.ewg-dialog-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px 8px;
}

.ewg-dialog-head .ewg-title {
	margin: 0 !important;
}

.ewg-close {
	background: transparent;
	border: 0;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	width: 44px;
	height: 44px;
	cursor: pointer;
	padding: 0;
}

.ewg-dialog-body {
	padding: 0 20px;
	overflow-y: auto;
}

.ewg-dialog-foot {
	padding: 16px 20px;
	border-top: 1px solid rgba(0, 0, 0, .1);
}

.ewg-category {
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 6px;
	padding: 12px 14px;
	margin: 0 0 12px;
}

.ewg-category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ewg-category-label {
	font-weight: 700;
}

.ewg-category-text {
	font-size: .9em;
	margin: .5em 0 .25em !important;
}

.ewg-always {
	font-size: .85em;
	font-weight: 600;
	white-space: nowrap;
}

.ewg-services summary {
	cursor: pointer;
	font-size: .9em;
	text-decoration: underline;
	padding: 4px 0;
}

.ewg-service {
	border-top: 1px solid rgba(0, 0, 0, .08);
	padding: 10px 0 4px;
	margin-top: 6px;
}

.ewg-service-name {
	font-weight: 600;
}

.ewg-service-details {
	margin: 6px 0 0;
	font-size: .85em;
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 2px 12px;
}

.ewg-service-details dt {
	font-weight: 600;
	margin: 0;
}

.ewg-service-details dd {
	margin: 0;
}

.ewg-cookie-list {
	margin: 0;
	padding: 0 0 0 1.1em;
}

.ewg-consent-id {
	font-size: .85em;
}

/* ---------- Schalter ---------- */

.ewg-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	position: relative;
	margin: 0;
}

.ewg-switch input {
	position: absolute;
	opacity: 0;
	width: 44px;
	height: 24px;
	margin: 0;
	cursor: pointer;
}

.ewg-switch-ui {
	flex: 0 0 auto;
	position: relative;
	width: 44px;
	height: 24px;
	border-radius: 12px;
	background: #9ca3af;
	transition: background .15s;
}

.ewg-switch-ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s;
}

.ewg-switch input:checked + .ewg-switch-ui {
	background: var(--ewg-accent, #1f2937);
}

.ewg-switch input:checked + .ewg-switch-ui::after {
	transform: translateX(20px);
}

.ewg-switch input:indeterminate + .ewg-switch-ui::after {
	transform: translateX(10px);
}

.ewg-switch input:disabled + .ewg-switch-ui {
	opacity: .6;
	cursor: not-allowed;
}

.ewg-switch-small .ewg-switch-ui {
	transform: scale(.85);
}

/* ---------- Button zum erneuten Öffnen ---------- */

.ewg-revisit {
	position: fixed;
	bottom: 16px;
	z-index: 2147482999;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ewg-accent, #1f2937);
	color: var(--ewg-bg, #fff);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	cursor: pointer;
}

.ewg-revisit-left {
	left: 16px;
}

.ewg-revisit-right {
	right: 16px;
}

.ewg-link-button {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- Platzhalter für Karten und Videos ---------- */

.ewg-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 300px;
	padding: 24px 16px;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	color: #1f2937;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.ewg-placeholder-inner {
	max-width: 480px;
}

.ewg-placeholder-text {
	margin: 0 0 12px;
}

.ewg-placeholder .ewg-btn {
	flex: none;
}

.ewg-placeholder-keep {
	display: block;
	margin: 12px 0 0;
	font-size: .9em;
	cursor: pointer;
}

.ewg-placeholder-privacy {
	display: inline-block;
	margin-top: 8px;
	font-size: .85em;
	color: inherit;
}

/* ---------- Liste in der Datenschutzerklärung ---------- */

/* Überschriften an den Fließtext anpassen, damit sie nicht die Größe der Theme-Überschriften übernehmen. */
.ewg-declaration h3 {
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.4;
	margin: 1.6em 0 .4em;
}

.ewg-declaration h4 {
	font-size: 1em;
	font-weight: 600;
	line-height: 1.4;
	margin: 1.2em 0 .3em;
}

.ewg-declaration code {
	font-size: .95em;
	padding: .1em .35em;
	border-radius: 3px;
	background: rgba(127, 127, 127, .15);
	color: inherit;
}

.ewg-declaration .ewg-service-details {
	font-size: .95em;
	margin-bottom: 1.5em;
}

/* ---------- Mobil ---------- */

@media (max-width: 782px) {
	.ewg-layout-bar .ewg-banner-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.ewg-layout-bar .ewg-actions {
		min-width: 0;
	}

	.ewg-layout-bar,
	.ewg-layout-box {
		max-height: 85vh;
		overflow-y: auto;
	}

	.ewg-layout-box {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		max-width: none;
	}

	.ewg-actions .ewg-btn {
		width: 100%;
	}

	.ewg-service-details {
		grid-template-columns: 1fr;
	}

	.ewg-service-details dd {
		margin-bottom: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ewg-switch-ui,
	.ewg-switch-ui::after {
		transition: none;
	}
}
