/* cistenicb-consent — banner (Avada brand: teal #0a9695, navy #182c45). */

#cbcm-banner,
#cbcm-reopen {
	--cbcm-primary: #0a9695;
	--cbcm-primary-hover: #182c45;
	--cbcm-text: #333333;
	--cbcm-muted: #6a6a6a;
	--cbcm-border: #e2e8e8;
	--cbcm-tint: #d0ebeb;
	--cbcm-bg: #ffffff;
	--cbcm-ready: 1; /* sentinel — banner.js čeká na aplikaci tohoto CSS (async doručení, bez FOUC) */
	box-sizing: border-box;
}

#cbcm-banner *,
#cbcm-banner *::before,
#cbcm-banner *::after {
	box-sizing: border-box;
}

.cbcm-hidden {
	display: none !important;
}

/* Floating corner card (desktop) */
.cbcm-banner {
	position: fixed;
	z-index: 2147483000;
	right: 24px;
	bottom: 24px;
	width: 360px;
	max-width: calc(100vw - 32px);
	font: inherit;
	color: var(--cbcm-text);
	-webkit-font-smoothing: antialiased;
}

/* Spotlight dim behind the card — full viewport, visual only (no click/scroll block) */
.cbcm-overlay {
	position: fixed;
	inset: 0;
	z-index: 0;
	background: rgba(24, 44, 69, 0.32);
	pointer-events: none;
	animation: cbcm-fade 0.28s ease;
}

.cbcm-card {
	position: relative;
	z-index: 1;
	background: var(--cbcm-bg);
	border: 1px solid var(--cbcm-border);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(24, 44, 69, 0.18);
	padding: 20px;
	animation: cbcm-in 0.28s ease;
}

@keyframes cbcm-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

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

@media (prefers-reduced-motion: reduce) {
	.cbcm-card,
	.cbcm-overlay { animation: none; }
}

.cbcm-title {
	margin: 0 0 8px;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--cbcm-primary-hover);
}

.cbcm-emoji { font-size: 1.1em; }

.cbcm-desc {
	margin: 0 0 16px;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--cbcm-text);
}

.cbcm-link {
	color: var(--cbcm-primary);
	text-decoration: underline;
	white-space: nowrap;
}

/* Buttons */
.cbcm-actions {
	display: flex;
	gap: 10px;
	/* Desktop: primární „Přijmout" vlevo (kratší cesta myší). DOM pořadí zůstává
	   Odmítnout→Přijmout kvůli tab/screen-reader pořadí; přehazuje se jen vizuálně. */
	flex-direction: row-reverse;
}

.cbcm-btn {
	flex: 1 1 0;
	min-height: 44px;
	padding: 10px 14px;
	border-radius: 10px;
	border: 2px solid var(--cbcm-primary);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cbcm-btn--primary {
	background: var(--cbcm-primary);
	color: #fff;
}
.cbcm-btn--primary:hover,
.cbcm-btn--primary:focus-visible {
	background: var(--cbcm-primary-hover);
	border-color: var(--cbcm-primary-hover);
}

.cbcm-btn--secondary {
	background: #fff;
	color: var(--cbcm-primary);
}
.cbcm-btn--secondary:hover,
.cbcm-btn--secondary:focus-visible {
	background: var(--cbcm-tint);
}

.cbcm-btn-text {
	display: block;
	width: 100%;
	margin-top: 12px;
	padding: 6px;
	background: none;
	border: 0;
	font: inherit;
	font-size: 0.85rem;
	color: var(--cbcm-muted);
	text-decoration: underline;
	cursor: pointer;
}
.cbcm-btn-text:hover,
.cbcm-btn-text:focus-visible { color: var(--cbcm-primary-hover); }

.cbcm-btn:focus-visible,
.cbcm-btn-text:focus-visible,
.cbcm-reopen:focus-visible {
	outline: 3px solid rgba(10, 150, 149, 0.45);
	outline-offset: 2px;
}

/* Settings categories */
.cbcm-cats {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}
.cbcm-cat { padding: 12px 0; border-top: 1px solid var(--cbcm-border); }
.cbcm-cat:first-child { border-top: 0; }

.cbcm-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
}
.cbcm-cat-name { font-weight: 600; font-size: 0.92rem; }
.cbcm-cat-desc { margin: 4px 0 0; font-size: 0.82rem; line-height: 1.45; color: var(--cbcm-muted); }

/* Toggle switch */
.cbcm-switch { position: relative; flex: 0 0 auto; width: 44px; height: 26px; }
.cbcm-switch input {
	position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer;
}
.cbcm-switch-ui {
	position: absolute; inset: 0;
	background: #c7cdcd; border-radius: 999px;
	transition: background-color 0.15s ease;
	pointer-events: none;
}
.cbcm-switch-ui::after {
	content: ""; position: absolute; top: 3px; left: 3px;
	width: 20px; height: 20px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
	transition: transform 0.15s ease;
}
.cbcm-switch input:checked + .cbcm-switch-ui { background: var(--cbcm-primary); }
.cbcm-switch input:checked + .cbcm-switch-ui::after { transform: translateX(18px); }
.cbcm-switch input:focus-visible + .cbcm-switch-ui {
	outline: 3px solid rgba(10, 150, 149, 0.45); outline-offset: 2px;
}
.cbcm-switch--locked input:checked + .cbcm-switch-ui { background: var(--cbcm-tint); }
.cbcm-switch--locked input:checked + .cbcm-switch-ui::after { background: var(--cbcm-primary); }

/* Reopen pill — bottom-right, raised above the theme's scroll-to-top arrow
   (left side blends with the teal sidebar, so we stack on the right instead) */
.cbcm-reopen {
	position: fixed;
	z-index: 2147482000;
	/* Vedle theme šipky „nahoru" (44×44, radius 6, right 90, bottom 30): stejná
	   spodní osa, 🍪 napravo od šipky, blíž k okraji. */
	right: 20px;
	bottom: 30px;
	width: 44px; height: 44px;
	border-radius: 6px;
	border: 0;
	background: var(--cbcm-primary);
	color: #fff;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 22px rgba(24, 44, 69, 0.32);
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.cbcm-reopen:hover { background: var(--cbcm-primary-hover); transform: translateY(-2px); }

/* Mobile: bottom sheet full width */
@media (max-width: 600px) {
	.cbcm-banner {
		right: 0; bottom: 0; left: 0;
		width: 100%;
		max-width: 100%;
	}
	.cbcm-card {
		border-radius: 16px 16px 0 0;
		border-left: 0; border-right: 0; border-bottom: 0;
		padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
	}
	.cbcm-reopen { right: 16px; bottom: 20px; }
	/* Mobil: „Přijmout" vpravo (dosah pravého palce). */
	.cbcm-actions { flex-direction: row; }
}
