/* CHR Cookie Consent — themeable via CSS custom properties.
   Override these variables in your theme to match your brand. */
#ccc-root {
	--ccc-bg: #ffffff;
	--ccc-text: #1c2733;
	--ccc-muted: #5b6b7b;
	--ccc-border: #d9e0e7;
	--ccc-accent: #0b5c8a;
	--ccc-accent-text: #ffffff;
	--ccc-radius: 10px;
	--ccc-shadow: 0 8px 30px rgba(15, 30, 45, .18);
	font-size: 15px;
	line-height: 1.45;
}
#ccc-root, #ccc-root * { box-sizing: border-box; font-family: inherit; }

/* ---------------- Banner ---------------- */
.ccc-banner {
	position: fixed; z-index: 999999;
	max-width: 420px; width: calc(100% - 32px);
	background: var(--ccc-bg); color: var(--ccc-text);
	border: 1px solid var(--ccc-border); border-radius: var(--ccc-radius);
	box-shadow: var(--ccc-shadow); padding: 20px;
	animation: ccc-in .25s ease-out;
}
.ccc-pos-bottom-left  { left: 16px;  bottom: 16px; }
.ccc-pos-bottom-right { right: 16px; bottom: 16px; }
.ccc-pos-center       { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ccc-pos-bottom-bar   { left: 0; right: 0; bottom: 0; max-width: none; width: 100%;
	border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }

.ccc-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.ccc-msg   { margin: 0 0 10px; color: var(--ccc-muted); }
.ccc-gpc   { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px;
	background: #eef6ee; color: #21572a; font-size: 13px; }
.ccc-privacy { display: inline-block; margin-bottom: 12px; color: var(--ccc-accent);
	text-decoration: underline; }

/* Equal prominence: Accept and Reject share .ccc-primary on purpose. */
.ccc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ccc-btn {
	appearance: none; cursor: pointer; font: inherit; font-weight: 600;
	border-radius: calc(var(--ccc-radius) - 4px); padding: 10px 16px;
	border: 1px solid var(--ccc-accent); transition: filter .15s ease;
}
.ccc-btn:hover { filter: brightness(1.08); }
.ccc-btn:focus-visible { outline: 3px solid var(--ccc-accent); outline-offset: 2px; }
.ccc-primary { background: var(--ccc-accent); color: var(--ccc-accent-text); }
.ccc-ghost   { background: transparent; color: var(--ccc-accent); }

/* ---------------- Preferences modal ---------------- */
.ccc-overlay {
	position: fixed; inset: 0; z-index: 1000000;
	background: rgba(10, 20, 30, .55);
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ccc-modal {
	position: relative; background: var(--ccc-bg); color: var(--ccc-text);
	border-radius: var(--ccc-radius); box-shadow: var(--ccc-shadow);
	max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto;
	padding: 24px;
}
.ccc-close {
	position: absolute; top: 10px; right: 10px;
	background: transparent; border: 0; font-size: 22px; line-height: 1;
	cursor: pointer; color: var(--ccc-muted); padding: 6px 10px;
}
.ccc-close:focus-visible { outline: 3px solid var(--ccc-accent); border-radius: 6px; }

.ccc-cat { border-top: 1px solid var(--ccc-border); padding: 14px 0; }
.ccc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ccc-cat-head h3 { margin: 0; font-size: 15px; }
.ccc-cat-desc { margin: 6px 0 0; color: var(--ccc-muted); font-size: 13.5px; }
.ccc-locked { font-size: 12px; font-weight: 700; color: var(--ccc-accent);
	text-transform: uppercase; letter-spacing: .04em; }

/* Toggle switch */
.ccc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.ccc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ccc-slider { position: absolute; inset: 0; border-radius: 999px;
	background: var(--ccc-border); transition: background .15s ease; }
.ccc-slider::before { content: ""; position: absolute; top: 3px; left: 3px;
	width: 18px; height: 18px; border-radius: 50%; background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s ease; }
.ccc-switch input:checked + .ccc-slider { background: var(--ccc-accent); }
.ccc-switch input:checked + .ccc-slider::before { transform: translateX(20px); }
.ccc-switch input:focus-visible + .ccc-slider { outline: 3px solid var(--ccc-accent); outline-offset: 2px; }

/* Cookie declaration table */
.ccc-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12.5px; }
.ccc-table th, .ccc-table td { text-align: left; padding: 6px 8px;
	border-bottom: 1px solid var(--ccc-border); vertical-align: top; }
.ccc-table th { color: var(--ccc-muted); font-weight: 600; }

.ccc-receipt { margin-top: 14px; font-size: 12px; color: var(--ccc-muted); word-break: break-all; }

/* Floating re-open badge */
.ccc-badge {
	position: fixed; left: 16px; bottom: 16px; z-index: 999998;
	background: var(--ccc-bg); color: var(--ccc-accent);
	border: 1px solid var(--ccc-border); border-radius: 999px;
	box-shadow: var(--ccc-shadow); padding: 8px 14px; font: inherit;
	font-size: 13px; font-weight: 600; cursor: pointer;
}
.ccc-badge:focus-visible { outline: 3px solid var(--ccc-accent); outline-offset: 2px; }

@keyframes ccc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.ccc-banner { animation: none; }
	.ccc-btn, .ccc-slider, .ccc-slider::before { transition: none; }
}
@media (max-width: 480px) {
	.ccc-banner { left: 8px !important; right: 8px !important; width: auto; }
	.ccc-actions .ccc-btn { flex: 1 1 auto; }
}

/* Iframes held back until consent (YouTube, maps…) */
.ccc-blocked-iframe {
	background: repeating-linear-gradient(45deg, #f1f3f5, #f1f3f5 12px, #e9edf1 12px, #e9edf1 24px);
	min-height: 120px;
	border: 1px dashed #c3cbd4;
}
