/*
 * Cookiebanner, voorkeuren, status en cookielijst van Consentic in de huisstijl.
 * De markup van banner en voorkeuren staat in EmDash (Scripts, footer-veld); de status en de cookielijst op /cookies
 * (src/components/CookieInstellingen.astro). Consentic koppelt zich aan de data-raf9uk1c-attributen; deze stijl aan de cc-klassen.
 */
:root {
	--consentic-accent: #01e5f3;
	--consentic-toggle-on: #01e5f3;
	--consentic-divider: transparent;
}

.cc,
.cc * { box-sizing: border-box; }
.cc {
	font-family: var(--font-sans, "N27", "Helvetica Neue", Arial, sans-serif);
	color: #ffffff;
	-webkit-font-smoothing: antialiased;
}
.cc h2, .cc h3, .cc h4, .cc h5, .cc p { margin: 0; }

/* Vizier: de cyaan hoeken uit de huisstijl */
.cc-vizier { position: relative; }
.cc-vizier::before,
.cc-vizier::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 14px;
	pointer-events: none;
	border-color: #01e5f3;
	border-style: solid;
}
.cc-vizier::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.cc-vizier::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }

/* Knoppen */
.cc-knop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 1.5px solid #3a3a42;
	border-radius: 999px;
	background: transparent;
	color: #ffffff;
	font: 500 15px/1 var(--font-sans, "N27", sans-serif);
	letter-spacing: -0.005em;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.cc-knop:hover { border-color: #ffffff; }
.cc-knop--stil { border-color: transparent; color: #b8b8bf; padding: 0 12px; }
.cc-knop--stil:hover { border-color: transparent; color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.cc-knop--actie { background: #3f61d9; border-color: #3f61d9; }
.cc-knop--actie:hover { background: #2f4fc4; border-color: #2f4fc4; }
.cc-knop:focus-visible { outline: 2px solid #01e5f3; outline-offset: 3px; }

.cc-label {
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #01e5f3;
}

/* Banner */
.cc-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	margin: 0 auto;
	max-width: 1100px;
	background: #14141a;
	border: 1px solid #2a2a31;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
	animation: cc-in .35s cubic-bezier(.2, .9, .1, 1);
}
.cc-banner__binnen {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	padding: 24px 28px;
}
.cc-banner__tekst { flex: 1 1 340px; }
.cc-banner__tekst :is(h2, h4) { margin-top: 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.cc-banner__tekst p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: #b8b8bf; max-width: 520px; }
.cc-knoppen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Voorkeuren (lade) */
.cc-voorkeuren {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 10000;
	width: calc(100% - 32px);
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #14141a;
	border: 1px solid #2a2a31;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
	padding: 28px;
	animation: cc-in .35s cubic-bezier(.2, .9, .1, 1);
}
.cc-voorkeuren :is(h2, h4) { margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.cc-voorkeuren > small { display: block; margin-top: 8px; font-size: 14px; line-height: 1.5; color: #b8b8bf; }
.cc-cats { margin-top: 18px; border-top: 1px solid #2a2a31; }
.cc-cat { padding: 16px 0; border-bottom: 1px solid #2a2a31; }
.cc-cat__kop { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cc-cat :is(h3, h5) { font-size: 16px; font-weight: 500; }
.cc-cat p { margin-top: 3px; font-size: 13px; line-height: 1.45; color: #85858e; }
.cc-voorkeuren__voet { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.cc-voorkeuren__voet .cc-knoppen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-voorkeuren__voet .cc-knoppen .cc-knop--actie { grid-column: 1 / -1; }
.cc-link { align-self: center; font-size: 13px; color: #85858e; text-decoration: underline; text-underline-offset: 3px; }
.cc-link:hover { color: #ffffff; }

/* Schakelaars */
.cc [data-raf9uk1c-category] input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	margin: 2px 0 0;
	width: 44px;
	height: 24px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	background-color: #3a3a42;
	background-image: radial-gradient(circle, #ffffff 49%, transparent 51%);
	background-size: 18px 18px;
	background-position: 3px center;
	background-repeat: no-repeat;
	transition: background-color .16s ease, background-position .16s ease;
}
.cc [data-raf9uk1c-category] input[type="checkbox"]:checked { background-color: #01e5f3; background-image: radial-gradient(circle, #0d1c25 49%, transparent 51%); background-position: 23px center; }
.cc [data-raf9uk1c-category] input[type="checkbox"]:focus-visible { outline: 2px solid #01e5f3; outline-offset: 3px; }
.cc [data-raf9uk1c-category] input[type="checkbox"]:disabled { opacity: .55; cursor: not-allowed; }

/* Lijst met cookies (door Consentic gevuld) */
.cc [data-raf9uk1c-cookie-list] { margin-top: 8px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; color: #85858e; }
.cc [data-raf9uk1c-cookie-list]:empty { display: none; }
/* In de voorkeuren geen losse cookies; het overzicht staat op /cookies */
.cc-voorkeuren [data-raf9uk1c-cookie-list] { display: none !important; }

/* Merkteken van Consentic klein houden */
.cc [data-raf9uk1c-brand] { display: none !important; }

@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cc-banner, .cc-voorkeuren { animation: none; } }
@media (max-width: 640px) {
	.cc-banner { left: 8px; right: 8px; bottom: 8px; }
	.cc-banner__binnen { padding: 20px; }
	/* Op de telefoon onder elkaar, even breed: eerst accepteren, dan weigeren, voorkeuren als tekstlink onderaan */
	.cc-banner .cc-knoppen { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
	.cc-banner .cc-knoppen .cc-knop { width: 100%; }
	.cc-banner .cc-knoppen .cc-knop--actie { order: 1; }
	.cc-banner .cc-knoppen [data-raf9uk1c-deny-all] { order: 2; }
	.cc-banner .cc-knoppen .cc-knop--stil { order: 3; min-height: 36px; }
	/* Consentic zet de voorkeurenknop zelf vooraan (order: -1 !important); op de telefoon hoort hij onderaan */
	[data-raf9uk1c-banner] .cc-knoppen [data-raf9uk1c-open-preferences] { order: 3 !important; }
	.cc-voorkeuren { right: 8px; bottom: 8px; width: calc(100% - 16px); padding: 22px; }
}

/* Cookiepagina: status en overzicht */
.cc-pagina { display: grid; gap: 32px; margin-top: 40px; }
.cc-status { background: #0d0d11; border: 1px solid #2a2a31; max-width: 640px; }
.cc-status__kop { padding: 24px 28px 18px; }
.cc-status__rij { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.cc-status__kop :is(h2, h4) { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: #ffffff; }
.cc-status__kop p { margin-top: 6px; font-size: 14px; color: #b8b8bf; }
.cc-status [data-raf9uk1c-status-state] {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border: 1px solid #3a3a42;
	border-radius: 999px;
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #85858e;
}
.cc-status__meta { padding: 14px 28px; border-block: 1px solid #2a2a31; background: #14141a; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; color: #ffffff; }
.cc-status__meta .cc-label { color: #85858e; font-size: 11px; display: block; margin-bottom: 4px; }
.cc-status [data-raf9uk1c-status-id] { margin-top: 4px; color: #85858e; word-break: break-all; }
.cc-status [data-raf9uk1c-status-list] { padding: 16px 28px; font-size: 15px; color: #ffffff; }
.cc-status [data-raf9uk1c-status-list]:empty { display: none; }
.cc-status__voet { padding: 18px 28px 24px; border-top: 1px solid #2a2a31; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cc-overzicht { font-family: var(--font-sans, "N27", sans-serif); }
.cc-overzicht table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cc-overzicht th, .cc-overzicht td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line, #e2e2e6); vertical-align: top; }
.cc-overzicht th { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--ink-faint, #6a6973); }
.cc-overzicht code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; }

/* Knop in de footer */
.cfy-cookieknop { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cfy-cookieknop:hover { color: var(--ink, #ffffff); }

/* Teller per cookiecategorie (Consentic): genoeg contrast op de lichte achtergrond */
.cc-overzicht .cc-policy-count { color: #05603a; }
