/* SV 1921 Cookie-Einwilligung */

.svcc,
.svcc-blocker,
.svcc-float,
.svcc-list {
	--svcc-radius: 10px;
	--svcc-text: #313233;
	--svcc-muted: #5c5f63;
	--svcc-border: #dcdfe3;
	--svcc-bg: #fff;
	--svcc-soft: #f4f5f7;
	box-sizing: border-box;
}

.svcc *,
.svcc-blocker *,
.svcc-list * {
	box-sizing: border-box;
}

html.svcc-locked {
	overflow: hidden;
}

.svcc[hidden],
.svcc [hidden],
.svcc-float[hidden] {
	display: none !important;
}

.svcc .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Dialog ---------- */

.svcc {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--svcc-text);
}

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

.svcc-dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	background: var(--svcc-bg);
	border-radius: var(--svcc-radius);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
	padding: 24px;
	animation: svcc-in .25s ease-out;
}

.svcc-view[data-svcc-view="details"] {
	max-width: 100%;
}

@keyframes svcc-in {
	from { opacity: 0; transform: translateY(-12px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.svcc-dialog { animation: none; }
}

.svcc-dialog:focus {
	outline: none;
}

.svcc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.svcc-logo {
	width: 48px;
	height: 48px;
	object-fit: contain;
	flex: none;
}

.svcc .svcc-title {
	margin: 0;
	padding: 0;
	font-size: 1.3em;
	line-height: 1.25;
	color: var(--svcc-text);
}

.svcc-text p {
	margin: 0 0 .7em;
	font-size: .93em;
}

.svcc a {
	color: var(--svcc-accent);
	text-decoration: underline;
}

.svcc-groups-compact {
	list-style: none;
	margin: 12px 0;
	padding: 10px 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	background: var(--svcc-soft);
	border-radius: 6px;
}

.svcc-groups-compact li {
	margin: 0;
	padding: 0;
}

.svcc-groups-compact label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-weight: 600;
}

.svcc-groups-compact input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--svcc-accent);
}

/* Schaltflächen: „Alle“ und „Nur essenzielle“ bewusst gleichwertig. */
.svcc-buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 16px 0 8px;
}

.svcc-btn {
	display: inline-block;
	width: 100%;
	padding: 10px 16px;
	border: 2px solid var(--svcc-accent);
	border-radius: 6px;
	background: var(--svcc-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	transition: filter .15s;
}

.svcc-btn:hover,
.svcc-btn:focus-visible {
	filter: brightness(.88);
}

.svcc-btn:focus-visible {
	outline: 3px solid var(--svcc-text);
	outline-offset: 2px;
}

.svcc-btn--secondary {
	background: transparent;
	color: var(--svcc-accent);
}

.svcc-links {
	margin: 8px 0 0;
	text-align: center;
	font-size: .85em;
}

.svcc-links span {
	margin: 0 4px;
	color: var(--svcc-muted);
}

/* ---------- Detailansicht ---------- */

.svcc-group {
	border: 1px solid var(--svcc-border);
	border-radius: 8px;
	padding: 12px 14px;
	margin: 12px 0;
}

.svcc-group__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.svcc .svcc-group h3 {
	margin: 0;
	padding: 0;
	font-size: 1.05em;
	color: var(--svcc-text);
}

.svcc-count {
	font-weight: 400;
	color: var(--svcc-muted);
}

.svcc-group__desc {
	margin: 6px 0 8px;
	font-size: .88em;
	color: var(--svcc-muted);
}

.svcc-service {
	border-top: 1px solid var(--svcc-border);
	padding: 8px 0 4px;
}

.svcc-service__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-weight: 600;
}

.svcc-service__always {
	font-size: .8em;
	font-weight: 400;
	color: var(--svcc-muted);
}

.svcc-service details summary {
	cursor: pointer;
	font-size: .85em;
	color: var(--svcc-accent);
	margin: 2px 0;
}

/* Schalter */
.svcc-switch {
	position: relative;
	display: inline-flex;
	flex: none;
	cursor: pointer;
}

.svcc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.svcc-switch__track {
	width: 44px;
	height: 24px;
	border-radius: 12px;
	background: #b8bcc2;
	position: relative;
	transition: background .15s;
}

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

.svcc-switch input:checked + .svcc-switch__track {
	background: var(--svcc-accent);
}

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

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

.svcc-switch input:disabled + .svcc-switch__track {
	opacity: .6;
	cursor: not-allowed;
}

.svcc-switch input:focus-visible + .svcc-switch__track {
	outline: 3px solid var(--svcc-text);
	outline-offset: 2px;
}

.svcc-switch--small .svcc-switch__track {
	width: 36px;
	height: 20px;
}

.svcc-switch--small .svcc-switch__track::after {
	width: 14px;
	height: 14px;
}

