/**
 * V6.21 — consent banner.
 *
 * Bottom-anchored and fixed, so it never enters the document flow: nothing on any page moves
 * because of it. Reuses the existing glass/edge/pink tokens rather than introducing a second
 * visual language, and the panel is capped and scrollable so the "choose individually" state
 * cannot grow past a short viewport.
 */

.lp-consent {
	position: fixed;
	z-index: 99999;
	inset: auto 0 0 0;
	display: flex;
	justify-content: center;
	padding: clamp(10px, 1.4vw, 16px);
	pointer-events: none;
}

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

.lp-consent__panel {
	pointer-events: auto;
	/* V6.33 — the banner was too heavy. Measured on production at 1280x860 it stood 302px tall,
	   35% of the viewport, as a 680px slab with 26px padding and a 199-character paragraph; at
	   280px wide it took 58%. A consent notice has to be readable, not commanding. The panel is
	   now a compact card: narrower, tighter, smaller type, and one sentence instead of a
	   paragraph — the per-category detail was always one tap away behind "Choose individually"
	   and is where that explanation belongs. Nothing about the consent logic changed: the same
	   markup, the same data-lp-consent-action buttons, the same always-rendered element. */
	width: min(440px, 100%);
	max-height: min(72vh, 560px);
	overflow-y: auto;
	padding: clamp(14px, 1.4vw, 18px);
	border-radius: 12px;
	border: 1px solid var(--lp-edge, rgba(255, 255, 255, .115));
	background: rgba(16, 16, 20, .92);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
	color: #f2f2f4;
	transform: translateY(12px);
	opacity: 0;
	transition: transform .32s ease, opacity .32s ease;
}

.lp-consent.is-open .lp-consent__panel { transform: none; opacity: 1; }

.lp-consent__title {
	margin: 0 0 6px;
	font-size: clamp(.92rem, .88rem + .12vw, 1rem);
	line-height: 1.3;
	letter-spacing: .01em;
	color: #fff;
}

.lp-consent__body {
	margin: 0 0 12px;
	font-size: .82rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, .74);
}

/* V7.13 — LEO-06 R1A. Same weight/tone as .lp-consent__body, just a link instead of prose. */
.lp-consent__policy {
	margin: -6px 0 12px;
	font-size: .78rem;
}

.lp-consent__policy a {
	color: rgba(255, 255, 255, .74);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lp-consent__policy a:hover,
.lp-consent__policy a:focus-visible { color: #fff; }

/* Collapsed by default; the toggle reveals it. max-height rather than display so the
   transition has something to animate and the checkboxes stay reachable to a screen reader
   only when they are actually offered. */
.lp-consent__options {
	display: grid;
	gap: 10px;
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease, margin .3s ease;
	margin: 0;
}

.lp-consent__options.is-open { max-height: 420px; margin: 0 0 16px; }

.lp-consent__option {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--lp-edge, rgba(255, 255, 255, .115));
	background: var(--lp-glass, rgba(255, 255, 255, .045));
	cursor: pointer;
	font-size: .88rem;
}

.lp-consent__option--locked { opacity: .62; cursor: default; }
.lp-consent__option input { margin-top: 3px; accent-color: var(--lp-pink, #e6398b); flex: none; }
.lp-consent__option span { display: block; color: #fff; }
.lp-consent__option em {
	display: block;
	margin-top: 2px;
	font-style: normal;
	font-size: .82rem;
	color: rgba(255, 255, 255, .58);
}

.lp-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.lp-consent__btn {
	flex: 1 1 auto;
	min-height: 44px; /* touch target */
	padding: 9px 14px;
	border-radius: 999px;
	border: 1px solid transparent;
	font: inherit;
	font-size: .88rem;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

/* V6.26 — NOT var(--lp-pink). Measured: white text on #e6398b is 3.95:1 and on the old
   #f04d99 hover 3.37:1, where WCAG AA wants 4.5:1 for text this size (.88rem, not bold).
   Lighthouse flagged it on all four tested templates. The hover was also going the wrong way —
   lighter means less contrast against white text. These two shades are the same hue, darkened
   until they pass: 4.63:1 and 5.47:1. The brand token is left alone, because changing it would
   move colour everywhere else on the site to fix a button. */
.lp-consent__btn--primary {
	background: #d62d7e;
	color: #fff;
}

.lp-consent__btn--primary:hover { background: #c42472; }

.lp-consent__btn--ghost {
	background: transparent;
	border-color: var(--lp-edge, rgba(255, 255, 255, .18));
	color: rgba(255, 255, 255, .86);
}

.lp-consent__btn--ghost:hover {
	border-color: rgba(255, 255, 255, .34);
	color: #fff;
}

.lp-consent__toggle {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: .82rem;
	color: rgba(255, 255, 255, .6);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.lp-consent__toggle:hover { color: #fff; }

.lp-consent :focus-visible {
	outline: 2px solid var(--lp-mint, #7fe3b0);
	outline-offset: 2px;
}

/* The placeholder shown where a YouTube embed would be, until media consent is given. */
.lp-consent-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 180px;
	height: 100%;
	padding: 24px;
	text-align: center;
	border: 1px solid var(--lp-edge, rgba(255, 255, 255, .115));
	background: var(--lp-glass, rgba(255, 255, 255, .045));
	color: rgba(255, 255, 255, .78);
	font-size: .9rem;
	line-height: 1.55;
}

/* Same contrast correction as the banner's primary button above. */
.lp-consent-block__btn {
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	border: 0;
	background: #d62d7e;
	color: #fff;
	font: inherit;
	font-size: .86rem;
	cursor: pointer;
}

.lp-consent-block__btn:hover { background: #c42472; }

@media (prefers-reduced-motion: reduce) {
	.lp-consent__panel,
	.lp-consent__options { transition: none; }
	.lp-consent__panel { transform: none; }
}

@media (max-width: 480px) {
	/* V6.33 — the two choices sit side by side rather than stacked. Stacked they cost 108px of a
	   260px panel on a 375px screen, which is most of why the notice read as heavy on a phone.
	   Both labels are short enough to share the row at 375px and each still clears the 44px
	   touch target. flex-wrap is left on, so a longer translated label drops to its own line
	   instead of squeezing. */
	.lp-consent__btn { flex: 1 1 40%; min-width: 0; }
}

/* The footer entry point. Matches the link it sits beside rather than looking like a control,
   since the footer's own rhythm is what governs this row. */
.leopati-footer__consent {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	opacity: .72;
	transition: opacity .2s ease;
}

.leopati-footer__consent:hover { opacity: 1; }
