/**
 * LOM Cookiebanner — Lammerts Online Media
 * Kleuren komen uit de instellingen en worden als CSS-variabelen ingeladen.
 */

:root {
	--lom-cc-accent: #34a12e;
	--lom-cc-accent-dark: #2b8827;
	--lom-cc-ink: #3f4d6e;
	--lom-cc-soft: #eaf5e7;
	--lom-cc-surface: #ffffff;
	--lom-cc-radius: 18px;
	--lom-cc-muted: #64708c;
	--lom-cc-line: #e2e7ef;
	--lom-cc-shadow: 0 18px 48px -12px rgba(28, 38, 62, .3), 0 4px 12px -4px rgba(28, 38, 62, .12);
}

/* ---------------------------------------------------------- container */

.lom-cc[hidden] {
	display: none !important;
}

.lom-cc {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 999990;
	font-family: inherit;
	line-height: 1.5;
	color: var(--lom-cc-ink);
	pointer-events: none;
}

.lom-cc__scrim {
	position: fixed;
	inset: 0;
	background: rgba(25, 33, 54, .35);
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: auto;
}

.lom-cc.is-modal .lom-cc__scrim {
	opacity: 1;
}

.lom-cc__scrim[hidden] {
	display: none;
}

.lom-cc__panel {
	position: relative;
	pointer-events: auto;
	width: min(420px, calc(100vw - 32px));
	margin: 0 16px 16px;
	background: var(--lom-cc-surface);
	border-radius: var(--lom-cc-radius);
	box-shadow: var(--lom-cc-shadow);
	overflow: hidden;
	transform: translateY(14px);
	opacity: 0;
	transition: transform .28s cubic-bezier(.2, .8, .3, 1), opacity .28s ease;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.lom-cc.is-visible .lom-cc__panel {
	transform: translateY(0);
	opacity: 1;
}

.lom-cc--left .lom-cc__panel { margin-right: auto; }
.lom-cc--right .lom-cc__panel { margin-left: auto; }
.lom-cc--center .lom-cc__panel { margin-left: auto; margin-right: auto; }
.lom-cc--bar .lom-cc__panel { width: calc(100% - 32px); max-width: 1180px; margin-left: auto; margin-right: auto; }

/* Het groene randje bovenaan: het "ff tikje anders" ten opzichte van nu. */
.lom-cc__accent {
	display: block;
	height: 5px;
	background: var(--lom-cc-accent);
}

.lom-cc__inner {
	padding: 20px 22px 22px;
}

.lom-cc--bar .lom-cc__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 28px;
}

.lom-cc--bar .lom-cc__head,
.lom-cc--bar .lom-cc__text,
.lom-cc--bar .lom-cc__policy {
	flex: 1 1 100%;
	margin-bottom: 0;
}

.lom-cc--bar .lom-cc__head {
	order: 1;
	flex: 0 1 auto;
}

.lom-cc--bar .lom-cc__text {
	order: 2;
	flex: 1 1 240px;
}

.lom-cc--bar .lom-cc__group {
	order: 3;
	flex: 0 1 auto;
	min-width: 300px;
}

.lom-cc--bar .lom-cc__policy {
	order: 4;
	flex: 1 1 100%;
	margin-top: 4px;
}

.lom-cc--bar .lom-cc__prefs {
	order: 5;
	flex: 1 1 100%;
	margin-top: 8px;
}

/* ---------------------------------------------------------- kop */

.lom-cc__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.lom-cc__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border-radius: 50%;
	background: var(--lom-cc-soft);
	color: var(--lom-cc-accent-dark);
}

.lom-cc__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--lom-cc-ink);
	font-family: inherit;
}

.lom-cc__text {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--lom-cc-muted);
}

.lom-cc__policy {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 16px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--lom-cc-accent-dark);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .15s ease;
}

.lom-cc__policy:hover,
.lom-cc__policy:focus-visible {
	border-bottom-color: currentColor;
	color: var(--lom-cc-accent-dark);
}

/* ---------------------------------------------------------- knoppen */

.lom-cc__group[hidden] {
	display: none;
}

.lom-cc__actions {
	display: flex;
	gap: 8px;
}

.lom-cc__actions + .lom-cc__actions {
	margin-top: 8px;
}

.lom-cc__actions[hidden] {
	display: none;
}

.lom-cc__more {
	margin: 12px 0 0;
	text-align: center;
}

.lom-cc-link--prefs {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--lom-cc-muted);
	text-decoration-color: rgba(100, 112, 140, .5);
	padding: 6px 4px;
}

.lom-cc-link--prefs:hover {
	color: var(--lom-cc-ink);
	text-decoration-color: currentColor;
}

