.wighz-consent,
.wighz-consent *,
.wighz-consent-reopen,
.wighz-consent-reopen * {
	box-sizing: border-box;
}

.wighz-test-mode {
	position: fixed;
	z-index: 1000000;
	right: 16px;
	top: 46px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-width: min(420px, calc(100vw - 32px));
	padding: 10px 14px;
	border: 1px solid rgba(242, 106, 33, .35);
	border-radius: 12px;
	background: #fff3eb;
	box-shadow: 0 8px 24px rgba(38, 29, 72, .14);
	color: #585858;
	font: 500 12px/1.4 Poppins, system-ui, sans-serif;
}

.wighz-test-mode strong { color: #4d3f93; font-size: 13px; }

.wighz-consent[hidden],
.wighz-consent-reopen[hidden],
.wighz-consent__overview[hidden],
.wighz-consent__preferences[hidden],
.wighz-consent__close[hidden] {
	display: none !important;
}


/* 1.3.0: compacte, niet-modale kaart (desktop) / bottom sheet (mobiel); voorkeuren als modale dialog.
   Huisstijl WerkenindeGHZ: crème #FBF6EE, nachtpaars #17112C. Drie gelijkwaardige knoppen (AP-richtlijn). */
.wighz-consent {
	--c-ink: #17112C;
	--c-ink2: rgba(23, 17, 44, .72);
	--c-paper: #FBF6EE;
	--c-line: rgba(23, 17, 44, .14);
	position: fixed;
	z-index: 999999;
	inset: auto 20px 20px auto;
	width: min(420px, calc(100vw - 40px));
	color: var(--c-ink);
	font: 400 15px/1.5 "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.wighz-consent__backdrop { display: none; }
.wighz-consent__dialog {
	position: relative;
	background: var(--c-paper);
	border: 1px solid var(--c-line);
	border-radius: 20px;
	box-shadow: 0 18px 50px rgba(23, 17, 44, .22), 0 2px 6px rgba(23, 17, 44, .08);
	padding: 20px 22px 16px;
	max-height: calc(100vh - 40px);
	overflow: auto;
	animation: wighz-c-in .28s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes wighz-c-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wighz-consent__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.wighz-consent__brand { display: none; }
.wighz-consent h2 { margin: 0; font-size: 1.12rem; line-height: 1.25; font-weight: 700; color: var(--c-ink); letter-spacing: 0; }
.wighz-consent p { margin: 6px 0 0; color: var(--c-ink2); font-size: .93rem; }
.wighz-consent a { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }
.wighz-consent__eyebrow { display: none; }
.wighz-consent__summary { display: none; }
.wighz-consent__actions,
.wighz-consent__preference-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.wighz-consent__actions .wighz-consent__button--custom { grid-column: 1 / -1; }
.wighz-consent__preference-actions [data-wighz-consent-save] { grid-column: 1 / -1; }
.wighz-consent__button {
	appearance: none;
	min-height: 46px;
	padding: 10px 14px;
	border: 1.5px solid var(--c-ink);
	border-radius: 999px;
	background: var(--c-ink);
	color: var(--c-paper);
	font-size: .95rem; font-weight: 600; line-height: 1.2;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s, color .15s, box-shadow .15s;
}
/* Gelijkwaardig: accepteren en weigeren identiek; Voorkeuren is een even grote, omlijnde knop. */
.wighz-consent__button--custom { background: transparent; color: var(--c-ink); }
.wighz-consent__button:hover { box-shadow: 0 0 0 3px rgba(23, 17, 44, .14); }
.wighz-consent__button:focus-visible,
.wighz-consent__close:focus-visible,
.wighz-consent__back:focus-visible,
.wighz-consent a:focus-visible,
.wighz-consent input:focus-visible + span { outline: 3px solid #6B5BD2; outline-offset: 2px; }
.wighz-consent__close,
.wighz-consent__back {
	appearance: none; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
	border: 0; border-radius: 50%; background: rgba(23, 17, 44, .07); color: var(--c-ink); cursor: pointer;
}
.wighz-consent__close svg,
.wighz-consent__back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.wighz-consent__close { position: absolute; top: 12px; right: 12px; }
.wighz-consent__preferences-heading { display: flex; align-items: center; gap: 10px; padding-right: 44px; }
.wighz-consent__categories { display: grid; gap: 8px; margin-top: 12px; }
.wighz-consent__category {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 14px; background: #fff; cursor: pointer;
}
.wighz-consent__category strong { display: block; font-size: .96rem; }
.wighz-consent__category small { display: block; color: var(--c-ink2); font-size: .84rem; line-height: 1.4; margin-top: 2px; }
.wighz-consent__toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; }
.wighz-consent__toggle input { position: absolute; opacity: 0; width: 46px; height: 28px; margin: 0; cursor: pointer; }
.wighz-consent__toggle input + span { width: 46px; height: 28px; border-radius: 999px; background: rgba(23, 17, 44, .22); position: relative; transition: background .2s; }
.wighz-consent__toggle input + span::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,.25); transition: transform .2s; }
.wighz-consent__toggle input:checked + span { background: var(--c-ink); }
.wighz-consent__toggle input:checked + span::after { transform: translateX(18px); }
.wighz-consent__toggle input:disabled + span { opacity: .55; }
.wighz-consent__toggle em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wighz-consent__footer { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; margin-top: 12px; font-size: .8rem; color: var(--c-ink2); }

/* Voorkeuren: modaal, gecentreerd, met backdrop. */
.wighz-consent.is-prefs { inset: 0; width: auto; display: grid; place-items: center; padding: 20px; }
.wighz-consent.is-prefs .wighz-consent__backdrop { display: block; position: fixed; inset: 0; background: rgba(23, 17, 44, .45); }
.wighz-consent.is-prefs .wighz-consent__dialog { width: min(520px, 100%); padding: 22px 24px 18px; }

/* Mobiel: bottom sheet over de volle breedte, compact (max ±45% hoogte). */
@media (max-width: 680px) {
	.wighz-consent { inset: auto 0 0 0; width: auto; }
	.wighz-consent__dialog { border-radius: 20px 20px 0 0; border-width: 1px 0 0; padding: 16px 18px calc(12px + env(safe-area-inset-bottom)); max-height: 46vh; max-height: 46svh; }
	.wighz-consent h2 { font-size: 1.02rem; }
	.wighz-consent p { font-size: .88rem; margin-top: 4px; }
	.wighz-consent__actions { margin-top: 10px; gap: 6px; }
	.wighz-consent__button { min-height: 44px; padding: 8px 10px; font-size: .9rem; }
	.wighz-consent__footer { margin-top: 8px; }
	.wighz-consent.is-prefs { place-items: end stretch; padding: 0; }
	.wighz-consent.is-prefs .wighz-consent__dialog { width: 100%; max-height: 88svh; }
}

/* Heropen-knop: alleen via footerlink "Cookie-instellingen"; zwevende knop verborgen in deze huisstijl. */
.wighz-consent-reopen { display: none !important; }

@media (prefers-reduced-motion: reduce) {
	.wighz-consent__dialog { animation: none; }
	.wighz-consent *, .wighz-consent-reopen, .wighz-consent-reopen * { transition-duration: .01ms !important; }
}

/* Sticky CTA-balk van het thema (.abar) schuift boven de open kaart/sheet, zodat de CTA zichtbaar blijft. */
html.wighz-consent-card .abar { bottom: calc(var(--wighz-consent-h, 0px) + 8px); }
@media (min-width: 681px) { html.wighz-consent-card .abar { bottom: calc(var(--wighz-consent-h, 0px) + 12px); } }
@keyframes wighz-autofill {
	from { opacity: 0.999; }
	to { opacity: 1; }
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
	animation-name: wighz-autofill;
	animation-duration: 0.01s;
}