.svcc-switch--small input:checked + .svcc-switch__track::after {
	transform: translateX(16px);
}

/* Detailtabelle (auch für [sv_cookie_liste]) */
.svcc-table {
	width: 100%;
	border-collapse: collapse;
	margin: 6px 0 8px;
	font-size: .85em;
}

.svcc-table th,
.svcc-table td {
	text-align: left;
	vertical-align: top;
	padding: 4px 8px 4px 0;
	border: 0;
	border-bottom: 1px solid var(--svcc-border);
	word-break: break-word;
}

.svcc-table th {
	width: 30%;
	font-weight: 600;
	white-space: nowrap;
}

.svcc-table ul {
	margin: 0;
	padding-left: 1.1em;
}

.svcc-uid {
	font-size: .8em;
	color: var(--svcc-muted);
	margin: 12px 0 0;
	text-align: center;
}

.svcc-uid code {
	font-size: 1em;
	user-select: all;
}

.svcc-history {
	margin-top: 8px;
	font-size: .8em;
	overflow-x: auto;
}

.svcc-history table {
	width: 100%;
	border-collapse: collapse;
}

.svcc-history th,
.svcc-history td {
	padding: 3px 6px;
	border-bottom: 1px solid var(--svcc-border);
	text-align: left;
}

@media (min-width: 600px) {
	.svcc-buttons {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.svcc-buttons .svcc-btn {
		flex: 1 1 0;
		width: auto;
	}

	.svcc-view[data-svcc-view="start"] .svcc-btn--secondary {
		flex-basis: 100%;
	}

	.svcc-dialog:has(.svcc-view[data-svcc-view="details"]:not([hidden])) {
		max-width: 720px;
	}
}

@media (max-width: 480px) {
	.svcc {
		padding: 8px;
		font-size: 14px;
	}

	.svcc-dialog {
		padding: 18px 16px;
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
	}
}

/* ---------- Schwebende Schaltfläche ---------- */

.svcc-float {
	position: fixed;
	bottom: 16px;
	z-index: 99998;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--svcc-accent, #2f62a8);
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: .85;
	transition: opacity .15s, transform .15s;
}

.svcc-float:hover,
.svcc-float:focus-visible {
	opacity: 1;
	transform: scale(1.06);
}

.svcc-float:focus-visible {
	outline: 3px solid #313233;
	outline-offset: 2px;
}

.svcc-float--left { left: 16px; }
.svcc-float--right { right: 16px; }

/* ---------- Content-Blocker ---------- */

.svcc-blocker {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
	margin: 0 0 1.5em;
	padding: 20px;
	border-radius: var(--svcc-radius);
	background:
		repeating-linear-gradient(45deg, rgba(0, 0, 0, .025) 0 12px, transparent 12px 24px),
		#eef0f2;
	color: var(--svcc-text);
	text-align: center;
}

.svcc-blocker__inner {
	max-width: 520px;
	font-size: .92em;
	line-height: 1.5;
}

.svcc-blocker p {
	margin: 0 0 .7em;
}

.svcc-blocker__title {
	font-weight: 700;
	font-size: 1.1em;
}

.svcc-blocker a {
	color: var(--svcc-accent, #2f62a8);
}

.svcc-blocker .svcc-btn {
	width: auto;
	padding: 10px 24px;
}

.svcc-blocker__always label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .9em;
	cursor: pointer;
}

.svcc-blocker__always input {
	accent-color: var(--svcc-accent, #2f62a8);
	margin: 0;
}

/* Video-Platzhalter (YouTube) mit lokalem Vorschaubild */
/* min-height:auto: bei schmalem Bildschirm wächst der Platzhalter mit dem Text statt ihn abzuschneiden. */
.svcc-blocker--video {
	min-height: auto;
	height: auto;
	margin-left: auto;
	margin-right: auto;
}

.svcc-blocker--thumb {
	position: relative;
	background-color: #1f2328;
	background-size: cover;
	background-position: center;
	color: #fff;
}

.svcc-blocker--thumb::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: rgba(0, 0, 0, .62);
}

.svcc-blocker--thumb .svcc-blocker__inner {
	position: relative;
}

.svcc-blocker--thumb a {
	color: #fff;
	text-decoration: underline;
}

@media (max-width: 560px) {
	.svcc-blocker {
		padding: 14px;
	}

	.svcc-blocker--video .svcc-blocker__inner {
		font-size: .82em;
	}

	.svcc-blocker--video .svcc-blocker__title {
		margin-bottom: .3em;
	}
}

/* ---------- [sv_cookie_liste] ---------- */

.svcc-list h3 {
	margin-top: 1.2em;
}

.svcc-list .svcc-list__service {
	margin: 0 0 1em;
}

.svcc-list .svcc-table {
	font-size: .95em;
}
