/* ES Consent – Banner */
:root {
	--esc-primary: #009AAD;
	--esc-dark: #003B4D;
	--esc-bg: #FFFFFF;
	--esc-text: #1D2327;
	--esc-muted: color-mix(in srgb, var(--esc-text) 62%, var(--esc-bg));
	--esc-line: color-mix(in srgb, var(--esc-text) 14%, var(--esc-bg));
	--esc-soft: color-mix(in srgb, var(--esc-primary) 8%, var(--esc-bg));
	--esc-radius: 10px;
	--esc-shadow: 0 18px 50px rgba(0, 20, 30, .28), 0 2px 8px rgba(0, 20, 30, .12);
	--esc-font: inherit;
}

#esc-root, #esc-root *, .esc-ph, .esc-ph *, .esc-gate, .esc-gate *, .esc-linkdlg, .esc-linkdlg * { box-sizing: border-box; }
#esc-root [hidden], .esc-linkdlg [hidden] { display: none !important; }

/* Hintergrund */
#esc-root .esc-backdrop {
	position: fixed; inset: 0; z-index: 2147483000;
	background: rgba(0, 20, 30, .55);
	backdrop-filter: blur(2px);
}

/* Banner */
#esc-root .esc-banner {
	position: fixed; z-index: 2147483001;
	left: 16px; right: 16px; bottom: 16px;
	margin: 0 auto; max-width: 640px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	overflow: auto; overscroll-behavior: contain;
	background: var(--esc-bg); color: var(--esc-text);
	border-radius: var(--esc-radius);
	border-top: 4px solid var(--esc-primary);
	box-shadow: var(--esc-shadow);
	font-family: var(--esc-font); font-size: 15px; line-height: 1.55;
	padding: 22px 24px 18px;
	animation: esc-in .25s ease-out;
}
#esc-root .esc-banner.esc-pos-center { top: 50%; bottom: auto; transform: translateY(-50%); animation-name: esc-fade; }
#esc-root .esc-banner.is-settings { max-width: 720px; }
@keyframes esc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes esc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #esc-root .esc-banner { animation: none; } }

#esc-root .esc-test {
	margin: -8px 0 12px; padding: 4px 10px; display: inline-block;
	font-size: 12px; font-weight: 600; border-radius: 4px;
	background: #fff4d6; color: #6b4e00;
}
#esc-root .esc-title {
	margin: 0 0 8px; padding: 0;
	font-size: 19px; line-height: 1.3; font-weight: 700;
	color: var(--esc-dark); letter-spacing: 0;
}
#esc-root .esc-intro { color: var(--esc-text); margin: 0 0 16px; max-height: 38vh; overflow: auto; }
#esc-root .esc-intro p { margin: 0 0 .6em; }
#esc-root a { color: var(--esc-primary); text-decoration: underline; text-underline-offset: 2px; }
#esc-root a:hover { color: var(--esc-dark); }

/* Buttons – Akzeptieren und Ablehnen bewusst gleichwertig */
#esc-root .esc-actions, .esc-linkdlg .esc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
#esc-root .esc-btn, .esc-ph .esc-btn, .esc-gate .esc-btn, .esc-linkdlg .esc-btn {
	flex: 1 1 160px;
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; margin: 0; padding: 10px 16px;
	font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0;
	border-radius: 6px; border: 2px solid var(--esc-primary);
	cursor: pointer; transition: background .15s, color .15s, border-color .15s;
	box-shadow: none; text-shadow: none;
}
#esc-root .esc-btn--primary, .esc-ph .esc-btn--primary, .esc-gate .esc-btn--primary, .esc-linkdlg .esc-btn--primary {
	background: var(--esc-primary); color: #fff;
}
#esc-root .esc-btn--primary:hover, .esc-ph .esc-btn--primary:hover, .esc-gate .esc-btn--primary:hover, .esc-linkdlg .esc-btn--primary:hover {
	background: var(--esc-dark); border-color: var(--esc-dark); color: #fff;
}
#esc-root .esc-btn--ghost, .esc-linkdlg .esc-btn--ghost { background: transparent; color: var(--esc-dark); border-color: var(--esc-line); }
#esc-root .esc-btn--ghost:hover, .esc-linkdlg .esc-btn--ghost:hover { border-color: var(--esc-dark); background: var(--esc-soft); color: var(--esc-dark); }
#esc-root .esc-btn:focus-visible, #esc-root .esc-back:focus-visible, #esc-root .esc-revoke:focus-visible, #esc-root summary:focus-visible,
.esc-ph .esc-btn:focus-visible, .esc-gate .esc-btn:focus-visible, .esc-linkdlg .esc-btn:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--esc-primary) 55%, transparent); outline-offset: 2px;
}

#esc-root .esc-links { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--esc-muted); }

/* Einstellungen */
#esc-root .esc-settings-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#esc-root .esc-settings-head .esc-title { margin: 0; }
#esc-root .esc-back {
	width: 36px; height: 36px; flex: 0 0 36px; padding: 0; margin: 0 0 0 -6px;
	border: 0; border-radius: 50%; background: transparent; color: var(--esc-dark);
	font-size: 28px; line-height: 1; cursor: pointer;
}
#esc-root .esc-back:hover { background: var(--esc-soft); }
#esc-root .esc-cats { display: grid; gap: 10px; margin: 12px 0 16px; }
#esc-root .esc-cat { border: 1px solid var(--esc-line); border-radius: 8px; padding: 12px 14px; }
#esc-root .esc-cat__desc { margin: 6px 0 0; font-size: 14px; color: var(--esc-muted); }
#esc-root .esc-cat__svcs { margin-top: 8px; }
#esc-root .esc-cat__svcs summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--esc-primary); padding: 4px 0; }
#esc-root .esc-svc { margin: 8px 0 0; padding: 10px 12px; background: var(--esc-soft); border-radius: 6px; }
#esc-root .esc-svc dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: 13px; }
#esc-root .esc-svc dt { color: var(--esc-muted); font-weight: 400; margin: 0; }
#esc-root .esc-svc dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
	#esc-root .esc-svc dl { grid-template-columns: 1fr; }
	#esc-root .esc-svc dt { margin-top: 4px; }
}
#esc-root .esc-meta { font-size: 12px; color: var(--esc-muted); margin-bottom: 8px; overflow-wrap: anywhere; }
#esc-root .esc-meta code { font-size: 12px; background: var(--esc-soft); padding: 1px 4px; border-radius: 3px; }

