/* Cookie Consent NL – styles. Colors/radius/font come from CSS variables set in the plugin settings. */
.ccnl {
	--ccnl-muted: var(--ccnl-text);
	--ccnl-line: rgba(0, 0, 0, .14);
	position: fixed;
	inset: 0;
	z-index: 99999;
	font-family: var(--ccnl-font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--ccnl-text);
	pointer-events: none;
}
.ccnl[hidden] { display: none; }
.ccnl__backdrop {
	position: absolute; inset: 0;
	background: rgba(0, 0, 0, .35);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.ccnl--center.is-visible .ccnl__backdrop,
.ccnl.is-visible.is-modal .ccnl__backdrop { opacity: 1; pointer-events: auto; }

.ccnl__banner, .ccnl__modal {
	position: absolute;
	pointer-events: auto;
	background: var(--ccnl-bg);
	color: var(--ccnl-text);
	border-radius: var(--ccnl-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .18), 0 0 0 1px var(--ccnl-line);
	padding: 24px;
	box-sizing: border-box;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .22s ease, transform .22s ease;
}
.ccnl.is-visible .ccnl__banner:not([hidden]),
.ccnl.is-visible .ccnl__modal:not([hidden]) { opacity: 1; transform: none; }
.ccnl__banner[hidden], .ccnl__modal[hidden] { display: none; }

/* Positions */
.ccnl--bottom .ccnl__banner {
	left: 16px; right: 16px; bottom: 16px;
	display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
	max-width: 1120px; margin: 0 auto;
}
.ccnl--bottom .ccnl__body { flex: 1 1 420px; }
.ccnl--bottom-left .ccnl__banner { left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); }
.ccnl--center .ccnl__banner {
	left: 50%; top: 50%;
	transform: translate(-50%, calc(-50% + 16px));
	width: min(520px, calc(100vw - 32px));
}
.ccnl--center.is-visible .ccnl__banner:not([hidden]) { transform: translate(-50%, -50%); }

.ccnl__modal {
	left: 50%; top: 50%;
	transform: translate(-50%, calc(-50% + 16px));
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow: auto;
}
.ccnl.is-visible .ccnl__modal:not([hidden]) { transform: translate(-50%, -50%); }

/* Typography */
.ccnl__title { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.3; color: inherit; }
.ccnl__text { margin: 0; color: var(--ccnl-muted); max-width: 62ch; }
.ccnl__links { margin: 10px 0 0; font-size: 13px; color: var(--ccnl-muted); }
.ccnl__links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ccnl__links a:hover { color: var(--ccnl-text); }

/* Buttons */
.ccnl__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ccnl__modal .ccnl__actions { margin-top: 20px; }
.ccnl__btn {
	appearance: none;
	font: inherit; font-weight: 600; font-size: 14px;
	padding: 11px 18px;
	border-radius: calc(var(--ccnl-radius) * .7);
	border: 1px solid var(--ccnl-line);
	background: transparent;
	color: var(--ccnl-text);
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s ease, border-color .15s ease;
}
.ccnl__btn:hover { background: color-mix(in srgb, var(--ccnl-text) 6%, transparent); }
.ccnl__btn--primary { background: var(--ccnl-primary); color: var(--ccnl-primary-text); border-color: var(--ccnl-primary); }
.ccnl__btn--primary:hover { filter: brightness(1.1); background: var(--ccnl-primary); }
.ccnl__btn--ghost { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding-inline: 8px; }
.ccnl__btn:focus-visible, .ccnl__close:focus-visible, .ccnl__switch input:focus-visible + .ccnl__switch-ui {
	outline: 2px solid var(--ccnl-primary); outline-offset: 2px;
}

/* Modal */
.ccnl__modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.ccnl__close {
	appearance: none; border: 0; background: transparent; color: var(--ccnl-muted);
	font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; margin: -4px -4px 0 0;
}
.ccnl__close:hover { color: var(--ccnl-text); }
.ccnl__cats { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--ccnl-line); }
.ccnl__cat { padding: 14px 0; border-bottom: 1px solid var(--ccnl-line); }
.ccnl__cat-label { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.ccnl__cat-name { font-weight: 600; }
.ccnl__cat-desc { margin: 4px 0 0; font-size: 13px; color: var(--ccnl-muted); max-width: 56ch; }

/* Switch */
.ccnl__switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.ccnl__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ccnl__switch input:disabled { cursor: not-allowed; }
.ccnl__switch-ui {
	position: absolute; inset: 0; border-radius: 999px;
	background: color-mix(in srgb, var(--ccnl-text) 22%, transparent);
	transition: background .15s ease;
}
.ccnl__switch-ui::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
	border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
	transition: transform .15s ease;
}
.ccnl__switch input:checked + .ccnl__switch-ui { background: var(--ccnl-primary); }
.ccnl__switch input:checked + .ccnl__switch-ui::after { transform: translateX(18px); }
.ccnl__switch input:disabled + .ccnl__switch-ui { opacity: .55; }

/* Blocked embeds */
.ccnl-placeholder {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
	aspect-ratio: 16 / 9; width: 100%; padding: 24px; box-sizing: border-box; text-align: center;
	background: color-mix(in srgb, currentColor 6%, transparent);
	border: 1px dashed color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 8px; font-size: 14px;
}
.ccnl-placeholder p { margin: 0; max-width: 40ch; }
.ccnl-placeholder + iframe[data-src] { display: none; }

/* Declaration table */
.ccnl-declaration__table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 14px; }
.ccnl-declaration__table th, .ccnl-declaration__table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.1); vertical-align: top; }

/* Mobile */
@media (max-width: 640px) {
	.ccnl { font-size: 14px; }
	.ccnl__banner, .ccnl__modal { padding: 20px; }
	.ccnl--bottom .ccnl__banner { left: 8px; right: 8px; bottom: 8px; }
	.ccnl__actions { width: 100%; }
	.ccnl__actions .ccnl__btn { flex: 1 1 auto; text-align: center; }
	.ccnl__btn--ghost { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ccnl *, .ccnl { transition: none !important; }
}

@supports (color: color-mix(in srgb, red, blue)) {
	.ccnl {
		--ccnl-muted: color-mix(in srgb, var(--ccnl-text) 65%, transparent);
		--ccnl-line: color-mix(in srgb, var(--ccnl-text) 14%, transparent);
	}
}
