/* Cookie Consent – Banner (Farben über Variablen aus den Einstellungen) */
.ccn {
	--ccn-bg: #fff;
	--ccn-text: #1f2937;
	--ccn-btn: #1f5f8b;
	--ccn-btn-text: #fff;
	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	color: var(--ccn-text);
	font-size: 15px;
	line-height: 1.5;
}
.ccn[hidden] {
	display: none !important;
}
.ccn *,
.ccn *::before,
.ccn *::after {
	box-sizing: border-box;
}
.ccn__inner {
	display: flex;
	align-items: center;
	gap: 12px 32px;
	padding: 16px 24px;
	background: var(--ccn-bg);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.14);
}
.ccn__content {
	flex: 1 1 auto;
	min-width: 0;
}
.ccn__title {
	margin: 0 0 4px !important;
	color: inherit;
	font-size: 17px;
	font-weight: 700;
}
.ccn__text {
	margin: 0 !important;
	color: inherit;
}
.ccn__text a,
.ccn__links a {
	color: inherit;
	text-decoration: underline;
}
.ccn__links {
	white-space: nowrap;
}
.ccn__toggle {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}
.ccn__details {
	max-height: 40vh;
	margin-top: 10px;
	overflow: auto;
}
.ccn__details[hidden] {
	display: none;
}
.ccn__table {
	width: 100%;
	margin: 0 !important;
	border-collapse: collapse;
	font-size: 13px;
}
.ccn__table th,
.ccn__table td {
	padding: 6px 8px;
	border: 0;
	border-bottom: 1px solid rgba(127, 127, 127, 0.25);
	background: none !important;
	color: inherit;
	text-align: left;
	vertical-align: top;
}
.ccn__table code {
	background: none;
	color: inherit;
	font-size: 12px;
}
.ccn__buttons {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
}
.ccn__btn {
	min-width: 130px;
	margin: 0;
	padding: 11px 20px;
	border: 2px solid var(--ccn-btn);
	border-radius: 4px;
	background: var(--ccn-btn);
	color: var(--ccn-btn-text);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: filter 0.2s ease;
}
.ccn__btn:hover,
.ccn__btn:focus-visible {
	filter: brightness(0.9);
}
.ccn__btn:focus-visible,
.ccn__toggle:focus-visible,
.ccn-revoke:focus-visible {
	outline: 3px solid var(--ccn-btn);
	outline-offset: 2px;
}
/* „Ablehnen“, „Auswählen“, „Auswahl speichern“: neutral (nur umrandet, Textfarbe) */
.ccn__btn--plain {
	border-color: currentColor;
	background: transparent;
	color: var(--ccn-text);
	font-weight: 600;
}
.ccn__btn--plain:hover,
.ccn__btn--plain:focus-visible {
	filter: none;
	background: rgba(127, 127, 127, 0.12);
}
.ccn__buttons[hidden] {
	display: none !important;
}

/* Auswahl nach Kategorien */
.ccn__prefs {
	max-height: 50vh;
	margin-top: 12px;
	overflow: auto;
}
.ccn__prefs[hidden] {
	display: none;
}
.ccn__cat {
	padding: 12px 0;
	border-top: 1px solid rgba(127, 127, 127, 0.25);
}
.ccn__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.ccn__cat-title {
	font-weight: 700;
	cursor: pointer;
}
.ccn__cat-text {
	margin: 4px 0 6px !important;
	font-size: 14px;
	opacity: 0.9;
}
.ccn__cookies summary {
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}
.ccn__cookies .ccn__table {
	margin-top: 6px !important;
}
/* Schalter */
.ccn__switch {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 24px;
}
.ccn__switch input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.ccn__switch span {
	position: absolute;
	inset: 0;
	border-radius: 12px;
	background: #b5b9be;
	transition: background 0.2s ease;
}
.ccn__switch span::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}
.ccn__switch input:checked + span {
	background: var(--ccn-btn);
}
.ccn__switch input:checked + span::after {
	transform: translateX(20px);
}
.ccn__switch input:focus-visible + span {
	outline: 3px solid var(--ccn-btn);
	outline-offset: 2px;
}
.ccn__switch.is-locked {
	opacity: 0.6;
}
.ccn__switch.is-locked input {
	cursor: not-allowed;
}
/* In der Auswahl-Ansicht: Inhalt oben, Buttons darunter rechts */
.ccn.is-prefs .ccn__inner {
	flex-direction: column;
	align-items: stretch;
}
.ccn.is-prefs .ccn__buttons {
	justify-content: flex-end;
}

/* Positionen */
.ccn--bottom,
.ccn--top {
	right: 0;
	left: 0;
}
.ccn--bottom {
	bottom: 0;
}
.ccn--top {
	top: 0;
}
.ccn--top .ccn__inner {
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
}
.ccn--bottom .ccn__inner,
.ccn--top .ccn__inner {
	max-width: 1290px;
	margin: 0 auto;
	box-shadow: none;
}
.ccn--bottom,
.ccn--top {
	background: var(--ccn-bg);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.14);
}
.ccn--box-left,
.ccn--box-right {
	bottom: 20px;
	width: 420px;
	max-width: calc(100vw - 40px);
}
.ccn--box-left {
	left: 20px;
}
.ccn--box-right {
	right: 20px;
}
.ccn--box-left .ccn__inner,
.ccn--box-right .ccn__inner,
.ccn--center .ccn__inner {
	flex-direction: column;
	align-items: stretch;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}
.ccn--box-left .ccn__btn,
.ccn--box-right .ccn__btn,
.ccn--center .ccn__btn {
	flex: 1 1 0;
}
.ccn--center {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.45);
}
.ccn--center .ccn__inner {
	width: 560px;
	max-width: 100%;
	max-height: calc(100vh - 40px);
	overflow: auto;
}

/* Knopf „Cookie-Einstellungen“ zum erneuten Öffnen */
.ccn-revoke {
	position: fixed;
	bottom: 16px;
	left: 16px;
	z-index: 2147482999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ccn-btn, #1f5f8b);
	color: var(--ccn-btn-text, #fff);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.ccn-revoke:hover {
	opacity: 1;
	transform: scale(1.05);
}
.ccn-revoke[hidden] {
	display: none !important;
}
.ccn-revoke svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Handy */
@media (max-width: 782px) {
	.ccn__inner {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
	}
	.ccn__buttons {
		flex-direction: column-reverse;
	}
	.ccn__btn {
		width: 100%;
	}
	.ccn--box-left,
	.ccn--box-right {
		right: 10px;
		bottom: 10px;
		left: 10px;
		width: auto;
		max-width: none;
	}
	.ccn__table thead {
		display: none;
	}
	.ccn__table tr {
		display: block;
		padding: 6px 0;
		border-bottom: 1px solid rgba(127, 127, 127, 0.25);
	}
	.ccn__table td {
		display: block;
		padding: 2px 0;
		border: 0;
	}
	.ccn__table td::before {
		content: attr(data-label) ": ";
		font-weight: 700;
	}
}
