/**
 * GritAfrique Cookie Consent — front-end styles.
 *
 * A compact card docked bottom-left. Design tokens mirror design-spec.md:
 * surface #1a1924 on page #0d0c14, accent #eda72b, white-70 body copy,
 * 20px button radius, Aeonik type. On phones the card spans the width.
 *
 * NOTE: ElementsKit's reset.css styles [type="button"] at the same specificity
 * as a single class AND loads after this file, so every button rule here is
 * scoped (.ga-cc .ga-cc__btn / button.ga-cc-reopen) and every :hover/:focus
 * state restates its background — otherwise the reset repaints them pink.
 */

.ga-cc,
button.ga-cc-reopen {
	--ga-cc-surface: #1a1924;
	--ga-cc-deep: #0d0c14;
	--ga-cc-accent: #eda72b;
	--ga-cc-text: #ffffff;
	--ga-cc-muted: rgba(255, 255, 255, 0.7);
	--ga-cc-line: rgba(255, 255, 255, 0.1);
	--ga-cc-radius: 20px;

	font-family: Aeonik, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
}

.ga-cc *,
.ga-cc *::before,
.ga-cc *::after {
	box-sizing: inherit;
}

.ga-cc[hidden],
button.ga-cc-reopen[hidden] {
	display: none !important;
}

/* ----------------------------------------------------------------- card */

.ga-cc {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: 12px;
	z-index: 999999;
	pointer-events: none;
}

.ga-cc__card {
	/* Only clickable once it has actually faded in, so an in-flight card can
	   never swallow taps on the content behind it. */
	pointer-events: none;
	max-width: 420px;
	padding: 22px;
	background: var(--ga-cc-surface);
	border: 1px solid var(--ga-cc-line);
	border-radius: var(--ga-cc-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
	transform: translateY(16px);
	opacity: 0;
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.ga-cc[data-state="open"] .ga-cc__card {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.ga-cc__title {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--ga-cc-text);
}

.ga-cc__text {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--ga-cc-muted);
}

.ga-cc__link {
	color: var(--ga-cc-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.ga-cc__link:hover,
.ga-cc__link:focus {
	color: var(--ga-cc-accent);
	text-decoration: none;
}

/* -------------------------------------------------------------- buttons */

.ga-cc__actions {
	display: flex;
	gap: 10px;
}

/* Accept and Reject deliberately share size, shape and weight — a refusal
   must be exactly as easy as an acceptance. */
.ga-cc .ga-cc__btn {
	appearance: none;
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 20px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.2;
	font-weight: 500;
	text-align: center;
	white-space: nowrap;
	border-radius: var(--ga-cc-radius);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.ga-cc .ga-cc__btn:active {
	transform: translateY(1px);
}

.ga-cc .ga-cc__btn--solid {
	background: var(--ga-cc-accent);
	color: var(--ga-cc-deep);
	font-weight: 700;
	border-color: var(--ga-cc-accent);
}

.ga-cc .ga-cc__btn--solid:hover,
.ga-cc .ga-cc__btn--solid:focus {
	background: #f7b73f;
	border-color: #f7b73f;
	color: var(--ga-cc-deep);
}

.ga-cc .ga-cc__btn--outline {
	background: transparent;
	color: var(--ga-cc-accent);
	border-color: var(--ga-cc-accent);
}

.ga-cc .ga-cc__btn--outline:hover,
.ga-cc .ga-cc__btn--outline:focus {
	background: rgba(237, 167, 43, 0.12);
	color: var(--ga-cc-accent);
}

.ga-cc .ga-cc__btn:focus-visible,
button.ga-cc-reopen:focus-visible {
	outline: 2px solid var(--ga-cc-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------------- reopen trigger */

button.ga-cc-reopen {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: var(--ga-cc-surface);
	border: 1px solid var(--ga-cc-line);
	border-radius: 50%;
	color: var(--ga-cc-accent);
	cursor: pointer;
	opacity: 0.62;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
	transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

button.ga-cc-reopen:hover,
button.ga-cc-reopen:focus {
	background: var(--ga-cc-surface);
	opacity: 1;
	border-color: var(--ga-cc-accent);
	transform: translateY(-2px);
}

button.ga-cc-reopen svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* ------------------------------------------------------------- ≥ 600px */

@media (min-width: 600px) {
	.ga-cc {
		left: 20px;
		right: 20px;
		bottom: 20px;
	}

	.ga-cc__card {
		padding: 24px;
	}

	button.ga-cc-reopen {
		left: 20px;
		bottom: 20px;
	}
}

/* ------------------------------------------------------- accessibility */

@media (prefers-reduced-motion: reduce) {
	.ga-cc__card,
	.ga-cc .ga-cc__btn,
	button.ga-cc-reopen {
		transition: none !important;
	}
}
