:root {
	--ccm-bg: #111827;
	--ccm-text: #ffffff;
	--ccm-accent: #22c55e;
	--ccm-accent-text: #052e16;
	--ccm-reject: #ffffff;
	--ccm-reject-text: #111827;
}

.ccm-overlay {
	position: fixed; inset: 0; z-index: 999998;
	background: rgba(0,0,0,0.45);
}

/* ---------- banner ---------- */
.ccm-banner {
	position: fixed; z-index: 999999;
	background: var(--ccm-bg); color: var(--ccm-text);
	box-shadow: 0 0 24px rgba(0,0,0,0.25);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px; line-height: 1.5;
}
/* bar layout */
.ccm-layout-bar { left: 0; right: 0; }
.ccm-layout-bar.ccm-position-bottom { bottom: 0; }
.ccm-layout-bar.ccm-position-top { top: 0; }
/* box layout */
.ccm-layout-box { max-width: 440px; border-radius: 12px; margin: 20px; }
.ccm-layout-box.ccm-position-box-left { bottom: 0; left: 0; }
.ccm-layout-box.ccm-position-box-right { bottom: 0; right: 0; }
.ccm-layout-box.ccm-position-center { top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; }
.ccm-layout-box.ccm-position-bottom { bottom: 0; left: 50%; transform: translateX(-50%); }
.ccm-layout-box.ccm-position-top { top: 0; left: 50%; transform: translateX(-50%); }

.ccm-banner-inner {
	max-width: 1200px; margin: 0 auto; padding: 20px 24px;
	display: flex; flex-wrap: wrap; gap: 16px;
	align-items: center; justify-content: space-between;
}
.ccm-layout-box .ccm-banner-inner { flex-direction: column; align-items: stretch; padding: 22px; }
.ccm-banner-text { flex: 1 1 400px; }
.ccm-banner-text strong { font-size: 16px; display: block; margin-bottom: 4px; }
.ccm-banner-text p { margin: 0 0 4px; opacity: 0.92; }
.ccm-banner-text a { color: var(--ccm-accent); text-decoration: underline; }
.ccm-us-notice { font-size: 13px; opacity: 0.85; margin-top: 8px; }

.ccm-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ccm-layout-box .ccm-banner-actions { width: 100%; }
.ccm-layout-box .ccm-btn { flex: 1; }

/* ---------- buttons: accept & reject EQUAL prominence ---------- */
.ccm-btn {
	padding: 11px 20px; border-radius: 6px; font-size: 14px; font-weight: 600;
	cursor: pointer; border: 1px solid transparent; white-space: nowrap; min-width: 120px; text-align: center;
	transition: opacity .15s, box-shadow .15s;
}
.ccm-btn-accept { background: var(--ccm-accent); color: var(--ccm-accent-text); border-color: var(--ccm-accent); }
.ccm-btn-reject { background: var(--ccm-reject); color: var(--ccm-reject-text); border-color: var(--ccm-reject); }
.ccm-btn-accept:hover, .ccm-btn-reject:hover { opacity: .9; }
.ccm-btn-ghost { background: transparent; color: var(--ccm-text); border-color: currentColor; font-weight: 500; opacity: .85; min-width: auto; }
.ccm-btn-ghost:hover { opacity: 1; }
.ccm-btn:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }

/* ---------- modal ---------- */
.ccm-modal {
	position: fixed; inset: 0; z-index: 1000000;
	background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ccm-modal-content {
	background: #fff; color: #1e293b; max-width: 580px; width: 100%;
	border-radius: 12px; padding: 26px; max-height: 86vh; overflow-y: auto; position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ccm-modal-content h2 { margin: 0 0 8px; font-size: 19px; }
.ccm-modal-intro { font-size: 14px; color: #475569; margin: 0 0 16px; }
.ccm-modal-x { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #94a3b8; }
.ccm-modal-x:hover { color: #475569; }

.ccm-gpc-honored {
	background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
	padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px;
}

.ccm-category-item { border-bottom: 1px solid #e5e7eb; padding: 14px 0; }
.ccm-category-item:last-child { border-bottom: none; }
.ccm-category-header { display: flex; align-items: center; gap: 10px; }
.ccm-category-header strong { font-size: 15px; }
.ccm-always-on { font-size: 11px; color: #16a34a; background: #dcfce7; padding: 2px 8px; border-radius: 10px; margin-left: auto; }
.ccm-category-desc { margin: 6px 0 0 50px; font-size: 13px; color: #64748b; }

.ccm-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.ccm-switch input { opacity: 0; width: 0; height: 0; }
.ccm-slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 24px; transition: .2s; }
.ccm-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.ccm-category-toggle:checked + .ccm-slider { background: var(--ccm-accent); }
.ccm-category-toggle:checked + .ccm-slider:before { transform: translateX(18px); }
.ccm-category-toggle:disabled + .ccm-slider { opacity: .55; cursor: not-allowed; }
.ccm-category-toggle:focus-visible + .ccm-slider { outline: 3px solid #60a5fa; outline-offset: 2px; }

.ccm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.ccm-modal-actions .ccm-btn-accept { background: var(--ccm-accent); color: var(--ccm-accent-text); }
.ccm-modal-actions .ccm-btn-reject { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }
.ccm-modal-actions .ccm-btn-ghost { color: #1e293b; border-color: #cbd5e1; }
.ccm-modal-actions .ccm-btn-ghost:hover { background: #f1f5f9; }

/* ---------- footer helpers ---------- */
.ccm-reopen-btn {
	padding: 8px 14px; border-radius: 6px; border: 1px solid #cbd5e1;
	background: #f8fafc; cursor: pointer; font-size: 14px;
}
.ccm-do-not-sell { display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; cursor: pointer; }
.ccm-privacy-icon {
	display: inline-block; width: 30px; height: 14px; border-radius: 8px;
	background: linear-gradient(90deg, #1e40af 50%, #fff 50%); border: 1px solid #1e40af; position: relative;
}
.ccm-privacy-icon:after { content: ""; position: absolute; top: 1px; left: 15px; width: 11px; height: 11px; background: #1e40af; border-radius: 50%; }

@media (max-width: 600px) {
	.ccm-banner-inner { flex-direction: column; align-items: stretch; }
	.ccm-banner-actions { justify-content: stretch; }
	.ccm-banner-actions .ccm-btn { flex: 1; }
	.ccm-modal-actions { flex-direction: column-reverse; }
	.ccm-modal-actions .ccm-btn { width: 100%; }
}
