/**
 * Offertebuilder — cookiebanner styling.
 * Bewust onafhankelijk van Tailwind zodat de banner altijd werkt, ook als
 * de gebruiker CSS purge aanpast of de Tailwind-build niet opnieuw draait.
 */

/* Banner-variant: vaste positie onderaan, geen backdrop. Positie en
   entrance-animatie zijn gesplitst — de wrapper centreert, de card animeert. */
.ob-cookie {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 1rem;
	z-index: 9999;
	display: flex;
	justify-content: center;
	padding: 0 1rem;
	pointer-events: none;
	font-family: 'Figtree', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #0f172a;
}

/* Voorkeuren-modaal: full-screen overlay met blur. Eigen fade-in animatie. */
.ob-cookie--prefs {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	pointer-events: auto;
	animation: ob-cookie-fade 220ms ease-out both;
}

.ob-cookie__card {
	pointer-events: auto;
	width: 100%;
	max-width: 56rem;
	background: #ffffff;
	border-radius: 1rem;
	box-shadow: 0 24px 56px -16px rgba(15, 23, 42, 0.25), 0 4px 12px rgba(15, 23, 42, 0.08);
	padding: 1.5rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
	transform-origin: bottom center;
	animation: ob-cookie-slide 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ob-cookie--prefs .ob-cookie__card {
	max-width: 36rem;
	max-height: 85vh;
	overflow-y: auto;
	transform-origin: center;
	animation: ob-cookie-pop 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ob-cookie-slide {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes ob-cookie-pop {
	from { opacity: 0; transform: translateY(6px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ob-cookie-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.ob-cookie__card,
	.ob-cookie--prefs,
	.ob-cookie--prefs .ob-cookie__card {
		animation: none !important;
	}
}

.ob-cookie__title {
	font-family: 'Poppins', 'Figtree', sans-serif;
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	color: #0f172a;
}

.ob-cookie__text {
	font-size: 0.875rem;
	line-height: 1.55;
	color: #475569;
	margin: 0 0 1rem 0;
}

.ob-cookie__link {
	color: #2563eb;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.ob-cookie__link:hover { color: #1d4ed8; }

.ob-cookie__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
}

.ob-cookie__btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 9999px;
	padding: 0.625rem 1.125rem;
	font-size: 0.875rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
	min-height: 40px;
}

.ob-cookie__btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.ob-cookie__btn--primary {
	background: #2563eb;
	color: #ffffff;
}
.ob-cookie__btn--primary:hover { background: #1d4ed8; }

/* AVG: reject moet visueel even prominent zijn als accept */
.ob-cookie__btn--secondary {
	background: #0f172a;
	color: #ffffff;
}
.ob-cookie__btn--secondary:hover { background: #1e293b; }

.ob-cookie__btn--ghost {
	background: transparent;
	color: #475569;
	border-color: #e2e8f0;
}
.ob-cookie__btn--ghost:hover {
	background: #f8fafc;
	color: #0f172a;
}

/* Preferences */
.ob-cookie__cats {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0 0 1.25rem 0;
}

.ob-cookie__cat {
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	padding: 1rem;
	background: #f8fafc;
}

.ob-cookie__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.375rem;
}

.ob-cookie__cat-title {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0;
	color: #0f172a;
}

.ob-cookie__cat-desc {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #475569;
	margin: 0;
}

/* Toggle */
.ob-cookie__toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}
.ob-cookie__toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}
.ob-cookie__slider {
	position: absolute;
	inset: 0;
	background: #cbd5e1;
	border-radius: 9999px;
	transition: background 180ms ease;
	cursor: pointer;
}
.ob-cookie__slider::before {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform 180ms ease;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}
.ob-cookie__toggle input:checked + .ob-cookie__slider {
	background: #2563eb;
}
.ob-cookie__toggle input:checked + .ob-cookie__slider::before {
	transform: translateX(20px);
}
.ob-cookie__toggle input:disabled + .ob-cookie__slider {
	background: #94a3b8;
	cursor: not-allowed;
	opacity: 0.7;
}
.ob-cookie__toggle input:focus-visible + .ob-cookie__slider {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

@media (max-width: 640px) {
	.ob-cookie__card { padding: 1.25rem; border-radius: 0.875rem; }
	.ob-cookie__actions { justify-content: stretch; }
	.ob-cookie__btn { flex: 1 1 auto; }
}
