/* Cookie consent banner (inc/cookies.php, js/cookies.js). Own colors: works on every page design. */

.bv-cc {
	--cc-ink: #16161a;
	--cc-text: #3a3a40;
	--cc-muted: #6e6e76;
	--cc-line: #e4e2dc;
	--cc-blue: #0066d6;
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 1000;
	display: flex;
	justify-content: center;
	pointer-events: none;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

.bv-cc-box {
	pointer-events: auto;
	box-sizing: border-box;
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 20px 22px;
	background: #fff;
	color: var(--cc-text);
	border: 1px solid var(--cc-line);
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(22, 22, 26, 0.18);
	animation: bv-cc-in .3s ease;
}

@keyframes bv-cc-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.bv-cc-box { animation: none; }
}

.bv-cc-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: var(--cc-ink);
}

.bv-cc-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.bv-cc a {
	color: var(--cc-blue);
	text-decoration: underline;
}

.bv-cc-prefs {
	margin-top: 14px;
	border-top: 1px solid var(--cc-line);
}

.bv-cc-prefs[hidden] {
	display: none;
}

.bv-cc-cat {
	padding: 12px 0;
	border-bottom: 1px solid var(--cc-line);
}

.bv-cc-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cc-ink);
	cursor: pointer;
}

.bv-cc-cat p {
	margin: 4px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--cc-muted);
}

.bv-cc-always {
	font-size: 12px;
	font-weight: 500;
	color: var(--cc-muted);
}

/* Switch */
.bv-cc-switch {
	appearance: none;
	-webkit-appearance: none;
	flex-shrink: 0;
	position: relative;
	width: 40px;
	height: 24px;
	margin: 0;
	border-radius: 999px;
	background: #c9c7c1;
	cursor: pointer;
	transition: background .2s;
}

.bv-cc-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s;
}

.bv-cc-switch:checked {
	background: var(--cc-blue);
}

.bv-cc-switch:checked::after {
	transform: translateX(16px);
}

.bv-cc-switch:focus-visible,
.bv-cc-btn:focus-visible {
	outline: 2px solid var(--cc-blue);
	outline-offset: 2px;
}

/* Buttons: "only necessary" and "accept all" look the same (no nudging, UODO/EDPB) */
.bv-cc-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}

.bv-cc-btn {
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--cc-ink);
	border-radius: 999px;
	background: var(--cc-ink);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .2s;
}

.bv-cc-btn:hover {
	opacity: .85;
}

.bv-cc-btn[hidden] {
	display: none;
}

.bv-cc-btn-ghost {
	background: transparent;
	color: var(--cc-ink);
	border-color: var(--cc-line);
}

/* Only necessary cookies: one line of text and one button on the right */
@media (min-width: 601px) {
	.bv-cc-min {
		display: grid;
		grid-template-columns: 1fr auto;
		column-gap: 20px;
		align-items: center;
	}

	.bv-cc-min .bv-cc-title,
	.bv-cc-min .bv-cc-text {
		grid-column: 1;
	}

	.bv-cc-min .bv-cc-actions {
		grid-column: 2;
		grid-row: 1 / span 2;
		margin-top: 0;
	}
}

@media (max-width: 600px) {
	.bv-cc {
		left: 10px;
		right: 10px;
		bottom: 10px;
	}

	.bv-cc-box {
		padding: 16px;
	}

	.bv-cc-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.bv-cc-actions .bv-cc-btn-ghost {
		grid-column: 1 / -1;
		order: 3;
	}

	.bv-cc-actions-min {
		grid-template-columns: 1fr;
	}

	.bv-cc-btn {
		padding: 0 10px;
	}

	/* The mobile sticky CTA waits until the banner is answered */
	.bv-cc-open .lp-sticky {
		visibility: hidden;
	}
}
