/**
 * The cookie notice — own stylesheet, loaded only when the bar will render
 * (board-cut file map: never style.css). Reads theme.json's design tokens the
 * same way the rest of this repo's component CSS does.
 *
 * Design: developer reference §9 — a dark/charcoal filled Accept and a
 * light/outline Manage. Anchored to the bottom, full width on a phone.
 */

.gv-cookie {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 90;
	background: var( --wp--preset--color--ivory );
	border-top: 1px solid var( --wp--preset--color--hairline );
	/* The bar sits over content, so it needs its own lift off the page —
	   a hairline alone reads as a seam rather than a layer. */
	box-shadow: 0 -8px 24px rgba( 38, 36, 31, 0.08 );
	/* Below the cart drawer (z-index 100+) and the charm modals on purpose:
	   a notice must never cover a control the customer is actively using. */
}

/* `[hidden]` has to beat the `display` the layout sets, or dismissing the bar
   with JS would leave it on screen. */
.gv-cookie[hidden] {
	display: none;
}

.gv-cookie__inner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-width: 68rem;
	margin-inline: auto;
	padding: 1.25rem 1.5rem;
	/* Clears the phone's home indicator, so the buttons are not under it. */
	padding-bottom: calc( 1.25rem + env( safe-area-inset-bottom, 0px ) );
}

.gv-cookie__heading {
	font-family: var( --wp--preset--font-family--display );
	font-size: 1.125rem;
	color: var( --wp--preset--color--charcoal );
	margin: 0;
}

.gv-cookie__body {
	font-family: var( --wp--preset--font-family--body );
	font-size: 0.875rem;
	line-height: 1.6;
	color: var( --wp--preset--color--muted );
	margin: 0.375rem 0 0;
	max-width: 46rem;
}

/* The consent sentence — "By choosing “Accept All Cookies” you agree to our
   Cookie Policy." — sits under the factual body as its own paragraph.

   Same type treatment as the body, deliberately, with only the top margin
   tightened so the two read as one block of text rather than as two separate
   statements. It is not emphasised: this notice's job is to inform, and a
   consent line set louder than the facts above it starts to look like a gate,
   which this is explicitly not (ADR-20260925-1123). */
.gv-cookie__consent {
	font-family: var( --wp--preset--font-family--body );
	font-size: 0.875rem;
	line-height: 1.6;
	color: var( --wp--preset--color--muted );
	margin: 0.25rem 0 0;
	max-width: 46rem;
}

.gv-cookie__link {
	color: var( --wp--preset--color--charcoal );
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gv-cookie__link:hover,
.gv-cookie__link:focus-visible {
	color: var( --wp--preset--color--gold );
}

.gv-cookie__detail {
	margin-top: 0.875rem;
	padding: 0.875rem 1rem;
	border: 1px solid var( --wp--preset--color--hairline );
	border-radius: 0.375rem;
	background: var( --wp--preset--color--band, #f7f4ee );
}

.gv-cookie__detail p {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--micro );
	line-height: 1.7;
	color: var( --wp--preset--color--muted );
	margin: 0;
	max-width: 46rem;
}

.gv-cookie__detail[hidden] {
	display: none;
}

.gv-cookie__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.gv-cookie__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--eyebrow );
	text-transform: uppercase;
	letter-spacing: 0.22em;
	text-decoration: none;
	border-radius: 999px;
	/* Generous vertical padding is the tap target, not decoration: these are
	   the two controls on the bar and they sit at the very bottom of a phone
	   screen, the hardest place to hit accurately. */
	padding: 0.875rem 1.75rem;
	min-height: 2.75rem;
	cursor: pointer;
	transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* Dark / charcoal filled — §9. */
.gv-cookie__btn--solid {
	background: var( --wp--preset--color--charcoal );
	border: 1px solid var( --wp--preset--color--charcoal );
	color: var( --wp--preset--color--ivory );
}

.gv-cookie__btn--solid:hover,
.gv-cookie__btn--solid:focus-visible {
	background: var( --wp--preset--color--gold );
	border-color: var( --wp--preset--color--gold );
	color: var( --wp--preset--color--charcoal );
}

/* Light / outline — §9. */
.gv-cookie__btn--ghost {
	background: transparent;
	border: 1px solid var( --wp--preset--color--hairline );
	color: var( --wp--preset--color--muted );
}

.gv-cookie__btn--ghost:hover,
.gv-cookie__btn--ghost:focus-visible {
	border-color: var( --wp--preset--color--gold );
	color: var( --wp--preset--color--charcoal );
}

/* Side by side once there is room, with the text taking the spare width. */
@media ( min-width: 48rem ) {
	.gv-cookie__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 2rem;
	}

	.gv-cookie__actions {
		flex-shrink: 0;
	}
}
