/**
 * Statikz Cookie Consent — frontend styling
 * Kleuren komen via CSS-variabelen uit de backend-instellingen.
 */

.scc-root {
	--scc-accent: #2563eb;
	--scc-bg: #ffffff;
	--scc-text: #1a1a1a;
	--scc-radius: 12px;
	--scc-muted: rgba(0, 0, 0, .06);
	--scc-border: rgba(0, 0, 0, .1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--scc-text);
}

.scc-root[hidden] {
	display: none;
}

.scc-root.scc-theme-dark {
	--scc-bg: #1c1f26;
	--scc-text: #f3f4f6;
	--scc-muted: rgba(255, 255, 255, .08);
	--scc-border: rgba(255, 255, 255, .14);
}

/* ---------- Banner ---------- */
.scc-banner {
	position: fixed;
	z-index: 999999;
	background: var(--scc-bg);
	color: var(--scc-text);
	box-shadow: 0 6px 30px rgba(0, 0, 0, .18);
	border: 1px solid var(--scc-border);
	border-radius: var(--scc-radius);
	padding: 22px 24px;
	box-sizing: border-box;
}

.scc-banner[hidden] { display: none; }
.scc-banner__content { margin-bottom: 16px; }
.scc-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.scc-body { margin: 0; font-size: 14px; opacity: .9; }
.scc-link { color: var(--scc-accent); text-decoration: underline; margin-left: 4px; }

.scc-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

/* Posities */
.scc-pos-bottom .scc-banner { left: 20px; right: 20px; bottom: 20px; max-width: 1100px; margin: 0 auto; }
.scc-pos-bottom-left .scc-banner { left: 20px; bottom: 20px; max-width: 420px; }
.scc-pos-bottom-right .scc-banner { right: 20px; bottom: 20px; max-width: 420px; }
.scc-pos-center .scc-banner {
	left: 50%; top: 50%; transform: translate(-50%, -50%);
	max-width: 480px; width: calc(100% - 40px);
}
.scc-pos-center::before {
	content: ""; position: fixed; inset: 0; z-index: 999998;
	background: rgba(0, 0, 0, .5);
}

/* Bar-layout: alles op één rij waar mogelijk */
.scc-layout-bar.scc-pos-bottom .scc-banner {
	display: flex; align-items: center; gap: 20px;
	max-width: none; left: 0; right: 0; bottom: 0; border-radius: 0;
}
.scc-layout-bar.scc-pos-bottom .scc-banner__content { margin-bottom: 0; flex: 1; }

/* ---------- Knoppen ---------- */
/* Reset zodat thema-/Elementor-stijlen (randen, schaduw, hoofdletters,
   min-hoogte, volle breedte) onze knoppen niet overschrijven. */
#scc-root button,
#scc-root .scc-btn {
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	text-shadow: none !important;
	min-height: 0 !important;
	width: auto !important;
	max-width: none !important;
	margin: 0;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}

#scc-root .scc-btn {
	display: inline-block !important;
	border: 1px solid transparent !important;
	border-radius: calc(var(--scc-radius) * .6) !important;
	padding: 10px 18px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	cursor: pointer;
	transition: opacity .15s, background .15s;
}
#scc-root .scc-btn:hover { opacity: .88; }
#scc-root .scc-btn--primary { background: var(--scc-accent) !important; color: #fff !important; border-color: var(--scc-accent) !important; }
#scc-root .scc-btn--secondary { background: var(--scc-muted) !important; color: var(--scc-text) !important; border-color: transparent !important; }
#scc-root .scc-btn--ghost { background: transparent !important; color: var(--scc-text) !important; border-color: var(--scc-border) !important; }

#scc-root .scc-close {
	position: absolute; top: 10px; right: 12px;
	background: none !important; border: 0 !important; padding: 0 !important;
	font-size: 24px; line-height: 1;
	cursor: pointer; color: var(--scc-text); opacity: .6;
}
#scc-root .scc-close:hover { opacity: 1; }

/* ---------- Modal ---------- */
.scc-modal { position: fixed; inset: 0; z-index: 1000000; }
.scc-modal[hidden] { display: none; }
.scc-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.scc-modal__dialog {
	position: relative; z-index: 1;
	background: var(--scc-bg); color: var(--scc-text);
	width: min(560px, calc(100% - 40px));
	max-height: 85vh; overflow: auto;
	margin: 7vh auto 0;
	border-radius: var(--scc-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.scc-modal__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px 24px; border-bottom: 1px solid var(--scc-border);
}
.scc-modal__head .scc-title { margin: 0; }
.scc-modal__body { padding: 8px 24px 16px; }
.scc-modal__foot {
	display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end;
	padding: 16px 24px; border-top: 1px solid var(--scc-border);
}
#scc-root .scc-modal__head .scc-close { position: static; }

/* ---------- Categorie-rij ---------- */
.scc-cat { padding: 16px 0; border-bottom: 1px solid var(--scc-border); }
.scc-cat:last-child { border-bottom: 0; }
.scc-cat__head { display: flex; align-items: center; gap: 12px; }
.scc-cat__label { font-weight: 600; }
.scc-cat__badge { font-style: normal; font-size: 12px; opacity: .6; margin-left: 6px; font-weight: 400; }
.scc-cat__desc { margin: 8px 0 0 56px; font-size: 13px; opacity: .8; }

/* Toggle-switch */
.scc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.scc-switch input { opacity: 0; width: 0; height: 0; }
.scc-switch__slider {
	position: absolute; inset: 0; cursor: pointer;
	background: #cbd5e1; border-radius: 999px; transition: .2s;
}
.scc-switch__slider::before {
	content: ""; position: absolute; height: 18px; width: 18px;
	left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s;
}
.scc-switch input:checked + .scc-switch__slider { background: var(--scc-accent); }
.scc-switch input:checked + .scc-switch__slider::before { transform: translateX(20px); }
.scc-switch input:disabled + .scc-switch__slider { opacity: .65; cursor: not-allowed; }

/* ---------- Heropen-widget ---------- */
#scc-root .scc-reopen {
	position: fixed !important;
	left: 18px; bottom: 18px; z-index: 999997;
	width: 46px !important; height: 46px !important; min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important; border-radius: 50% !important;
	background: var(--scc-accent) !important; color: #fff !important;
	cursor: pointer;
	display: flex !important; align-items: center; justify-content: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .25) !important;
}
#scc-root .scc-reopen[hidden] { display: none !important; }
#scc-root .scc-reopen:hover { opacity: .9; }
#scc-root .scc-reopen svg { width: 22px; height: 22px; }

/* ---------- Mobiel ---------- */
@media (max-width: 600px) {
	.scc-pos-bottom .scc-banner,
	.scc-pos-bottom-left .scc-banner,
	.scc-pos-bottom-right .scc-banner {
		left: 10px; right: 10px; bottom: 10px; max-width: none;
	}
	.scc-banner__actions .scc-btn { flex: 1 1 auto; text-align: center; }
	.scc-layout-bar.scc-pos-bottom .scc-banner { display: block; }
	.scc-layout-bar.scc-pos-bottom .scc-banner__content { margin-bottom: 16px; }
}
