/* Avuna Cookiemelding */
.acm,
.acm-open {
	--acm-bg: #fff;
	--acm-tekst: #14325c;
	--acm-knop: #22c6e5;
	--acm-knop-tekst: #14325c;
	--acm-rand: color-mix(in srgb, var(--acm-tekst) 14%, transparent);
	--acm-zacht: color-mix(in srgb, var(--acm-tekst) 6%, var(--acm-bg));
}

.acm[hidden],
.acm-open[hidden],
.acm [hidden] {
	display: none !important;
}

.acm {
	position: fixed;
	z-index: 2147483000;
	bottom: 20px;
	width: min(400px, calc(100vw - 32px));
	font: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--acm-tekst);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}
.acm--links { left: 20px; }
.acm--rechts { right: 20px; }
.acm--midden { left: 50%; transform: translate(-50%, 12px); }
.acm--zichtbaar { opacity: 1; transform: none; }
.acm--midden.acm--zichtbaar { transform: translate(-50%, 0); }

.acm *,
.acm *::before,
.acm *::after { box-sizing: border-box; }

.acm__paneel {
	background: var(--acm-bg);
	border: 1px solid var(--acm-rand);
	border-radius: 18px;
	padding: 22px;
	box-shadow: 0 18px 40px -12px rgba(20, 50, 92, .28);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

.acm__titel {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
}

.acm__tekst {
	margin: 0 0 16px;
	font-size: 14px;
	color: inherit;
	opacity: .9;
}

.acm__privacy {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

/* Keuzes */
.acm__keuzes {
	display: grid;
	gap: 8px;
	margin: 0 0 16px;
}
.acm__keuze {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 14px;
	background: var(--acm-zacht);
	border-radius: 12px;
	margin: 0;
	cursor: default;
}
label.acm__keuze { cursor: pointer; }
.acm__keuze-info { display: grid; gap: 2px; min-width: 0; }
.acm__keuze-titel { font-weight: 600; font-size: 14px; }
.acm__keuze-tekst { font-size: 13px; opacity: .8; }
.acm__altijd { font-size: 12px; font-weight: 600; white-space: nowrap; opacity: .7; }

/* Schakelaar: echte checkbox onzichtbaar, eigen schakelaar ernaast (thema-proof) */
.acm .acm__invoer {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	opacity: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
}
.acm .acm__schakelaar {
	flex: 0 0 auto;
	position: relative;
	display: block;
	width: 46px;
	height: 28px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--acm-tekst) 28%, var(--acm-bg));
	transition: background .2s ease;
}
.acm .acm__schakelaar::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .2s ease;
}
.acm .acm__invoer:checked + .acm__schakelaar { background: var(--acm-knop); }
.acm .acm__invoer:checked + .acm__schakelaar::after { transform: translateX(18px); }
.acm .acm__invoer:focus-visible + .acm__schakelaar {
	outline: 3px solid var(--acm-knop);
	outline-offset: 2px;
}
.acm label.acm__keuze { position: relative; }

/* Knoppen: accepteren en weigeren even groot */
.acm__knoppen {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.acm .acm__knop {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 16px;
	border-radius: 999px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: filter .15s ease, background .15s ease;
}
.acm .acm__knop--vol {
	background: var(--acm-knop);
	color: var(--acm-knop-tekst);
	border: 2px solid var(--acm-knop);
}
.acm .acm__knop--rand {
	background: transparent;
	color: var(--acm-tekst);
	border: 2px solid var(--acm-tekst);
}
.acm .acm__knop:hover { filter: brightness(.95); }
.acm .acm__knop--rand:hover { background: var(--acm-zacht); }
.acm [data-acm="opslaan"] { grid-column: 1 / -1; }

.acm .acm__link {
	grid-column: 1 / -1;
	justify-self: center;
	appearance: none;
	background: none;
	border: 0;
	margin: 2px 0 0;
	padding: 6px 8px;
	font: inherit;
	font-size: 14px;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.acm :focus-visible,
.acm-open:focus-visible {
	outline: 3px solid var(--acm-knop);
	outline-offset: 2px;
}

/* Zwevende knop om de keuze aan te passen */
.acm-open {
	position: fixed;
	z-index: 2147482999;
	bottom: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--acm-rand);
	border-radius: 50%;
	background: var(--acm-bg);
	color: var(--acm-tekst);
	box-shadow: 0 6px 18px -6px rgba(20, 50, 92, .35);
	cursor: pointer;
}
.acm-open--links { left: 20px; }
.acm-open--rechts { right: 20px; }

/* Tabel van [cookielijst] */
.acm-tabel-wrap { overflow-x: auto; }
.acm-tabel { width: 100%; border-collapse: collapse; font-size: .95em; }
.acm-tabel th,
.acm-tabel td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, .1); vertical-align: top; }

@media (max-width: 480px) {
	.acm,
	.acm--midden {
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
		transform: translateY(12px);
	}
	.acm--zichtbaar,
	.acm--midden.acm--zichtbaar { transform: none; }
	.acm__paneel { padding: 18px; max-height: calc(100vh - 24px); }
	.acm-open { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
	.acm-open--links { left: 12px; }
	.acm-open--rechts { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.acm,
	.acm .acm__schakelaar,
	.acm .acm__schakelaar::after { transition: none; }
}