.lom-cc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	/* Gelijke breedte: weigeren mag niet kleiner ogen dan toestaan. */
	flex: 1 1 0;
	min-width: 0;
	min-height: 44px;
	padding: 10px 16px;
	margin: 0;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-align: center;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
	-webkit-appearance: none;
	appearance: none;
}

.lom-cc-btn:active {
	transform: translateY(1px);
}

.lom-cc-btn--full {
	flex: 1 1 100%;
}

/* Het paneel krijgt focus bij openen; daar hoort geen rand omheen. */
.lom-cc__panel:focus {
	outline: none;
}

.lom-cc-btn--accept {
	background: var(--lom-cc-accent);
	border-color: var(--lom-cc-accent);
	color: #fff;
}

.lom-cc-btn--accept:hover {
	background: var(--lom-cc-accent-dark);
	border-color: var(--lom-cc-accent-dark);
	color: #fff;
}

.lom-cc-btn--soft {
	background: var(--lom-cc-soft);
	border-color: var(--lom-cc-soft);
	color: var(--lom-cc-accent-dark);
}

.lom-cc-btn--soft:hover {
	background: #dcedd7;
	border-color: #dcedd7;
	color: var(--lom-cc-accent-dark);
}

.lom-cc-btn--ghost {
	background: #fff;
	border-color: var(--lom-cc-line);
	color: var(--lom-cc-muted);
}

.lom-cc-btn--ghost:hover {
	background: #f6f8fb;
	border-color: #cfd7e4;
	color: var(--lom-cc-ink);
}

.lom-cc-icon {
	flex: 0 0 auto;
}

.lom-cc-btn:focus-visible,
.lom-cc__policy:focus-visible,
.lom-cc-link:focus-visible,
.lom-cc-reopen:focus-visible,
.lom-cc__switch input:focus-visible + .lom-cc__track {
	outline: 3px solid var(--lom-cc-ink);
	outline-offset: 2px;
}

.lom-cc-link {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--lom-cc-accent-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.lom-cc-link--inline {
	font-size: inherit;
}

/* ---------------------------------------------------------- voorkeuren */

.lom-cc__prefs {
	margin: 0 0 16px;
	padding: 14px 16px 4px;
	border: 1px solid var(--lom-cc-line);
	border-radius: 14px;
	background: #fbfcfe;
}

.lom-cc__prefs[hidden] {
	display: none;
}

.lom-cc__cat + .lom-cc__cat {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--lom-cc-line);
}

.lom-cc__cat:last-child {
	padding-bottom: 12px;
}

.lom-cc__switch {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	color: var(--lom-cc-ink);
}

.lom-cc__switch.is-locked {
	cursor: default;
}

.lom-cc__switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	margin: 0;
	pointer-events: none;
}

.lom-cc__track {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex: 0 0 40px;
	border-radius: 999px;
	background: #c8d1de;
	transition: background-color .18s ease;
}

.lom-cc__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .18s cubic-bezier(.2, .8, .3, 1);
}

.lom-cc__switch input:checked + .lom-cc__track {
	background: var(--lom-cc-accent);
}

.lom-cc__switch input:checked + .lom-cc__track .lom-cc__knob {
	transform: translateX(18px);
}

.lom-cc__switch.is-locked .lom-cc__track {
	background: #aebbcd;
}

.lom-cc__cat-label em {
	font-style: normal;
	font-weight: 500;
	font-size: 12.5px;
	color: var(--lom-cc-muted);
}

.lom-cc__cat-desc {
	margin: 6px 0 0 50px;
	font-size: 13px;
	color: var(--lom-cc-muted);
}

/* ---------------------------------------------------------- cookie-overzicht */

.lom-cc__details {
	margin: 8px 0 0 50px;
	font-size: 13px;
}

.lom-cc__details > summary {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 0;
	list-style: none;
	cursor: pointer;
	font-weight: 600;
	color: var(--lom-cc-accent-dark);
}

.lom-cc__details > summary::-webkit-details-marker {
	display: none;
}

.lom-cc__details > summary:focus-visible {
	outline: 3px solid var(--lom-cc-ink);
	outline-offset: 2px;
	border-radius: 4px;
}

.lom-cc__details-arrow {
	width: 0;
	height: 0;
	border-left: 5px solid currentColor;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	transition: transform .15s ease;
}

.lom-cc__details[open] .lom-cc__details-arrow {
	transform: rotate(90deg);
}

.lom-cc__cookies {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--lom-cc-line);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.lom-cc__cookie {
	padding: 9px 12px;
	font-size: 12.5px;
}