/* Schalter */
#esc-root .esc-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; font-weight: 400; }
#esc-root .esc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
#esc-root .esc-switch__track {
	position: relative; flex: 0 0 40px; width: 40px; height: 22px;
	border-radius: 11px; background: color-mix(in srgb, var(--esc-text) 28%, var(--esc-bg));
	transition: background .15s;
}
#esc-root .esc-switch__track::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
	border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s;
}
#esc-root .esc-switch input:checked + .esc-switch__track { background: var(--esc-primary); }
#esc-root .esc-switch input:checked + .esc-switch__track::after { transform: translateX(18px); }
#esc-root .esc-switch input:indeterminate + .esc-switch__track { background: color-mix(in srgb, var(--esc-primary) 50%, var(--esc-bg)); }
#esc-root .esc-switch input:indeterminate + .esc-switch__track::after { transform: translateX(9px); }
#esc-root .esc-switch input:disabled + .esc-switch__track { opacity: .55; cursor: not-allowed; }
#esc-root .esc-switch input:focus-visible + .esc-switch__track { outline: 3px solid color-mix(in srgb, var(--esc-primary) 55%, transparent); outline-offset: 2px; }
#esc-root .esc-switch__label em { font-style: normal; font-size: 13px; color: var(--esc-muted); }

/* Schwebender Button */
#esc-root .esc-revoke {
	position: fixed; bottom: 16px; z-index: 2147482999;
	width: 44px; height: 44px; padding: 0; margin: 0;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%; border: 0; cursor: pointer;
	background: var(--esc-dark); color: #fff;
	box-shadow: 0 4px 14px rgba(0, 20, 30, .3);
	opacity: .85; transition: opacity .15s, transform .15s;
}
#esc-root .esc-revoke:hover { opacity: 1; transform: scale(1.06); }
#esc-root .esc-revoke--left { left: 16px; }
#esc-root .esc-revoke--right { right: 16px; }

/* Platzhalter für Videos / Karten */
.esc-ph {
	position: relative; width: 100%; min-height: 220px;
	display: flex; align-items: center; justify-content: center;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--esc-dark) 92%, #000), var(--esc-dark));
	color: #fff; border-radius: 8px; padding: 20px; text-align: center;
	font-size: 15px; line-height: 1.5;
}
.esc-ph__inner { max-width: 460px; }
.esc-ph p { margin: 0 0 12px; color: #fff; }
.esc-ph .esc-ph__small { font-size: 13px; }
.esc-ph a { color: #bdf3fa; }
.esc-ph .esc-btn { flex: 0 0 auto; }
.esc-ph__always { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 13px; cursor: pointer; color: #fff; }
iframe[data-esc-blocked] { display: none !important; }

/* Formular-Sperre (reCAPTCHA) */
.esc-gate {
	margin: 12px 0; padding: 14px 16px; border-radius: 8px;
	border: 1px solid color-mix(in srgb, var(--esc-primary) 45%, transparent);
	background: color-mix(in srgb, var(--esc-primary) 7%, transparent);
	font-size: 14px; line-height: 1.5;
}
.esc-gate p { margin: 0 0 10px; }
.esc-gate .esc-btn { flex: 0 0 auto; }
.esc-gate--pulse { animation: esc-pulse .6s ease-in-out 2; }
@keyframes esc-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--esc-primary) 40%, transparent); } }

/* Hinweis bei externen Links (WhatsApp) */
.esc-linkdlg {
	position: fixed; inset: 0; z-index: 2147483002;
	display: flex; align-items: center; justify-content: center; padding: 16px;
	background: rgba(0, 20, 30, .5);
}
.esc-linkdlg__box {
	width: 100%; max-width: 440px; padding: 22px 24px 14px;
	background: var(--esc-bg); color: var(--esc-text);
	border-radius: var(--esc-radius); border-top: 4px solid var(--esc-primary);
	box-shadow: var(--esc-shadow); font-size: 15px; line-height: 1.55;
}
.esc-linkdlg__box h2 { margin: 0 0 8px; font-size: 18px; color: var(--esc-dark); }
.esc-linkdlg__box p { margin: 0 0 10px; }
.esc-linkdlg__box .esc-small { font-size: 13px; }
.esc-linkdlg__box a { color: var(--esc-primary); }
.esc-linkdlg .esc-check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0 12px; cursor: pointer; }

/* Cookie-Liste (Shortcode) */
.esc-cookie-list .esc-table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 14px; }
.esc-cookie-list .esc-table th, .esc-cookie-list .esc-table td { border: 1px solid #ddd; padding: 8px; vertical-align: top; text-align: left; }
.esc-cookie-list .esc-table th { background: #f6f7f7; }
@media (max-width: 700px) { .esc-cookie-list .esc-table { display: block; overflow-x: auto; } }

@media (max-width: 520px) {
	#esc-root .esc-banner { left: 8px; right: 8px; bottom: 8px; padding: 18px 16px 14px; }
	#esc-root .esc-btn { flex-basis: 100%; }
}
