/* Consent Manager — front-end styles
   Uses CSS custom properties so the admin-configured colors apply without
   inline style duplication in every element. */

#cm-root {
	--cm-primary: #1d4ed8;
	--cm-text: #111827;
	--cm-bg: #ffffff;
	position: relative;
	z-index: 2147483000;
}

/* ---------- Overlay (only used for centered modal) ---------- */
.cm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 2147483000;
}

/* ---------- Banner base ---------- */
.cm-banner {
	position: fixed;
	background: var(--cm-bg);
	color: var(--cm-text);
	box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.18);
	padding: 20px 24px;
	font-size: 14px;
	line-height: 1.5;
	z-index: 2147483001;
	max-width: 100%;
	box-sizing: border-box;
}

.cm-banner.cm-pos-bottom-bar {
	left: 0;
	right: 0;
	bottom: 0;
	max-width: 80%;
	margin-inline: auto;
	margin-bottom: 20px;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	justify-content: space-between;
}

.cm-banner.cm-pos-bottom-left,
.cm-banner.cm-pos-bottom-right {
	bottom: 20px;
	width: 380px;
	max-width: calc(100vw - 40px);
	border-radius: 12px;
}
.cm-banner.cm-pos-bottom-left { left: 20px; }
.cm-banner.cm-pos-bottom-right { right: 20px; }

.cm-banner.cm-pos-modal-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 480px;
	max-width: calc(100vw - 40px);
	border-radius: 14px;
	max-height: 85vh;
	overflow-y: auto;
}

.cm-banner h2 {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	color: var(--cm-text);
}
.cm-banner p {
	margin: 0 0 12px;
	color: var(--cm-text);
}
.cm-banner a { color: var(--cm-primary); }

.cm-banner-text-block { flex: 1 1 320px; min-width: 200px; }
.cm-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.cm-btn {
	appearance: none;
	border: 1px solid var(--cm-primary);
	background: transparent;
	color: var(--cm-primary);
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
	white-space: nowrap;
}
.cm-btn:hover { opacity: 0.85; }
.cm-btn-primary {
	background: var(--cm-primary);
	color: #fff;
}
.cm-btn-text {
	border-color: transparent;
	background: transparent;
	text-decoration: underline;
	padding-left: 6px;
	padding-right: 6px;
}

/* ---------- Settings panel (category toggles) ---------- */
.cm-settings-panel {
	margin-top: 4px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	padding-top: 12px;
}
.cm-category {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.cm-category:last-child { border-bottom: none; }
.cm-category-info strong { display: block; }
.cm-category-info span { color: rgba(17, 24, 39, 0.65); font-size: 12.5px; }
.cm-category-services {
	margin: 6px 0 0;
	font-size: 12px;
	color: rgba(17, 24, 39, 0.55);
}

.cm-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}
.cm-switch input { opacity: 0; width: 0; height: 0; }
.cm-switch .cm-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #cbd5e1;
	border-radius: 999px;
	transition: 0.15s;
}
.cm-switch .cm-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: 0.15s;
}
.cm-switch input:checked + .cm-slider { background-color: var(--cm-primary); }
.cm-switch input:checked + .cm-slider::before { transform: translateX(18px); }
.cm-switch input:disabled + .cm-slider { opacity: 0.5; cursor: not-allowed; }

.cm-close-x {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	color: rgba(17, 24, 39, 0.5);
}

/* ---------- Floating "Cookie-Einstellungen" trigger ---------- */
.cm-floating-trigger {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482999;
	background: var(--cm-bg);
	color: var(--cm-text);
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	cursor: pointer;
}

.cm-settings-trigger {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* ---------- Element / form placeholder ---------- */
.cm-placeholder {
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	padding: 24px;
	text-align: center;
	background: rgba(0, 0, 0, 0.02);
	min-height: 80px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.cm-placeholder h3 {
	margin: 0;
	font-size: 15px;
}
.cm-placeholder p {
	margin: 0;
	font-size: 13px;
	color: rgba(17, 24, 39, 0.7);
	max-width: 480px;
}

@media (max-width: 600px) {
	.cm-banner.cm-pos-bottom-bar { padding: 16px; }
	.cm-banner-actions { width: 100%; }
	.cm-btn { flex: 1 1 auto; }
}
