/* Cookie Consent DSGVO */
#ccd-root[hidden], .ccd-floating[hidden], #ccd-root [hidden] { display: none !important; }

#ccd-root {
	--ccd-bg: #fff; --ccd-text: #1d1d1f; --ccd-primary: #1d1d1f; --ccd-primary-text: #fff;
	--ccd-secondary: #1d1d1f; --ccd-secondary-text: #fff; --ccd-link: #1d1d1f; --ccd-radius: 8px;
	position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
	font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--ccd-text);
}
#ccd-root *, #ccd-root *::before, #ccd-root *::after { box-sizing: border-box; }

.ccd-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); pointer-events: auto; }

.ccd-banner {
	position: absolute; pointer-events: auto; background: var(--ccd-bg); color: var(--ccd-text);
	border-radius: var(--ccd-radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain;
	padding: 24px; outline: none;
}
.ccd-banner:focus { outline: none; }

/* Layouts */
.ccd--box .ccd-banner { width: min(440px, calc(100vw - 32px)); bottom: 16px; }
.ccd--box.ccd--bottom-left .ccd-banner { left: 16px; }
.ccd--box.ccd--bottom-right .ccd-banner { right: 16px; }
.ccd--box.ccd--center .ccd-banner,
.ccd--modal .ccd-banner { width: min(620px, calc(100vw - 32px)); left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.ccd--bar .ccd-banner { left: 0; right: 0; bottom: 0; border-radius: var(--ccd-radius) var(--ccd-radius) 0 0; max-height: 85vh; }
.ccd--bar .ccd-view { max-width: 1100px; margin: 0 auto; }
@media (min-width: 900px) {
	.ccd--bar [data-ccd-view="main"] .ccd-buttons { justify-content: flex-start; }
}

.ccd-title { font-size: 1.2em; font-weight: 700; margin: 0 0 .6em; line-height: 1.3; color: inherit; }
.ccd-text p { margin: 0 0 .8em; }
.ccd-text, .ccd-cat__desc { font-size: .92em; }
#ccd-root a { color: var(--ccd-link); text-decoration: underline; }

.ccd-catlist { list-style: none; margin: 0 0 1em; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .85em; }
.ccd-catlist li { padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px; opacity: .8; margin: 0; }

.ccd-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0 .6em; }
.ccd-buttons .ccd-btn { flex: 1 1 auto; }
/* Einstellungen: oben „Nur notwendige" | „Auswahl speichern", darunter groß „Alle akzeptieren" */
.ccd-buttons--settings { display: grid; grid-template-columns: 1fr 1fr; }
.ccd-buttons--settings .ccd-btn--wide { grid-column: 1 / -1; min-height: 56px; font-size: 1.05em; }

.ccd-btn {
	appearance: none; display: inline-block; cursor: pointer; font: inherit; font-weight: 600; font-size: .95em;
	line-height: 1.2; padding: 11px 16px; border-radius: var(--ccd-radius); border: 2px solid transparent;
	text-align: center; text-decoration: none; margin: 0; min-height: 44px; letter-spacing: normal; text-transform: none;
}
.ccd-btn--primary { background: var(--ccd-primary); color: var(--ccd-primary-text); border-color: var(--ccd-primary); }
.ccd-btn--secondary { background: transparent; color: var(--ccd-secondary); border-color: var(--ccd-secondary); }
.ccd-btn--link { background: none; border: 0; padding: 6px 0; min-height: 0; text-decoration: underline; font-weight: 400; color: inherit; }
.ccd-btn:hover { filter: brightness(1.1); }
.ccd-btn:focus-visible { outline: 3px solid var(--ccd-primary); outline-offset: 2px; }

.ccd-links { font-size: .85em; margin: .4em 0 0; }

/* Kategorien */
.ccd-cats { display: grid; gap: 10px; margin: 0 0 .5em; }
.ccd-cat { border: 1px solid rgba(127, 127, 127, .35); border-radius: var(--ccd-radius); padding: 12px 14px; }
.ccd-cat__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ccd-cat__label { font-weight: 700; }
.ccd-cat__desc { margin: .4em 0; }
.ccd-badge { font-size: .78em; opacity: .75; white-space: nowrap; }
.ccd-cat__services summary { cursor: pointer; font-size: .88em; text-decoration: underline; }
.ccd-svc { border-top: 1px solid rgba(127, 127, 127, .25); padding: 10px 0 4px; margin-top: 8px; font-size: .88em; }
.ccd-svc__meta { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 6px 0; }
.ccd-svc__meta dt { font-weight: 600; margin: 0; }
.ccd-svc__meta dd { margin: 0; word-break: break-word; }
.ccd-cookies { width: 100%; border-collapse: collapse; font-size: .92em; margin: 6px 0; }
.ccd-cookies th, .ccd-cookies td { text-align: left; padding: 4px 6px; border-bottom: 1px solid rgba(127, 127, 127, .2); vertical-align: top; }
.ccd-consent-id { font-size: .8em; opacity: .8; margin: .4em 0 0; word-break: break-all; }

/* Schalter */
.ccd-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; margin: 0; }
.ccd-switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.ccd-switch__track { flex: 0 0 auto; width: 44px; height: 24px; border-radius: 12px; background: #9a9a9f; position: relative; transition: background .2s; }
.ccd-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ccd-switch input:checked + .ccd-switch__track { background: var(--ccd-primary); }
.ccd-switch input:checked + .ccd-switch__track::after { transform: translateX(20px); }
.ccd-switch input:disabled + .ccd-switch__track { opacity: .55; }
.ccd-switch input:focus-visible + .ccd-switch__track { outline: 3px solid var(--ccd-primary); outline-offset: 2px; }
.ccd-switch--small .ccd-switch__track { width: 36px; height: 20px; }
.ccd-switch--small .ccd-switch__track::after { width: 14px; height: 14px; }
.ccd-switch--small input { width: 36px; height: 20px; }
.ccd-switch--small input:checked + .ccd-switch__track::after { transform: translateX(16px); }

/* Schwebender Button */
.ccd-floating {
	position: fixed; bottom: 16px; z-index: 2147482999; width: 44px; height: 44px; border-radius: 50%;
	border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
	background: var(--ccd-primary, #1d1d1f); color: var(--ccd-primary-text, #fff); box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.ccd-floating--left { left: 16px; }
.ccd-floating--right { right: 16px; }
.ccd-floating:focus-visible { outline: 3px solid #000; outline-offset: 2px; }

/* Platzhalter für blockierte Inhalte */
.ccd-placeholder {
	display: flex; align-items: center; justify-content: center; width: 100%; min-height: 200px;
	background: #f1f1f3; color: #1d1d1f; border-radius: var(--ccd-radius, 8px); padding: 20px; text-align: center;
	font-size: 14px; line-height: 1.5;
}
.ccd-placeholder__inner { max-width: 520px; }
.ccd-placeholder p { margin: 0 0 .8em; }
.ccd-placeholder a { color: inherit; }
.ccd-placeholder .ccd-btn { margin: 4px; }
.ccd-el-blocked .elementor-wrapper { display: none !important; }
.wp-has-aspect-ratio .wp-block-embed__wrapper > .ccd-placeholder { position: absolute; inset: 0; min-height: 0; }

/* Cookie-Erklärung (Shortcode) */
.ccd-declaration table { width: 100%; border-collapse: collapse; margin: .5em 0 1.5em; font-size: .95em; }
.ccd-declaration th, .ccd-declaration td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(127, 127, 127, .3); vertical-align: top; }

@media (max-width: 480px) {
	.ccd-banner { padding: 18px; }
	.ccd--bottom-left .ccd-banner, .ccd--bottom-right .ccd-banner { left: 8px; right: 8px; bottom: 8px; width: auto; }
	.ccd-buttons:not(.ccd-buttons--settings) .ccd-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.ccd-switch__track, .ccd-switch__track::after { transition: none; }
}
