/* Analytics consent banner. Loaded only when Google Analytics is configured. */

.rp-consent {
	position: fixed;
	z-index: 200; /* Above the sticky header (100). */
	right: var(--space-md);
	bottom: max(var(--space-md), env(safe-area-inset-bottom));
	left: var(--space-md);
	box-sizing: border-box;
	max-width: 26rem;
	padding: var(--space-lg);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	color: var(--color-text);
	box-shadow: var(--shadow-md);
	opacity: 0;
	transform: translateY(0.75rem);
	transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

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

.rp-consent.is-visible {
	opacity: 1;
	transform: none;
}

.rp-consent__title {
	margin: 0 0 var(--space-xs);
	color: var(--color-heading);
	font-size: var(--text-md);
	font-weight: 650;
	letter-spacing: var(--tracking-tight);
}

.rp-consent__text {
	margin: 0 0 var(--space-md);
	font-size: var(--text-sm);
	line-height: 1.55;
}

.rp-consent__text a {
	color: var(--color-heading);
	text-underline-offset: 0.2em;
}

.rp-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
}

/* Both choices are the same size, so neither is easier to pick. */
.rp-consent__actions .rp-button {
	flex: 1 1 8rem;
	justify-content: center;
}

@media (min-width: 40rem) {
	.rp-consent {
		right: auto;
		left: var(--space-lg);
		bottom: var(--space-lg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rp-consent {
		transform: none;
		transition: none;
	}
}

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