/*
 * The consent banner: a small card in the corner, built on the theme's design
 * tokens, with fallbacks so it still reads correctly if the theme changes.
 * Non-modal: the page stays usable, the banner simply waits for a choice.
 */
.alni-consent {
	position: fixed;
	left: var(--space-4, 1rem);
	right: var(--space-4, 1rem);
	bottom: var(--space-4, 1rem);
	z-index: var(--z-modal, 400);
	box-sizing: border-box;
	/* 25rem is where the Bulgarian sentence settles on two lines: measured,
	   and both shorter and smaller in area than any narrower card. */
	max-width: 25rem;
	padding: var(--space-4, 1rem);
	background: var(--color-surface-raised, #fff);
	color: var(--color-text-muted, #4a4a4a);
	border: 1px solid var(--color-border, #d9d9d9);
	border-radius: var(--radius-lg, 12px);
	box-shadow: var(--shadow-lg, 0 12px 32px rgb(0 0 0 / 0.16));
	font-family: var(--font-sans, system-ui, sans-serif);
	font-size: var(--text-sm, 0.9375rem);
	line-height: var(--leading-normal, 1.6);
}

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

.alni-consent__title {
	margin: 0 0 var(--space-1, 0.25rem);
	color: var(--color-text-strong, #1f1f1f);
	font-size: var(--text-sm, 0.9375rem);
	font-weight: var(--weight-semibold, 600);
	line-height: var(--leading-snug, 1.3);
}

.alni-consent__text {
	margin: 0 0 var(--space-3, 0.75rem);
}

.alni-consent__text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.alni-consent__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: var(--space-2, 0.5rem);
}

/*
 * One row, one size, one full touch target each. Only the fill differs --
 * accepting is the obvious choice without refusing being made any harder,
 * which is the line between an emphasised default and a dark pattern.
 */
/*
 * Scoped one level deeper than the theme's own `.btn`, deliberately: this
 * stylesheet is printed before the theme's, so at equal specificity `.btn`
 * would win the padding and the buttons would silently render wider than the
 * card was measured for.
 */
.alni-consent .alni-consent__button {
	flex: 0 1 auto;
	min-height: 44px;
	padding-inline: var(--space-4, 1rem);
}

.alni-consent :focus-visible {
	outline: 2px solid var(--color-focus, #1a73e8);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	.alni-consent:not([hidden]) {
		animation: alni-consent-in var(--duration, 200ms) var(--ease, ease-out);
	}
}

@keyframes alni-consent-in {
	from {
		opacity: 0;
		transform: translateY(0.5rem);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media print {
	.alni-consent {
		display: none;
	}
}
