/* ==============================================================
     # Cookie consent (inc/vw-consent.php, js/vw-consent.js): a card at
     the bottom left, a sheet on phones. Rejecting is as easy as accepting
=================================================================== */

.vw-consent {
	position: fixed;
	z-index: 100000;
	left: 24px;
	bottom: 24px;
	width: 440px;
	max-width: calc(100% - 32px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 24px;
	border: 1px solid #e3e5f1;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(35, 35, 80, 0.18);
	color: #3f4156;
	font-size: 15px;
	line-height: 1.55;
}

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

.vw-consent.is-visible {
	animation: vw-consent-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes vw-consent-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
}

.vw-consent__title {
	margin: 0 0 8px;
	color: #232323;
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.vw-consent__text {
	margin: 0 0 16px;
}

.vw-consent__text a {
	color: #5153ff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.vw-consent__prefs {
	display: grid;
	gap: 10px;
	margin: 0 0 16px;
}

.vw-consent__prefs[hidden] {
	display: none;
}

.vw-consent__opt {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px;
	align-items: start;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #e3e5f1;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}

.vw-consent__opt strong {
	display: block;
	color: #232323;
}

/* The checkboxes as switches */
.vw-consent__opt input {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex: none;
	width: 40px;
	height: 22px;
	min-height: 0;
	margin: 1px 0 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	border-radius: 11px;
	background: #c9cbdb;
	cursor: pointer;
	transition: background 0.2s ease;
}

.vw-consent__opt input::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}

.vw-consent__opt input:checked {
	background: #5153ff;
}

.vw-consent__opt input:checked::after {
	transform: translateX(18px);
}

.vw-consent__opt input:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.vw-consent__opt input:focus-visible,
.vw-consent button:focus-visible,
.vw-consent a:focus-visible {
	outline: 2px solid #5153ff;
	outline-offset: 2px;
}

.vw-consent__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.vw-consent__btn {
	min-height: 46px;
	padding: 10px 16px;
	border: 2px solid #5153ff;
	border-radius: 999px;
	background: #fff;
	color: #5153ff;
	font-family: var(--font-heading);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.vw-consent__btn:hover {
	background: #efefff;
}

.vw-consent__btn--primary {
	background: #5153ff;
	color: #fff;
}

.vw-consent__btn--primary:hover {
	background: #3f41e6;
	border-color: #3f41e6;
}

.vw-consent__btn--wide,
.vw-consent__link {
	grid-column: 1 / -1;
}

.vw-consent__btn[hidden],
.vw-consent__link[hidden] {
	display: none;
}

.vw-consent__link {
	justify-self: center;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: #3f4156;
	font-size: 14px;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.vw-consent__link:hover {
	color: #5153ff;
}

@media (max-width: 575px) {
	.vw-consent {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		max-width: none;
		padding: 20px 16px 16px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vw-consent.is-visible {
		animation: none;
	}

	.vw-consent__opt input,
	.vw-consent__opt input::after,
	.vw-consent__btn {
		transition: none;
	}
}

/* The theme draws an animated overlay on every button: not on these */
.vw-consent button::after,
.vw-footer .vw-footer__legal button::after {
	content: none;
}

/* "Cookie settings" in the footer's legal links, looking like its neighbors */
.vw-footer .vw-footer__legal button {
	padding: 0;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.55);
	font: inherit;
	font-family: var(--font-default);
	text-transform: none;
	cursor: pointer;
	transition: color 0.2s ease;
}

.vw-footer .vw-footer__legal button:hover,
.vw-footer .vw-footer__legal button:focus-visible {
	color: #fff;
}
