/* Swop Consent — voorkant. Neemt lettertype en accentkleur van het thema over; beide knoppen gelijkwaardig. */

.swcs {
	--swcs-accent: var(--wp--preset--color--accent, #1f2937);
	--swcs-text: #14212e;
	--swcs-muted: #5b6b7b;
	--swcs-bg: #fff;
	--swcs-line: #e3e8ee;
	--swcs-radius: 14px;
	position: fixed;
	inset: auto 0 0 0;
	z-index: 99999;
	pointer-events: none;
	font: inherit;
	color: var(--swcs-text);
}

.swcs[hidden],
.swcs [hidden] {
	display: none !important;
}

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

.swcs__backdrop {
	display: none;
}

.swcs__box {
	pointer-events: auto;
	background: var(--swcs-bg);
	border: 1px solid var(--swcs-line);
	border-radius: var(--swcs-radius);
	box-shadow: 0 18px 50px rgba(15, 32, 51, 0.18);
	padding: 22px;
	outline: none;
	animation: swcs-in 0.25s ease-out;
}

@keyframes swcs-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.swcs__box {
		animation: none;
	}
}

/* Kaart linksonder (standaard). */
.swcs--card {
	inset: auto auto 20px 20px;
	width: min(420px, calc(100vw - 32px));
}

/* Balk over de volle breedte. */
.swcs--bar .swcs__box {
	border-radius: 0;
	border-width: 1px 0 0;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px 32px;
	align-items: center;
	padding: 18px max(20px, calc((100vw - 1200px) / 2));
}

.swcs--bar.has-prefs .swcs__box {
	grid-template-columns: 1fr;
}

/* Midden in beeld, met verduistering. */
.swcs--modal {
	inset: 0;
	display: grid;
	place-items: center;
	padding: 16px;
}

.swcs--modal .swcs__backdrop {
	display: block;
	position: absolute;
	inset: 0;
	background: rgba(11, 24, 38, 0.45);
	pointer-events: auto;
}

.swcs--modal .swcs__box {
	position: relative;
	width: min(520px, 100%);
}

.swcs__title {
	margin: 0 0 6px;
	font-size: 1.05rem;
	line-height: 1.3;
	font-weight: 700;
	color: var(--swcs-text);
}

.swcs__text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--swcs-muted);
}

.swcs__policy {
	color: var(--swcs-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

.swcs__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}

.swcs--bar .swcs__actions {
	margin-top: 0;
	justify-content: flex-end;
}

.swcs--bar.has-prefs .swcs__actions {
	justify-content: flex-start;
}

/* Beide keuzeknoppen bewust gelijk: zelfde vorm, kleur en gewicht. */
.swcs__btn {
	flex: 1 1 0;
	min-width: 140px;
	min-height: 44px;
	padding: 10px 16px;
	border: 2px solid var(--swcs-accent);
	border-radius: 999px;
	background: var(--swcs-accent);
	color: #fff;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.swcs__btn:hover {
	filter: brightness(1.08);
}

.swcs--bar .swcs__btn {
	flex: 0 0 auto;
}

.swcs__link {
	flex-basis: 100%;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--swcs-text);
	font: inherit;
	font-size: 0.85rem;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	text-align: center;
}

.swcs--bar .swcs__link {
	flex-basis: auto;
}

.swcs__btn:focus-visible,
.swcs__link:focus-visible,
.swcs__toggle:focus-visible + .swcs__switch,
.swcs-reopen:focus-visible {
	outline: 3px solid var(--swcs-accent);
	outline-offset: 2px;
}

/* Keuzescherm per categorie. */
.swcs__prefs {
	margin-top: 14px;
	border-top: 1px solid var(--swcs-line);
	max-height: min(46vh, 360px);
	overflow-y: auto;
}

.swcs__cat {
	padding: 12px 0;
	border-bottom: 1px solid var(--swcs-line);
}

.swcs__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
}

.swcs__cat-label {
	font-weight: 600;
	font-size: 0.92rem;
}

.swcs__cat-desc {
	margin: 4px 0 0;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--swcs-muted);
}

.swcs__toggle {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.swcs__switch {
	position: relative;
	flex: 0 0 auto;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: #cfd7e0;
	transition: background 0.15s ease;
}

.swcs__switch span {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease;
}

.swcs__toggle:checked + .swcs__switch,
.swcs__switch.is-locked {
	background: var(--swcs-accent);
}

.swcs__toggle:checked + .swcs__switch span,
.swcs__switch.is-locked span {
	transform: translateX(18px);
}

.swcs__switch.is-locked {
	opacity: 0.55;
}

/* Klein knopje om de keuze later te wijzigen. */
.swcs-reopen {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99998;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid #e3e8ee;
	border-radius: 50%;
	background: #fff;
	color: #14212e;
	box-shadow: 0 6px 18px rgba(15, 32, 51, 0.15);
	cursor: pointer;
}

.swcs-reopen[hidden] {
	display: none;
}

@media (max-width: 600px) {
	.swcs--card {
		inset: auto 8px 8px 8px;
		width: auto;
	}

	.swcs__box {
		padding: 18px;
	}

	/* Op smalle schermen onder elkaar, zodat beide knoppen even groot blijven. */
	.swcs__btn {
		flex: 1 1 100%;
		white-space: nowrap;
	}

	.swcs--bar .swcs__box {
		grid-template-columns: 1fr;
		padding: 16px;
	}

	.swcs--bar .swcs__actions {
		justify-content: stretch;
	}

	.swcs--bar .swcs__btn {
		flex: 1 1 0;
	}
}

@media print {
	.swcs,
	.swcs-reopen {
		display: none !important;
	}
}
