/* RP Core Cookiemelding. Kleuren komen uit --rpck-* (instellingen of de site), lettertype van de site. */
#rpck,
.rpck-reopen,
.rpck-embed {
	--rpck-primary: #3359e0;
	--rpck-on-primary: #fff;
	--rpck-text: #1d2433;
	--rpck-bg: #fff;
	--rpck-radius: 14px;
	--rpck-muted: color-mix(in srgb, var(--rpck-text) 68%, var(--rpck-bg));
	--rpck-line: color-mix(in srgb, var(--rpck-text) 14%, var(--rpck-bg));
	--rpck-soft: color-mix(in srgb, var(--rpck-primary) 8%, var(--rpck-bg));
	--rpck-shadow: 0 18px 50px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .08);
}
#rpck[hidden],
#rpck [hidden],
.rpck-reopen[hidden] { display: none !important; }
#rpck { color: var(--rpck-text); font-family: inherit; font-size: 15px; line-height: 1.55; position: relative; z-index: 2147483000; }
#rpck *,
#rpck *::before,
#rpck *::after { box-sizing: border-box; }
#rpck p { margin: 0 0 .6em; }
#rpck p:last-child { margin-bottom: 0; }

/* Melding */
.rpck-banner {
	background: var(--rpck-bg);
	border: 1px solid var(--rpck-line);
	border-radius: var(--rpck-radius);
	box-shadow: var(--rpck-shadow);
	display: flex;
	flex-direction: column;
	gap: 18px;
	opacity: 0;
	padding: 22px 22px 20px;
	position: fixed;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .3s ease;
}
#rpck.is-visible .rpck-banner { opacity: 1; transform: none; }
.rpck--blok .rpck-banner { bottom: 20px; left: 20px; max-width: calc(100vw - 40px); width: 420px; }
.rpck--balk .rpck-banner { align-items: center; border-radius: var(--rpck-radius) var(--rpck-radius) 0 0; bottom: 0; flex-direction: row; gap: 28px; left: 0; padding: 20px max(24px, calc((100vw - 1240px) / 2)); right: 0; }
.rpck--balk .rpck-banner-body { flex: 1; }
.rpck--balk .rpck-actions { flex: none; }
.rpck--midden .rpck-banner { left: 50%; max-width: calc(100vw - 32px); top: 50%; transform: translate(-50%, calc(-50% + 16px)); width: 520px; }
#rpck.rpck--midden.is-visible .rpck-banner { transform: translate(-50%, -50%); }
#rpck.rpck--midden.is-visible:not(.has-prefs)::before { background: rgba(15, 23, 42, .45); content: ""; inset: 0; position: fixed; }

.rpck-title { color: var(--rpck-text); font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.rpck-text { color: var(--rpck-muted); font-size: 14px; }
.rpck-link { color: var(--rpck-primary) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Knoppen: accepteren en weigeren even groot, zoals de AP vraagt */
.rpck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rpck-btn {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 1.5px solid transparent;
	border-radius: calc(var(--rpck-radius) * .7);
	color: var(--rpck-text);
	cursor: pointer;
	display: inline-flex;
	flex: 1 1 auto;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	justify-content: center;
	line-height: 1.2;
	margin: 0;
	min-height: 44px;
	padding: 10px 16px;
	text-transform: none;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
	white-space: nowrap;
}
.rpck-btn:active { transform: scale(.98); }
.rpck-btn:focus-visible,
.rpck-close:focus-visible,
.rpck-reopen:focus-visible,
.rpck-switch input:focus-visible + .rpck-switch-ui { outline: 3px solid color-mix(in srgb, var(--rpck-primary) 45%, transparent); outline-offset: 2px; }
.rpck-btn--primary { background: var(--rpck-primary); border-color: var(--rpck-primary); color: var(--rpck-on-primary); }
.rpck-btn--primary:hover { background: color-mix(in srgb, var(--rpck-primary) 86%, #000); border-color: color-mix(in srgb, var(--rpck-primary) 86%, #000); color: var(--rpck-on-primary); }
.rpck-btn--line { border-color: var(--rpck-line); }
.rpck-btn--line:hover { background: var(--rpck-soft); border-color: var(--rpck-primary); color: var(--rpck-text); }
.rpck-btn--text { color: var(--rpck-primary); flex: 0 1 auto; padding-left: 8px; padding-right: 8px; text-decoration: underline; text-underline-offset: 3px; }
.rpck-btn--text:hover { background: transparent; color: var(--rpck-primary); text-decoration-thickness: 2px; }
.rpck--blok .rpck-actions .rpck-btn--text,
.rpck--midden .rpck-actions .rpck-btn--text { order: 3; flex-basis: 100%; }

/* Voorkeuren */
.rpck-overlay { background: rgba(15, 23, 42, .5); inset: 0; position: fixed; }
.rpck-prefs {
	background: var(--rpck-bg);
	border-radius: var(--rpck-radius);
	box-shadow: var(--rpck-shadow);
	display: flex;
	flex-direction: column;
	left: 50%;
	max-height: min(720px, calc(100vh - 32px));
	max-width: calc(100vw - 32px);
	outline: 0;
	position: fixed;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 600px;
	animation: rpck-in .25s ease;
}
@keyframes rpck-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); } }
.rpck-prefs-head { align-items: center; border-bottom: 1px solid var(--rpck-line); display: flex; justify-content: space-between; padding: 18px 22px; }
.rpck-close { align-items: center; background: transparent; border: 0; border-radius: 50%; color: var(--rpck-muted); cursor: pointer; display: inline-flex; font-size: 26px; height: 40px; justify-content: center; line-height: 1; padding: 0; width: 40px; }
.rpck-close:hover { background: var(--rpck-soft); color: var(--rpck-text); }
.rpck-prefs-body { overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px; }
.rpck-intro { color: var(--rpck-muted); font-size: 14px; }
.rpck-cat { border: 1px solid var(--rpck-line); border-radius: calc(var(--rpck-radius) * .8); margin-top: 12px; padding: 14px 16px; }
.rpck-cat-head { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.rpck-cat-name { font-size: 15px; font-weight: 700; }
.rpck-cat-desc { color: var(--rpck-muted); font-size: 13.5px; margin-top: 6px !important; }
.rpck-always { background: var(--rpck-soft); border-radius: 999px; color: var(--rpck-primary); font-size: 12px; font-weight: 700; padding: 3px 10px; white-space: nowrap; }
.rpck-details { font-size: 13px; margin-top: 8px; }
.rpck-details summary { color: var(--rpck-primary); cursor: pointer; font-weight: 600; }
.rpck-details ul { list-style: none; margin: 8px 0 0; padding: 0; }
.rpck-details li { border-top: 1px solid var(--rpck-line); display: flex; flex-direction: column; gap: 2px; padding: 7px 0; }
.rpck-details code,
.rpck-list code { background: var(--rpck-soft); border-radius: 5px; color: var(--rpck-text); font-size: 12px; padding: 1px 6px; width: max-content; }
.rpck-details span { color: var(--rpck-muted); }
.rpck-prefs-foot { border-top: 1px solid var(--rpck-line); display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px 18px; }

/* Schakelaar */
.rpck-switch { align-items: center; cursor: pointer; display: inline-flex; gap: 12px; margin: 0; }
.rpck-switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.rpck-switch-ui { background: color-mix(in srgb, var(--rpck-text) 25%, var(--rpck-bg)); border-radius: 999px; flex: none; height: 24px; position: relative; transition: background .2s; width: 42px; }
.rpck-switch-ui::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); content: ""; height: 18px; left: 3px; position: absolute; top: 3px; transition: transform .2s; width: 18px; }
.rpck-switch input:checked + .rpck-switch-ui { background: var(--rpck-primary); }
.rpck-switch input:checked + .rpck-switch-ui::after { transform: translateX(18px); }
.rpck-switch input:disabled + .rpck-switch-ui { opacity: .55; }
.rpck-switch:has(input:disabled) { cursor: default; }

