/* Autolevo cookie consent banner — frosted glass, dark default + [data-theme="light"]. Uses --al-* tokens. */

.al-consent {
	position: fixed;
	left: calc(16px + env(safe-area-inset-left, 0px));
	right: calc(16px + env(safe-area-inset-right, 0px));
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 100000;
	display: flex;
	justify-content: center;
	pointer-events: none;
	font-family: var(--al-font-multilingual, Roboto, system-ui, -apple-system, "Segoe UI", sans-serif);
}

.al-consent__inner {
	pointer-events: auto;
	width: 100%;
	max-width: 720px;
	padding: 20px 22px;
	border-radius: var(--al-radius-card, 24px);
	color: var(--al-text-primary, #fff);
	background: rgba(17, 20, 26, 0.92);
	border: 1px solid var(--al-border-hairline, rgba(255, 255, 255, 0.08));
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
	-webkit-backdrop-filter: blur(24px) saturate(180%);
	backdrop-filter: blur(24px) saturate(180%);
	animation: al-consent-in 0.22s ease-out;
}

html[data-theme="light"] .al-consent__inner {
	color: var(--al-text-primary, #000);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.al-consent__title {
	margin: 0 0 6px;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
}

.al-consent__body {
	margin: 0 0 14px;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--al-text-secondary, var(--al-dk-text-2, #8E96A4));
}

.al-consent__link {
	color: var(--al-blue, #276ef1);
	text-decoration: none;
	font-weight: 600;
}

.al-consent__prefs {
	display: grid;
	gap: 10px;
	margin: 0 0 16px;
	padding: 12px 0;
	border-top: 1px solid var(--al-border-subtle, rgba(255, 255, 255, 0.12));
	border-bottom: 1px solid var(--al-border-subtle, rgba(255, 255, 255, 0.12));
}

.al-consent__row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.al-consent__rowtitle {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.al-consent__rowdesc {
	margin: 2px 0 0;
	font-size: 0.82rem;
	line-height: 1.4;
	color: var(--al-text-muted, var(--al-dk-text-3, #7C8494));
}

.al-consent__switch {
	position: relative;
	flex: 0 0 40px;
	width: 40px;
	height: 22px;
	margin-top: 2px;
}

.al-consent__switch input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.al-consent__slider {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: var(--al-bg-hover, var(--al-dk-hover, #1E232C));
	border: 1px solid var(--al-border-subtle, rgba(255, 255, 255, 0.12));
	transition: background 0.15s ease;
}

.al-consent__slider::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s ease;
}

html[data-theme="light"] .al-consent__slider {
	background: var(--al-bg-track, #E5E7EB);
}

.al-consent__switch input:checked + .al-consent__slider {
	background: var(--al-blue, #276ef1);
	border-color: var(--al-blue, #276ef1);
}

.al-consent__switch input:checked + .al-consent__slider::after {
	transform: translateX(18px);
}

.al-consent__switch input:disabled + .al-consent__slider {
	opacity: 0.55;
}

.al-consent__switch input:focus-visible + .al-consent__slider {
	outline: 2px solid var(--al-blue, #276ef1);
	outline-offset: 2px;
}

.al-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.al-consent__btn {
	min-height: 40px;
	padding: 0 16px;
	border-radius: var(--al-radius-control, 8px);
	border: 1px solid var(--al-border-strong, rgba(255, 255, 255, 0.16));
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
}

.al-consent__btn:hover {
	background: var(--al-bg-hover, rgba(255, 255, 255, 0.08));
}

.al-consent__btn:focus-visible {
	outline: 2px solid var(--al-blue, #276ef1);
	outline-offset: 2px;
}

.al-consent__btn--primary {
	background: var(--al-blue, #276ef1);
	border-color: var(--al-blue, #276ef1);
	color: #fff;
}

.al-consent__btn--primary:hover {
	background: var(--al-blue-hover, #1E54B7);
	border-color: var(--al-blue-hover, #1E54B7);
}

.al-consent__btn--ghost {
	border-color: transparent;
	text-decoration: none;
}

.al-consent-footer {
	text-align: center;
	padding: 8px 0;
	font-size: 0.82rem;
}

.al-consent-footer-link {
	color: inherit;
	opacity: 0.8;
	text-decoration: none;
}

@media (max-width: 599px) {
	.al-consent {
		left: calc(8px + env(safe-area-inset-left, 0px));
		right: calc(8px + env(safe-area-inset-right, 0px));
		bottom: calc(8px + env(safe-area-inset-bottom, 0px));
	}

	.al-consent__actions .al-consent__btn {
		flex: 1 1 100%;
	}
}

@keyframes al-consent-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.al-consent__inner {
		animation: none;
	}

	.al-consent__slider,
	.al-consent__slider::after {
		transition: none;
	}
}
