/**
 * corelaw — Einwilligungsverwaltung.
 *
 * Hinweis  = schwebende Karte unten links, zurückhaltend und kompakt
 *            drei gleichrangige Bedienelemente, kein Vollbild-Overlay.
 * Details  = kompaktes Dialogfenster mit Schaltern je Kategorie.
 *
 * Eigene Datei, weil style.css aus dem Demo-Design generiert wird.
 */

.cc {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 400;
	display: flex;
	justify-content: flex-start;
	padding: clamp(14px, 2.2vw, 30px);
	pointer-events: none; /* nur die Karte selbst fängt Klicks */
}

/* ------------------------------------------------ Hinweis (schwebende Karte) */

.cc-panel {
	position: relative;
	z-index: 2;
	pointer-events: auto;
	width: min(560px, 100%);
	background: rgba(20, 33, 60, .94);
	-webkit-backdrop-filter: blur(10px) saturate(120%);
	backdrop-filter: blur(10px) saturate(120%);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .14);
	box-shadow: 0 18px 44px rgba(10, 10, 10, .34);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .4s ease, transform .45s cubic-bezier(.22, .61, .36, 1);
}

/* feine Akzentlinie oben — gleiche Sprache wie die Trennlinien im Design */
.cc-panel::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 64px;
	height: 2px;
	background: #fff;
	opacity: .9;
}

.cc.is-open .cc-panel {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.cc-panel {
		transition: none;
	}
}

.cc-main {
	padding: clamp(20px, 2.2vw, 26px) clamp(20px, 2.4vw, 28px) clamp(18px, 2vw, 22px);
}

.cc-text {
	min-width: 0;
}

.cc-title {
	margin: 0 0 10px;
	display: block;
	font-family: 'Raleway', system-ui, sans-serif;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .58);
}

.cc-body {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.62;
	color: rgba(255, 255, 255, .92);
}

.cc-links {
	margin: 12px 0 0;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .35);
}

.cc-links a {
	color: rgba(255, 255, 255, .62);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, .28);
	padding-bottom: 1px;
	transition: color .2s ease, border-color .2s ease;
}

.cc-links a:hover,
.cc-links a:focus-visible {
	color: #fff;
	border-color: #fff;
}

.cc-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, .14);
	flex-wrap: wrap;
}

.cc .btn {
	/* beide Schaltflächen teilen sich die Breite zu gleichen Teilen */
	flex: 1 1 0;
	min-width: 0;
	padding: 11px 18px;
	font-size: 11px;
	letter-spacing: .12em;
	text-align: center;
	border-color: rgba(255, 255, 255, .42);
	color: #fff;
	white-space: nowrap;
	transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.cc .btn:hover,
.cc .btn:focus-visible {
	border-color: #fff;
	background: rgba(255, 255, 255, .12);
}

.cc .btn.solid {
	background: #fff;
	border-color: #fff;
	color: var(--navy, #1b2a4a);
}

.cc .btn.solid:hover,
.cc .btn.solid:focus-visible {
	background: rgba(255, 255, 255, .86);
}

.cc-toggle-detail {
	flex: 0 0 auto;
	margin-left: auto;
	background: none;
	border: 0;
	padding: 6px 0;
	font-family: inherit;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .7);
	border-bottom: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: color .2s ease, border-color .2s ease;
}

.cc-toggle-detail:hover,
.cc-toggle-detail:focus-visible {
	color: #fff;
	border-color: rgba(255, 255, 255, .6);
}

.cc :focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Der Dialog wird beim Öffnen programmatisch fokussiert — das soll man nicht
   sehen. Für echte Tastaturnavigation bleibt :focus-visible oben erhalten. */
.cc-panel:focus,
.cc-detail:focus {
	outline: none;
}

@media (max-width: 620px) {
	.cc {
		padding: 10px;
	}

	.cc-actions .btn {
		flex: 1 1 auto;
		text-align: center;
	}

	.cc-toggle-detail {
		margin: 4px 0 0;
		width: 100%;
		text-align: center;
	}
}

/* ------------------------------------------------------ Details (Dialog) */

.cc-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1;
	background: rgba(10, 10, 10, .5);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.cc.is-detail {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 48px);
}

