:root {
	--ccb-bg: #1f2430;
	--ccb-text: #f3f4f6;
	--ccb-muted: #b8bcc8;
	--ccb-accent: #3b82f6;
	--ccb-accent-text: #ffffff;
	--ccb-border: rgba(255, 255, 255, 0.14);
	--ccb-radius: 14px;
}

/* ---------- Banner flotante ---------- */
.ccb-banner {
	position: fixed;
	z-index: 999999;
	width: min(400px, calc(100vw - 32px));
	background: var(--ccb-bg);
	color: var(--ccb-text);
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
	border-radius: var(--ccb-radius);
	font-size: 14px;
	line-height: 1.5;
}
.ccb-banner[hidden] { display: none; }

.ccb-banner.ccb-pos-bottom-right { bottom: 20px; right: 20px; }
.ccb-banner.ccb-pos-bottom-left  { bottom: 20px; left: 20px; }
.ccb-banner.ccb-pos-top-right    { top: 20px; right: 20px; }
.ccb-banner.ccb-pos-top-left     { top: 20px; left: 20px; }

.ccb-banner-inner {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.ccb-title { font-weight: 600; margin: 0 0 6px; font-size: 15px; }
.ccb-description { margin: 0; color: var(--ccb-muted); }
.ccb-policy-link { color: var(--ccb-accent); text-decoration: underline; display: inline-block; margin-top: 8px; }
.ccb-policy-link[hidden] { display: none; }

.ccb-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ccb-btn {
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	flex: 1 1 auto;
}
.ccb-btn-primary { background: var(--ccb-accent); color: var(--ccb-accent-text); }
.ccb-btn-outline { background: transparent; color: var(--ccb-text); border-color: var(--ccb-border); }
.ccb-btn:hover { filter: brightness(1.1); }

/* ---------- Icono flotante de preferencias (siempre disponible) ---------- */
.ccb-floating-icon {
	position: fixed;
	z-index: 999998;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: var(--ccb-bg);
	border: 1px solid #ffffff42;
	color: var(--ccb-text);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.4s ease!important;
	padding: 0!important;
}
.ccb-floating-icon:hover { transform: scale(1.3); }
.ccb-floating-icon svg { width: 46px; height: 46px; display: block; fill: var(--ccb-text); }
.ccb-floating-icon:hover svg { fill: var(--ccb-text)!important; color: var(--ccb-text)!important; }
.ccb-floating-icon[hidden] { display: none; }
.ccb-floating-icon.ccb-pos-bottom-right { bottom: 25px; right: 25px; }
.ccb-floating-icon.ccb-pos-bottom-left  { bottom: 25px; left: 25px; }
.ccb-floating-icon.ccb-pos-top-right    { top: 25px; right: 25px; }
.ccb-floating-icon.ccb-pos-top-left     { top: 25px; left: 25px; }

/* ---------- Modal de configuración ---------- */
.ccb-modal { position: fixed; inset: 0; z-index: 1000000; display: flex; align-items: center; justify-content: center; }
.ccb-modal[hidden] { display: none; }
.ccb-modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.ccb-modal-box {
	position: relative;
	background: var(--ccb-bg);
	color: var(--ccb-text);
	width: min(560px, 92vw);
	max-height: 85vh;
	overflow-y: auto;
	border-radius: var(--ccb-radius);
	padding: 24px;
}
.ccb-modal-title { margin: 0 0 16px; font-size: 18px; }

.ccb-category {
	border: 1px solid var(--ccb-border);
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 10px;
}
.ccb-category-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ccb-category-header strong { font-size: 14px; }
.ccb-category-description { margin: 6px 0 0; font-size: 13px; color: var(--ccb-muted); }

.ccb-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.ccb-switch input { opacity: 0; width: 0; height: 0; }
.ccb-switch .ccb-slider {
	position: absolute; inset: 0; background: #d1d5db; border-radius: 999px; cursor: pointer; transition: 0.15s;
}
.ccb-switch .ccb-slider::before {
	content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.15s;
}
.ccb-switch input:checked + .ccb-slider { background: var(--ccb-accent); }
.ccb-switch input:checked + .ccb-slider::before { transform: translateX(18px); }
.ccb-switch input:disabled + .ccb-slider { opacity: 0.6; cursor: not-allowed; }

.ccb-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
/* Los botones "outline" del modal ya heredan var(--ccb-text) / var(--ccb-border) de la regla
   general .ccb-btn-outline, así que se adaptan solos al tema oscuro/claro. */

@media (max-width: 480px) {
	.ccb-banner { left: 16px !important; right: 16px !important; width: auto; }
	.ccb-banner-actions .ccb-btn { flex: 1 1 100%; }
}
