/*
 * ggc-theme-consent (TH-U): the consent notice's look (docs/contracts.md §5.6). Loads on every
 * page. It never sets display or position on .ggc-consent itself; the plugin's consent.css owns
 * those, and this file sets nothing that one sets.
 * Registered and enqueued only by inc/assets.php (docs/contracts.md §5.3). Unlayered.
 *
 * The compact notice at every width (O10; the owner, 2026-10-27: "yes but make it as visually
 * unobtrusive as possible"), from identity spec §10 and direction-b/identity.css at 0e1d416, on
 * the contract's ggc-consent__* classes. In the page flow, never covering content: Limestone, a
 * 1 px Line rule below, 14 px Muted text (6.3:1). Allow and Don't allow are identical quiet
 * controls, never the filled primary style: transparent, a 1 px Muted border, bold 14 px text,
 * 44 px targets, 32 px with a fine pointer. One row from 48em; below it the sentence sits above
 * the buttons. Below 30em the Privacy settings link moves into the sentence. About 45 px tall on
 * desktop and 102 px at 390 px.
 */

.ggc-consent {
	padding: 0.375rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--limestone);
	color: var(--wp--preset--color--muted);
}

/* The page's width and side gutters, as the prototypes' .wrap. */
.ggc-consent__inner {
	width: min(100% - 2.5rem, var(--wp--style--global--wide-size, 78rem));
	margin-inline: auto;
}

/* The heading still names the region, through aria-labelledby. */
.ggc-consent__title {
	display: none;
}

.ggc-consent__text {
	max-width: none;
	margin: 0 0 0.375rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

.ggc-consent__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem 0.5rem;
}

.ggc-consent__choice {
	min-width: 2.75rem;
	min-height: 2.75rem;
	margin: 0;
	padding: 0 0.875rem;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: var(--wp--custom--radius--control);
	background: transparent;
	color: var(--wp--preset--color--deep-green);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
}

.ggc-consent__choice:hover {
	background: var(--wp--preset--color--band);
}

.ggc-consent__actions .ggc-consent__link {
	display: none;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 0.25rem;
	font-size: 0.875rem;
}

@media (pointer: fine) {
	.ggc-consent__choice,
	.ggc-consent__actions .ggc-consent__link {
		min-height: 2rem;
	}
}

/* Below 30em the link is in the sentence; from 30em it follows the buttons. */
@media (min-width: 30em) {
	.ggc-consent__link--inline {
		display: none;
	}

	.ggc-consent__actions .ggc-consent__link {
		display: inline-flex;
	}
}

@media (min-width: 48em) {
	.ggc-consent__inner {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.25rem 1rem;
		width: min(100% - 4rem, var(--wp--style--global--wide-size, 78rem));
	}

	.ggc-consent__text {
		flex: 1 1 22rem;
		margin: 0;
	}
}

/* Forced colours drop the fill. Each choice keeps a button's 2 px edge from forced-colors.css (TH-B),
   with every other button's. */

/*
 * ggc/privacy-settings on /privacy-preferences/ (docs/contracts.md §5.6). Its buttons keep the
 * theme's button style, Allow and Don't allow alike. The block sits on a white sheet, as Direction
 * B's form panel, with square corners (identity spec §8.3).
 */
.ggc-privacy-settings {
	display: grid;
	justify-items: start;
	gap: 1.25rem;
	margin-block: 1.5rem;
	padding: clamp(1.25rem, 3vw, 2.5rem);
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: var(--wp--custom--radius--structure);
	background: var(--wp--preset--color--white);
}

.ggc-privacy-settings > * {
	margin-block: 0;
}

.ggc-privacy-settings__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
}
