/*
 * AAV cookie consent banner — vanilla CSS, no build step required.
 * Drop this file into any site's static/public directory and link it.
 *
 * Theming: override the --aav-consent-* custom properties in the host
 * site's own stylesheet to match brand colours/fonts. Sensible neutral
 * defaults are set below so the banner looks reasonable out of the box.
 */

:root {
	--aav-consent-bg: #ffffff;
	--aav-consent-fg: #1a1a1a;
	--aav-consent-border: #e2e2e2;
	--aav-consent-accent: #4f46e5;
	--aav-consent-accent-fg: #ffffff;
	--aav-consent-radius: 0.75rem;
	--aav-consent-font: system-ui, -apple-system, sans-serif;
	--aav-consent-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.35);
}

.aav-consent-banner {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	z-index: 2147483000;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	max-width: 760px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
	background: var(--aav-consent-bg);
	color: var(--aav-consent-fg);
	border: 1px solid var(--aav-consent-border);
	border-radius: var(--aav-consent-radius);
	box-shadow: var(--aav-consent-shadow);
	font-family: var(--aav-consent-font);
}

.aav-consent-text {
	flex: 1 1 320px;
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
}

.aav-consent-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aav-consent-actions {
	display: flex;
	flex: 0 0 auto;
	gap: 0.75rem;
}

/* Accept and Reject share identical sizing, padding, border-width and
   font-weight — only fill/border colour differs — so neither reads as
   the "default" or primary action. Do not give one a bigger hit target,
   bolder text, or brighter colour than the other. */
.aav-consent-btn {
	appearance: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.65rem 1.25rem;
	border-radius: calc(var(--aav-consent-radius) - 0.25rem);
	border: 1.5px solid var(--aav-consent-accent);
	background: transparent;
	color: var(--aav-consent-accent);
	transition: opacity 0.15s ease;
}

.aav-consent-btn:hover {
	opacity: 0.8;
}

.aav-consent-btn--accept {
	background: var(--aav-consent-accent);
	color: var(--aav-consent-accent-fg);
}

@media (max-width: 480px) {
	.aav-consent-banner {
		flex-direction: column;
		align-items: stretch;
	}

	.aav-consent-actions {
		flex-direction: column;
	}

	.aav-consent-btn {
		width: 100%;
		text-align: center;
	}
}
