/* ASC Consent 0.1.0 — bottom-right card in the Alexi theme's language:
   Lexend Deca via --font, ink hairline, square corners, soft shadow.
   Colours come from the theme tokens with plain fallbacks, so the banner
   survives a theme change. z-index sits above the lesson page's fixed
   Notes/Clips panels (99999). */

.asc-consent {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100001;
	width: min(420px, calc(100vw - 24px));
	box-sizing: border-box;
	padding: 22px 24px 18px;
	background: #fff;
	color: var(--alexi-body, #2E2E2C);
	border: 1px solid var(--alexi-ink, #1A1A1A);
	border-radius: 0;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
	font-family: var(--font, "Lexend Deca", system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .18s ease, transform .18s ease;
}
.asc-consent.is-open {
	opacity: 1;
	transform: none;
}
.asc-consent[hidden] {
	display: none;
}
@media (max-width: 600px) {
	.asc-consent {
		right: 12px;
		left: 12px;
		bottom: 12px;
		width: auto;
		padding: 18px 18px 14px;
	}
}

.asc-consent * {
	box-sizing: border-box;
}

.asc-consent-x {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--alexi-ink, #1A1A1A);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.asc-consent-title {
	margin: 0 28px 10px 0;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--alexi-ink, #1A1A1A);
}
.asc-consent-msg {
	margin: 0 0 16px;
}

/* ---- buttons ---- */
.asc-consent-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
.asc-consent-btn {
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	padding: 10px 15px;
	border-radius: 0;
	cursor: pointer;
	border: 1px solid var(--alexi-ink, #1A1A1A);
	background: var(--alexi-ink, #1A1A1A);
	color: #fff;
}
.asc-consent-btn-outline {
	background: #fff;
	color: var(--alexi-ink, #1A1A1A);
}
.asc-consent-btn-text {
	border-color: transparent;
	background: transparent;
	color: var(--alexi-accent, #3C4F62);
	padding-left: 4px;
	padding-right: 4px;
	margin-left: auto;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.asc-consent-btn:hover,
.asc-consent-btn:focus-visible {
	filter: brightness(1.15);
}
.asc-consent-btn-outline:hover,
.asc-consent-btn-outline:focus-visible {
	background: var(--alexi-btn-bg, #EFEFEC);
	filter: none;
}
.asc-consent-btn:focus-visible,
.asc-consent-x:focus-visible,
.asc-consent-check:focus-visible + .asc-consent-track {
	outline: 2px solid var(--alexi-accent, #3C4F62);
	outline-offset: 2px;
}

/* ---- preferences view ---- */
.asc-consent-cat {
	padding: 12px 0;
	border-top: 1px solid var(--alexi-line, #E7E6E1);
}
.asc-consent-cat:last-of-type {
	border-bottom: 1px solid var(--alexi-line, #E7E6E1);
	margin-bottom: 14px;
}
.asc-consent-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.asc-consent-cat-name {
	font-weight: 500;
	color: var(--alexi-ink, #1A1A1A);
}
.asc-consent-cat-desc {
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--alexi-body, #2E2E2C);
}
.asc-consent-always {
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--alexi-muted, #74746F);
}

/* switch */
.asc-consent-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex: 0 0 auto;
}
.asc-consent-check {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}
.asc-consent-track {
	position: absolute;
	inset: 0;
	border-radius: 24px;
	background: var(--alexi-outline, #C9C8C3);
	transition: background .15s ease;
}
.asc-consent-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}
.asc-consent-check:checked + .asc-consent-track {
	background: var(--alexi-ink, #1A1A1A);
}
.asc-consent-check:checked + .asc-consent-track::after {
	transform: translateX(20px);
}

/* ---- footer link ---- */
.asc-consent-foot {
	margin: 14px 0 0;
	font-size: 13px;
}
.asc-consent-foot a,
.asc-consent-open {
	color: var(--alexi-accent, #3C4F62);
	text-decoration: underline;
	text-underline-offset: 3px;
}
