/**
 * Consent interface — banner, preferences dialog, privacy-choices link.
 *
 * Colors ride the theme's semantic tokens (--color-base / --color-contrast /
 * --color-surface / --color-border / --color-text-muted, defined at :root in
 * the cs theme and overridden by :root[data-theme="dark"]) — light and dark
 * schemes resolve automatically, no media queries here. Radius follows the
 * card convention (spacing--20 outer, spacing--10 inner). Buttons carry
 * .wp-element-button so the theme's button styles apply unmodified; accept
 * and reject share the same class — equal prominence by design.
 */

/* Banner ---------------------------------------------------------------- */

.cs-consent-banner {
	position: fixed;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 1000;
	background: var(--color-base, #fff);
	color: var(--color-contrast, #111);
	border-block-start: 1px solid var(--color-border, #ddd);
}

.cs-consent-banner__inner {
	max-width: var(--wp--style--global--wide-size, 1280px);
	margin-inline: auto;
	padding: var(--wp--preset--spacing--30, 1rem);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--30, 1rem);
}

.cs-consent-banner__text {
	margin: 0;
	flex: 1 1 24rem;
}

.cs-consent-banner__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--20, 0.75rem);
}

.cs-consent-banner__prefs,
.cs-consent-dialog__cancel {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: inherit;
	text-decoration: underline;
	font: inherit;
}

/* Preferences dialog ---------------------------------------------------- */

.cs-consent-dialog {
	max-width: min(32rem, 90vw);
	border: none; /* override the <dialog> UA default border too */
	border-radius: var(--wp--preset--spacing--20, 1rem);
	background: var(--color-base, #fff);
	color: var(--color-contrast, #111);
	padding: var(--wp--preset--spacing--40, 1.5rem);
}

.cs-consent-dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.cs-consent-dialog__title {
	margin-block-start: 0;
	color: var(--color-heading, inherit);
}

.cs-consent-dialog__text {
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	/* Inherits --color-contrast from the dialog — same as article body text. */
}

.cs-consent-dialog__category {
	border: none; /* override the <fieldset> UA default border too */
	border-radius: var(--wp--preset--spacing--10, 0.5rem);
	background: var(--color-surface, transparent);
	padding: var(--wp--preset--spacing--30, 1rem);
	margin-block: var(--wp--preset--spacing--30, 1rem);
}

.cs-consent-dialog__category-title {
	margin-block: 0;
	font-size: var(--wp--preset--font-size--medium, 1.125rem);
	color: var(--color-heading, inherit);
}

.cs-consent-dialog__services {
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	color: var(--color-text-muted, inherit);
	padding-inline-start: 1.25em;
}

.cs-consent-dialog__toggle {
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.cs-consent-dialog__actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20, 0.75rem);
	margin-block-start: var(--wp--preset--spacing--30, 1rem);
}