/* Knop om de keuze later aan te passen */
.rpck-reopen {
	align-items: center;
	background: var(--rpck-bg);
	border: 1px solid var(--rpck-line);
	border-radius: 50%;
	bottom: 16px;
	box-shadow: 0 6px 20px rgba(15, 23, 42, .16);
	color: var(--rpck-primary);
	cursor: pointer;
	display: inline-flex;
	height: 46px;
	justify-content: center;
	padding: 0;
	position: fixed;
	transition: transform .15s;
	width: 46px;
	z-index: 2147482000;
}
.rpck-reopen:hover { transform: scale(1.07); }
.rpck-reopen--links { left: 16px; }
.rpck-reopen--rechts { right: 16px; }

/* Ingesloten video's en kaarten */
.rpck-embed { display: block; max-width: 100%; position: relative; }
.rpck-embed iframe { max-width: 100%; }
.rpck-embed:not(.is-loaded) { background: var(--rpck-soft); border-radius: var(--rpck-radius); min-height: 240px; overflow: hidden; }
.rpck-embed:not(.is-loaded) iframe { visibility: hidden; }
.rpck-embed-msg { align-items: center; color: var(--rpck-text); display: flex; flex-direction: column; font-size: 14px; gap: 12px; inset: 0; justify-content: center; padding: 20px; position: absolute; text-align: center; }
.rpck-embed-msg p { margin: 0; max-width: 420px; }
.rpck-embed-msg .rpck-btn { flex: none; }
.rpck-embed.is-loaded .rpck-embed-msg { display: none; }

/* Cookieverklaring */
.rpck-list-scroll { overflow-x: auto; }
.rpck-list table { border-collapse: collapse; font-size: 14px; margin: 0 0 24px; width: 100%; }
.rpck-list th,
.rpck-list td { border-bottom: 1px solid rgba(0, 0, 0, .1); padding: 8px 10px; text-align: left; vertical-align: top; }

html.rpck-lock { overflow: hidden; }

@media (max-width: 782px) {
	.rpck--balk .rpck-banner { align-items: stretch; flex-direction: column; gap: 16px; padding: 18px 16px 16px; }
	.rpck--blok .rpck-banner { bottom: 10px; left: 10px; max-width: none; right: 10px; width: auto; }
	.rpck-actions { flex-direction: column; }
	.rpck-actions .rpck-btn { width: 100%; }
	.rpck-actions .rpck-btn--text { order: 3; }
	.rpck-prefs { border-radius: var(--rpck-radius) var(--rpck-radius) 0 0; bottom: 0; left: 0; max-height: 88vh; max-width: none; top: auto; transform: none; width: 100%; animation: rpck-up .25s ease; }
	@keyframes rpck-up { from { transform: translateY(30px); opacity: 0; } }
	.rpck-prefs-foot { flex-direction: column; }
	.rpck-prefs-foot .rpck-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.rpck-banner,
	.rpck-prefs,
	.rpck-switch-ui,
	.rpck-switch-ui::after { animation: none !important; transition: none !important; }
}
@media print { #rpck, .rpck-reopen { display: none !important; } }