.lom-cc__cookie + .lom-cc__cookie {
	border-top: 1px solid var(--lom-cc-line);
}

.lom-cc__cookie p {
	margin: 0;
}

.lom-cc__cookie-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 3px !important;
}

.lom-cc__cookie-head code {
	font-size: 12px;
	color: var(--lom-cc-ink);
	background: var(--lom-cc-soft);
	padding: 2px 7px;
	border-radius: 5px;
	word-break: break-all;
}

.lom-cc__cookie-partij {
	font-weight: 600;
	color: var(--lom-cc-ink);
}

/* Voor wat geen cookie is maar wel op het apparaat wordt opgeslagen. */
.lom-cc__cookie-soort {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--lom-cc-muted);
	background: #eef1f6;
	border-radius: 4px;
	padding: 2px 6px;
}

.lom-cc__cookie-doel {
	color: var(--lom-cc-muted);
	margin-bottom: 3px !important;
}

.lom-cc__cookie-termijn {
	color: var(--lom-cc-muted);
	font-size: 12px;
}

.lom-cc__cookie-termijn strong {
	color: var(--lom-cc-ink);
	font-weight: 600;
}

/* ---------------------------------------------------------- terugkeerknop */

.lom-cc-reopen {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999980;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 16px 10px 13px;
	border: 1px solid var(--lom-cc-line);
	border-radius: 999px;
	background: var(--lom-cc-surface);
	color: var(--lom-cc-ink);
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 22px -8px rgba(28, 38, 62, .35);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .25s ease, transform .25s ease, background-color .15s ease;
}

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

.lom-cc-reopen.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.lom-cc-reopen:hover {
	background: var(--lom-cc-soft);
	color: var(--lom-cc-accent-dark);
}

.lom-cc-reopen .lom-cc-icon {
	width: 20px;
	height: 20px;
	color: var(--lom-cc-accent-dark);
}

/* ---------------------------------------------------------- embeds */

.lom-cc-embed {
	position: relative;
	display: block;
	height: 100%; /* neemt de hoogte van de ouder over, bv. het Bricks Map-element */
	min-height: 200px;
	border-radius: 14px;
	overflow: hidden;
	background: var(--lom-cc-soft);
}

.lom-cc-embed > iframe {
	display: block;
	width: 100%;
}

/* iframes met height="100%" (Bricks Map zonder API-sleutel) vullen de placeholder. */
.lom-cc-embed > iframe[height="100%"] {
	height: 100%;
}

.lom-cc-embed.is-allowed {
	background: transparent;
}

.lom-cc-embed__veil {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 22px;
	text-align: center;
	background: var(--lom-cc-soft);
	color: var(--lom-cc-ink);
}

.lom-cc-embed.is-allowed .lom-cc-embed__veil {
	display: none;
}

.lom-cc-embed__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #fff;
	color: var(--lom-cc-accent-dark);
	margin-bottom: 4px;
}

.lom-cc-embed__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.lom-cc-embed__text {
	margin: 0 0 10px;
	font-size: 13.5px;
	max-width: 46ch;
	color: var(--lom-cc-muted);
}

.lom-cc-embed__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.lom-cc-embed__actions .lom-cc-btn {
	flex: 0 0 auto;
}

/* ---------------------------------------------------------- mobiel */

@media (max-width: 640px) {
	.lom-cc__panel {
		width: auto;
		margin: 0 8px 8px;
		border-radius: calc(var(--lom-cc-radius) + 2px);
		max-height: calc(100vh - 16px);
	}

	.lom-cc--bar .lom-cc__panel {
		width: auto;
	}

	.lom-cc__inner {
		padding: 16px 16px 18px;
	}

	.lom-cc--bar .lom-cc__inner {
		display: block;
	}

	.lom-cc__title {
		font-size: 16.5px;
	}

	.lom-cc__text {
		font-size: 13.5px;
	}

	/* Twee even brede knoppen naast elkaar, lekker groot aan te tikken. */
	.lom-cc__actions .lom-cc-btn {
		min-height: 46px;
		padding-left: 10px;
		padding-right: 10px;
	}

	.lom-cc__cat-desc,
	.lom-cc__details {
		margin-left: 0;
	}

	/* Minimaal op mobiel: alleen het icoontje. */
	.lom-cc-reopen {
		left: 10px;
		bottom: 10px;
		width: 42px;
		height: 42px;
		min-height: 42px;
		padding: 0;
		justify-content: center;
		border-radius: 50%;
	}

	.lom-cc-reopen__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lom-cc__panel,
	.lom-cc__scrim,
	.lom-cc-reopen,
	.lom-cc__knob,
	.lom-cc-btn {
		transition: none !important;
	}
}
