/*
 * Cookie consent — jonasvillwock.com
 * Source file. Copied to public/assets/consent/ by scripts/apply-cookie-consent.py.
 */

.jv-consent {
	--jv-accent: #0055ff;
	--jv-text: #1a1a1a;
	--jv-muted: #5a5f6a;
	--jv-border: #e2e5ea;
	--jv-bg: #ffffff;
	--jv-radius: 10px;

	position: fixed;
	z-index: 2147483000;
	left: 20px;
	bottom: 20px;
	width: calc(100vw - 40px);
	max-width: 420px;
	box-sizing: border-box;
	padding: 22px 22px 18px;
	background: var(--jv-bg);
	color: var(--jv-text);
	border: 1px solid var(--jv-border);
	border-radius: var(--jv-radius);
	box-shadow: 0 8px 34px rgba(16, 24, 40, .16);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.55;
}

.jv-consent[hidden] { display: none; }

.jv-consent *,
.jv-consent *::before,
.jv-consent *::after { box-sizing: border-box; }

.jv-consent__title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--jv-text);
}

.jv-consent__text {
	margin: 0 0 16px;
	color: var(--jv-muted);
}

.jv-consent__text a {
	color: var(--jv-accent);
	text-decoration: underline;
}

/* --- buttons ---------------------------------------------------------
 * Accept and Decline are deliberately the same size, weight and shape.
 * Under GDPR, refusing must be no harder than consenting, so the decline
 * button must not be visually demoted to a faint link.
 * ------------------------------------------------------------------ */

.jv-consent__actions {
	display: flex;
	gap: 10px;
	margin-bottom: 14px;
}

.jv-consent__btn {
	flex: 1 1 0;
	padding: 11px 16px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	border-radius: 7px;
	border: 1.5px solid var(--jv-accent);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.jv-consent__btn--accept {
	background: var(--jv-accent);
	color: #fff;
}

.jv-consent__btn--accept:hover { background: #0044cc; border-color: #0044cc; }

.jv-consent__btn--decline {
	background: transparent;
	color: var(--jv-accent);
}

.jv-consent__btn--decline:hover { background: rgba(0, 85, 255, .07); }

.jv-consent__btn:focus-visible,
.jv-consent__link:focus-visible,
.jv-consent__toggle input:focus-visible {
	outline: 2px solid var(--jv-accent);
	outline-offset: 2px;
}

/* --- footer links --------------------------------------------------- */

.jv-consent__links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	font-size: 13px;
}

.jv-consent__link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: var(--jv-muted);
	text-decoration: underline;
	cursor: pointer;
}

.jv-consent__link:hover { color: var(--jv-text); }

/* --- settings panel ------------------------------------------------- */

.jv-consent__settings {
	margin: 0 0 16px;
	border-top: 1px solid var(--jv-border);
	padding-top: 14px;
}

.jv-consent__settings[hidden] { display: none; }

.jv-consent__cat + .jv-consent__cat {
	margin-top: 12px;
	border-top: 1px solid var(--jv-border);
	padding-top: 12px;
}

.jv-consent__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.jv-consent__cat-name {
	font-weight: 600;
	font-size: 14px;
}

.jv-consent__cat-desc {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--jv-muted);
}

.jv-consent__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	font-size: 13px;
	color: var(--jv-muted);
	cursor: pointer;
}

.jv-consent__toggle--locked { cursor: default; opacity: .65; }

.jv-consent__toggle input { width: 16px; height: 16px; accent-color: var(--jv-accent); margin: 0; }

/* --- reopen button (consent withdrawal) ------------------------------ */

.jv-consent-reopen {
	position: fixed;
	z-index: 2147482000;
	left: 20px;
	bottom: 20px;
	padding: 8px 13px;
	background: var(--jv-bg, #fff);
	color: #5a5f6a;
	border: 1px solid #e2e5ea;
	border-radius: 20px;
	box-shadow: 0 3px 12px rgba(16, 24, 40, .13);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

.jv-consent-reopen:hover { color: #1a1a1a; }
.jv-consent-reopen[hidden] { display: none; }

/* --- blocked embed placeholder --------------------------------------- */

.jv-embed-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 180px;
	padding: 28px 22px;
	background: #f6f7f9;
	border: 1px dashed #ccd2dc;
	border-radius: var(--jv-radius, 10px);
	text-align: center;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	color: #5a5f6a;
}

.jv-embed-block__text { margin: 0; max-width: 46ch; }

.jv-embed-block__btn {
	padding: 10px 18px;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: #0055ff;
	border: 0;
	border-radius: 7px;
	cursor: pointer;
}

.jv-embed-block__btn:hover { background: #0044cc; }

/* --- small screens ---------------------------------------------------- */

@media (max-width: 520px) {
	.jv-consent {
		left: 10px;
		right: 10px;
		bottom: 10px;
		width: auto;
		max-width: none;
		padding: 18px 18px 15px;
	}

	.jv-consent__actions { flex-direction: column; }
	.jv-consent-reopen { left: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.jv-consent__btn { transition: none; }
}