.cc.is-detail .cc-panel {
	background: #fff;
	color: var(--ink, #14161a);
	width: 100%;
	max-width: 620px;
	max-height: min(86vh, 720px);
	overflow-y: auto;
	box-shadow: 0 24px 60px rgba(10, 10, 10, .3);
	transform: none;
}

.cc-detail {
	padding: clamp(22px, 3vw, 32px);
}

.cc-detail-title {
	margin: 0 0 20px;
	font-family: 'Raleway', system-ui, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--grey-2, #5b6068);
}

.cc-cats {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.cc-cat {
	padding: 16px 0;
	border-top: 1px solid rgba(10, 10, 10, .1);
}

.cc-cat:last-child {
	border-bottom: 1px solid rgba(10, 10, 10, .1);
}

.cc-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.cc-cat-flag {
	font-size: 10.5px;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--grey-2, #5b6068);
	white-space: nowrap;
}

.cc-cat-title {
	font-family: 'Raleway', system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--ink, #14161a);
}

.cc-cat-desc {
	margin: 8px 0 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--grey-2, #5b6068);
	max-width: 62ch;
}

/* Schalter: echtes Checkbox-Element, nur optisch ersetzt (Tastatur funktioniert) */
.cc-switch {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}

.cc-switch input {
	position: absolute;
	opacity: 0;
	width: 40px;
	height: 22px;
	margin: 0;
	cursor: pointer;
}

.cc-switch-ui {
	flex: 0 0 auto;
	width: 40px;
	height: 22px;
	border: 1px solid rgba(10, 10, 10, .25);
	border-radius: 999px;
	background: #fff;
	position: relative;
	transition: background .2s ease, border-color .2s ease;
}

.cc-switch-ui::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--grey-2, #5b6068);
	transition: transform .2s ease, background .2s ease;
}

.cc-switch input:checked + .cc-switch-ui {
	background: var(--navy, #1b2a4a);
	border-color: var(--navy, #1b2a4a);
}

.cc-switch input:checked + .cc-switch-ui::after {
	background: #fff;
	transform: translateX(18px);
}

.cc-switch input:disabled + .cc-switch-ui {
	opacity: .55;
	cursor: default;
}

.cc-switch input:focus-visible + .cc-switch-ui {
	outline: 2px solid var(--navy, #1b2a4a);
	outline-offset: 2px;
}

.cc-detail-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.cc-detail-actions .btn {
	flex: 1 1 0;
	text-align: center;
}

.cc.is-detail .btn {
	border-color: rgba(10, 10, 10, .28);
	color: var(--ink, #14161a);
}

.cc.is-detail .btn:hover,
.cc.is-detail .btn:focus-visible {
	border-color: var(--navy, #1b2a4a);
	background: rgba(27, 42, 74, .06);
}

.cc.is-detail .btn.solid {
	background: var(--navy, #1b2a4a);
	border-color: var(--navy, #1b2a4a);
	color: #fff;
}

.cc.is-detail .btn.solid:hover,
.cc.is-detail .btn.solid:focus-visible {
	background: #14213c;
	color: #fff;
}

.cc.is-detail :focus-visible {
	outline-color: var(--navy, #1b2a4a);
}

/* --------------------------------------------------- blockierte Einbettungen */

.cc-embed {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	background: var(--paper-2, #f5f4f1);
	border: 1px solid rgba(10, 10, 10, .1);
}

/* Die Karte liegt im Layout absolut hinter der Infokarte — Platzhalter genauso */
.cc-embed.k-map-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cc-embed-inner {
	max-width: 44ch;
	padding: clamp(22px, 3vw, 36px);
	text-align: center;
}

.cc-embed-note {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--grey-2, #5b6068);
}

.cc-embed-actions {
	margin: 0 0 12px;
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.cc-embed-privacy {
	margin: 0;
	font-size: 11.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.cc-embed-privacy a {
	color: var(--grey-2, #5b6068);
	text-decoration: underline;
	text-underline-offset: 3px;
}
