.itw-consent {
	/* Themes can intentionally set these. WordPress global styles are inherited by default. */
	--itw-consent-bg: var(--wp--preset--color--base, #fff);
	--itw-consent-text: var(--wp--preset--color--contrast, #172033);
	--itw-consent-border: #687386;
	--itw-consent-action: var(--wp--preset--color--primary, var(--wp--preset--color--accent, #173f73));
	--itw-consent-on-action: var(--wp--preset--color--base, #fff);
	--itw-consent-radius: var(--wp--custom--border-radius--medium, 0.5rem);
	--itw-consent-font: var(--wp--preset--font-family--body, inherit);
	color: var(--itw-consent-text);
	font-family: var(--itw-consent-font);
}
.itw-consent-status { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.itw-consent[data-itw-consent-ready="false"] .itw-consent-manage { display: none; }

.itw-consent[data-itw-consent-color="light"] { --itw-consent-bg: #fff; --itw-consent-text: #172033; --itw-consent-action: #173f73; --itw-consent-on-action: #fff; }
.itw-consent[data-itw-consent-color="dark"] { --itw-consent-bg: #172033; --itw-consent-text: #f7f9fc; --itw-consent-action: #b8d8ff; --itw-consent-on-action: #10233d; }
.itw-consent[data-itw-consent-type="system"] { --itw-consent-font: ui-sans-serif, system-ui, sans-serif; }
.itw-consent[data-itw-consent-type="serif"] { --itw-consent-font: ui-serif, Georgia, serif; }
.itw-consent[data-itw-consent-corners="square"] { --itw-consent-radius: 0; }
.itw-consent[data-itw-consent-corners="soft"] { --itw-consent-radius: 0.5rem; }
.itw-consent[data-itw-consent-corners="rounded"] { --itw-consent-radius: 1.25rem; }

.itw-consent-banner {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	left: 1rem;
	z-index: 99990;
	display: flex;
	gap: 1.5rem;
	align-items: center;
	justify-content: space-between;
	max-width: 72rem;
	margin: auto;
	padding: 1.25rem;
	background: var(--itw-consent-bg);
	border: 1px solid var(--itw-consent-border);
	border-radius: var(--itw-consent-radius);
	box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 18%);
}

.itw-consent--bar .itw-consent-banner {
	right: 0;
	left: 0;
	max-width: none;
	border-right: 0;
	border-left: 0;
	border-radius: 0;
}

.itw-consent--top .itw-consent-banner { top: 1rem; bottom: auto; }
.itw-consent--top.itw-consent--bar .itw-consent-banner { top: 0; }
.itw-consent--bottom.itw-consent--bar .itw-consent-banner { bottom: 0; }

.itw-consent-banner h2,
.itw-consent-preferences h2 { margin-top: 0; }
.itw-consent-banner p { margin-bottom: 0; }
.itw-consent-banner__brand { margin: 0 0 0.35rem; font-size: 0.875em; font-weight: 700; letter-spacing: 0.04em; }
.itw-consent-banner__identity { display: flex; gap: 0.75rem; align-items: center; margin: 0 0 0.5rem; }
.itw-consent-banner__identity .itw-consent-banner__brand { margin: 0; }
.itw-consent-banner__logo { display: block; width: auto; max-width: 10rem; height: 2.5rem; object-fit: contain; }

.itw-consent-banner__actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(8rem, 1fr));
	gap: 0.75rem;
}

.itw-consent-button,
.itw-consent-manage {
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	color: var(--itw-consent-text);
	background: var(--itw-consent-bg);
	border: 2px solid var(--itw-consent-action);
	border-radius: var(--itw-consent-radius);
	font: inherit;
	cursor: pointer;
}

.itw-consent-button--primary {
	color: var(--itw-consent-on-action);
	background: var(--itw-consent-action);
}

.itw-consent-button:focus-visible,
.itw-consent-manage:focus-visible,
.itw-consent-preferences input:focus-visible,
.itw-consent-preferences__close:focus-visible {
	outline: 3px solid #ffbf47;
	outline-offset: 3px;
}

.itw-consent-manage {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 99980;
}

.itw-consent-preferences[hidden] { display: none; }
.itw-consent-preferences {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgb(0 0 0 / 55%);
}

.itw-consent-preferences__panel {
	position: relative;
	width: min(100%, 42rem);
	max-height: calc(100vh - 2rem);
	overflow: auto;
	padding: 1.5rem;
	background: var(--itw-consent-bg);
	border-radius: var(--itw-consent-radius);
}

.itw-consent-preferences__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2.75rem;
	height: 2.75rem;
	background: transparent;
	border: 0;
	font-size: 1.75rem;
	cursor: pointer;
}

.itw-consent-preferences__category {
	display: flex;
	gap: 1rem;
	align-items: start;
	justify-content: space-between;
	padding: 1rem 0;
	border-top: 1px solid var(--itw-consent-border);
}

.itw-consent-preferences__category label { font-weight: 700; }
.itw-consent-preferences__category p { margin: 0.25rem 0 0; }
.itw-consent-preferences__category input { width: 1.5rem; height: 1.5rem; flex: none; }

@media (max-width: 48rem) {
	.itw-consent-banner { align-items: stretch; flex-direction: column; }
	.itw-consent-banner__actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.itw-consent *, .itw-consent *::before, .itw-consent *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
