/* Cookie Monster banner — subtle, modern, non-intrusive */
.cm-banner {
	--cm-bg: #ffffff;
	--cm-fg: #0f172a;
	--cm-muted: #64748b;
	--cm-border: rgba(15, 23, 42, 0.08);
	--cm-shadow: 0 10px 40px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
	position: fixed;
	z-index: 2147483000;
	max-width: 420px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--cm-fg);
	background: var(--cm-bg);
	border: 1px solid var(--cm-border);
	border-radius: var(--cm-radius, 14px);
	box-shadow: var(--cm-shadow);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 280ms ease, transform 280ms ease;
	pointer-events: none;
}

.cm-banner.cm-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.cm-banner.cm-hidden {
	display: none;
}

.cm-banner[data-theme="dark"] {
	--cm-bg: rgba(17, 24, 39, 0.96);
	--cm-fg: #f8fafc;
	--cm-muted: #94a3b8;
	--cm-border: rgba(255, 255, 255, 0.08);
	--cm-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.cm-banner[data-position="bottom-right"] { right: 20px; bottom: 20px; }
.cm-banner[data-position="bottom-left"]  { left: 20px;  bottom: 20px; }
.cm-banner[data-position="bottom-center"] {
	left: 50%;
	bottom: 20px;
	transform: translate(-50%, 12px);
	max-width: 560px;
}
.cm-banner[data-position="bottom-center"].cm-visible {
	transform: translate(-50%, 0);
}
.cm-banner[data-position="bottom-bar"] {
	left: 0;
	right: 0;
	bottom: 0;
	max-width: none;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
}

.cm-banner-inner {
	padding: 18px 20px;
}

.cm-banner-title {
	font-weight: 600;
	font-size: 15px;
	margin-bottom: 6px;
	letter-spacing: -0.01em;
}

.cm-banner-msg {
	color: var(--cm-muted);
	font-size: 13px;
	margin-bottom: 14px;
}

.cm-banner-link {
	color: var(--cm-accent, #4f46e5);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cm-banner-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
}

.cm-banner-actions-secondary {
	margin-top: 12px;
}

.cm-btn {
	appearance: none;
	border: 1px solid transparent;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 13px;
	padding: 8px 14px;
	border-radius: 10px;
	cursor: pointer;
	transition: background 150ms ease, transform 150ms ease, border-color 150ms ease;
}
.cm-btn:focus-visible {
	outline: 2px solid var(--cm-accent, #4f46e5);
	outline-offset: 2px;
}
.cm-btn:active { transform: scale(0.98); }

.cm-btn-ghost {
	color: var(--cm-muted);
}
.cm-btn-ghost:hover {
	background: rgba(15, 23, 42, 0.04);
	color: var(--cm-fg);
}
.cm-banner[data-theme="dark"] .cm-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.06);
}

.cm-btn-secondary {
	border-color: var(--cm-border);
}
.cm-btn-secondary:hover {
	background: rgba(15, 23, 42, 0.04);
}
.cm-banner[data-theme="dark"] .cm-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.06);
}

.cm-btn-primary {
	background: var(--cm-accent, #4f46e5);
	color: #fff;
	border-color: var(--cm-accent, #4f46e5);
}
.cm-btn-primary:hover { filter: brightness(1.06); }

.cm-prefs {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--cm-border);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cm-prefs[hidden] {
	display: none;
}

.cm-pref {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	justify-content: space-between;
}
.cm-pref-meta { display: flex; flex-direction: column; }
.cm-pref-label { font-weight: 500; font-size: 13px; }
.cm-pref-desc { color: var(--cm-muted); font-size: 12px; }

.cm-switch {
	position: relative;
	display: inline-block;
	width: 36px;
	height: 20px;
	flex-shrink: 0;
	margin-top: 2px;
}
.cm-switch input { opacity: 0; width: 0; height: 0; }
.cm-switch-slider {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.15);
	border-radius: 999px;
	transition: background 200ms ease;
}
.cm-switch-slider::before {
	content: "";
	position: absolute;
	height: 16px; width: 16px;
	left: 2px; top: 2px;
	background: #fff;
	border-radius: 50%;
	transition: transform 200ms ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.cm-switch input:checked + .cm-switch-slider { background: var(--cm-accent, #4f46e5); }
.cm-switch input:checked + .cm-switch-slider::before { transform: translateX(16px); }
.cm-switch input:disabled + .cm-switch-slider { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 520px) {
	.cm-banner[data-position="bottom-right"],
	.cm-banner[data-position="bottom-left"] {
		left: 12px; right: 12px; bottom: 12px; max-width: none;
	}
	.cm-banner-actions { justify-content: stretch; }
	.cm-btn { flex: 1; text-align: center; }
}

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