/*
 * Nutritional Journeys: supplementary styles.
 *
 * Only what theme.json and the styles/ partials cannot express lives here.
 * Every colour, font and size comes from a preset custom property, so
 * changes made in the Site Editor carry through.
 */

/* ---- Typography details ---------------------------------------- */

:where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
}

:where(p, li) {
	text-wrap: pretty;
}

/* ---- Focus: visible, on-brand, never removed -------------------- */

/* Zero specificity, so any component's own focus style wins. */
:where(a, button, input, textarea, select, summary, [tabindex]):where(:focus-visible) {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* ---- Buttons: smooth state changes ------------------------------- */

.wp-element-button,
.wp-block-button__link {
	transition:
		background-color var(--wp--custom--transition),
		color var(--wp--custom--transition),
		border-color var(--wp--custom--transition),
		box-shadow var(--wp--custom--transition);
}

/* ---- Sections: full-bleed bands stay flush against each other ---- */

.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* Also inside page content, where the default block gap would show a strip
   of page background between two bands. A margin set on a block in the
   editor is saved inline, so it still applies. */
main > .alignfull + .alignfull,
.wp-block-post-content > .alignfull + .alignfull {
	margin-block-start: 0;
}

/* ---- Botanical illustrations ------------------------------------- */

.wp-block-nutritional-journeys-botanical {
	display: flex;
	line-height: 0;
}

.wp-block-nutritional-journeys-botanical.aligncenter {
	justify-content: center;
}

.wp-block-nutritional-journeys-botanical.alignright {
	justify-content: flex-end;
}

.wp-block-nutritional-journeys-botanical svg,
.nj-site-mark svg {
	display: block;
	width: var(--nj-art-size, 120px);
	max-width: 100%;
	height: auto;
}

/* Watermark: a large, faint plant behind the section it sits in. */
:where(.wp-block-group, .wp-block-cover):has(> .is-nj-watermark) {
	position: relative;
	overflow: hidden;
}

:where(.wp-block-group, .wp-block-cover):has(> .is-nj-watermark) > :not(.is-nj-watermark) {
	position: relative;
	z-index: 1;
}

.wp-block-nutritional-journeys-botanical.is-nj-watermark {
	position: absolute;
	z-index: 0;
	width: clamp(260px, 38vw, 520px);
	max-width: none;
	margin: 0 !important;
	opacity: 0.055;
	filter: blur(1.4px);
	pointer-events: none;
}

.is-nj-watermark svg {
	width: 100%;
}

.is-nj-watermark.is-watermark-left {
	top: -12%;
	left: -6%;
	transform: rotate(-8deg);
}

.is-nj-watermark.is-watermark-right {
	right: -6%;
	bottom: -14%;
	transform: rotate(9deg);
}

.is-style-section-deep > .is-nj-watermark {
	opacity: 0.085;
}

@media (max-width: 760px) {
	.wp-block-nutritional-journeys-botanical.is-nj-watermark {
		width: min(70vw, 300px);
		opacity: 0.04;
	}
}

@media (prefers-reduced-motion: reduce) {
	.is-nj-watermark {
		filter: none;
	}
}

/* ---- Sticky header ------------------------------------------------- */

html {
	scroll-padding-top: var(--nj-header-height, 0px);
}

.wp-site-blocks > header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}

/* On phones the admin bar scrolls away, so the header sticks to the top. */
@media (max-width: 600px) {
	.wp-site-blocks > header {
		top: 0;
	}
}

.nj-header {
	transition: box-shadow var(--wp--custom--transition);
}

/* The header keeps its height while scrolling: resizing a sticky header
 * moves everything below it, which made the page jump. */

/* ---- Back to top (design from the comps) --------------------------- */

.nj-to-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 80;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--button);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, background-color var(--wp--custom--transition);
}

.nj-to-top.is-on {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* Not over the open mobile menu (core sets has-modal-open) or a dialog. */
.has-modal-open .nj-to-top,
.nj-dialog-open .nj-to-top {
	visibility: hidden;
	opacity: 0;
}

.nj-to-top:hover,
.nj-to-top:focus-visible {
	background-color: var(--wp--preset--color--primary-deep);
	border-color: var(--wp--preset--color--primary-deep);
}

.nj-to-top:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.nj-to-top {
		right: 0.9rem;
		bottom: 0.9rem;
		width: 42px;
		height: 42px;
	}
}

/* ---- Discovery call popup ------------------------------------------ */

/* The card itself never scrolls (a scrollbar on its edge cuts through the
   rounded corners); its body does, inside the padding. */
.nj-dialog {
	box-sizing: border-box;
	width: min(940px, calc(100% - 2rem));
	max-width: none;
	max-height: calc(100dvh - 2rem);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--wp--custom--radius--panel);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--photo);
}

.nj-dialog::backdrop {
	background: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

.nj-dialog-open {
	overflow: hidden;
}

.nj-dialog__close {
	position: absolute;
	top: 0.8rem;
	right: 0.8rem;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--mint-wash);
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	transition: background-color var(--wp--custom--transition);
}

.nj-dialog__close:hover {
	background: var(--wp--preset--color--mint);
}

.nj-dialog__body {
	box-sizing: border-box;
	max-height: calc(100dvh - 2rem);
	padding: var(--wp--preset--spacing--50);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--mint) transparent;
}

.nj-dialog .nj-popup > h2 {
	margin-block-start: 0.3rem;
	font-size: var(--wp--preset--font-size--xx-large);
}

/* Room for the close button beside the opening lines. */
.nj-dialog .nj-popup > :nth-child(-n + 2) {
	padding-inline-end: 2.75rem;
}

/* Compact form inside the popup: name and email side by side, shorter
   fields and message box. The contact page keeps the roomy version. */
.nj-dialog .nj-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.nj-dialog .nj-form > * {
	grid-column: 1 / -1;
}

.nj-dialog .nj-form > .nj-field:nth-of-type(2),
.nj-dialog .nj-form > .nj-field:nth-of-type(3) {
	grid-column: auto;
}

.nj-dialog .nj-form :is(input:not([type="submit"]), textarea, select) {
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.nj-dialog .nj-form textarea {
	min-height: var(--wp--custom--form--compact-message-height);
	height: var(--wp--custom--form--compact-message-height);
}

/* Wide screens: the introduction on the left, the form on the right. */
@media (min-width: 820px) {
	.nj-dialog .nj-popup {
		display: grid;
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
		column-gap: var(--wp--preset--spacing--60);
		align-items: start;
	}

	.nj-dialog .nj-popup > * {
		grid-column: 1;
		margin-block-start: 0;
	}

	.nj-dialog .nj-popup > :not(.wpcf7) + :not(.wpcf7) {
		margin-block-start: var(--wp--preset--spacing--30);
	}

	.nj-dialog .nj-popup > .wpcf7 {
		grid-column: 2;
		grid-row: 1 / span 20;
	}

	/* The close button sits above the form column, not the introduction. */
	.nj-dialog .nj-popup > :nth-child(-n + 2) {
		padding-inline-end: 0;
	}

	.nj-dialog .nj-popup > .wpcf7 {
		padding-top: var(--wp--preset--spacing--40);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.nj-dialog[open] {
		animation: nj-dialog-in 0.22s ease;
	}

	@keyframes nj-dialog-in {
		from {
			opacity: 0;
			transform: translateY(12px);
		}
	}
}

@media (max-width: 600px) {
	.nj-dialog__body {
		padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40) var(--wp--preset--spacing--40);
	}

	.nj-dialog .nj-form > .nj-field:nth-of-type(2),
	.nj-dialog .nj-form > .nj-field:nth-of-type(3) {
		grid-column: 1 / -1;
	}
}

/* ---- Header ------------------------------------------------------ */

.nj-site-mark {
	color: var(--wp--preset--color--primary);
	line-height: 0;
}

.nj-header .wp-block-site-title {
	white-space: nowrap;
}

.nj-header__nav .wp-block-navigation-item__content {
	padding-bottom: 3px;
	border-bottom: 1px solid transparent;
	white-space: nowrap;
	transition: color var(--wp--custom--transition), border-color var(--wp--custom--transition);
}

.nj-header__nav .wp-block-navigation-item__content:hover,
.nj-header__nav .current-menu-item > .wp-block-navigation-item__content,
.nj-header__nav .current-menu-ancestor > .wp-block-navigation-item__content,
.nj-header__nav [aria-current="page"] {
	color: var(--wp--preset--color--primary);
	border-bottom-color: currentColor;
}

/* The overlay menu is its own screen: left-aligned serif links, no underline rule. */
.nj-header__nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40) var(--wp--style--root--padding-right) var(--wp--preset--spacing--40) var(--wp--style--root--padding-left);
}

.nj-header__nav .is-menu-open .wp-block-navigation__responsive-container-content,
.nj-header__nav .is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	gap: var(--wp--preset--spacing--30) !important;
}

.nj-header__nav .is-menu-open .wp-block-navigation-item__content {
	border-bottom: 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 300;
	line-height: 1.2;
	color: inherit;
}

.nj-header__nav .is-menu-open .current-menu-item > .wp-block-navigation-item__content,
.nj-header__nav .is-menu-open .current-menu-ancestor > .wp-block-navigation-item__content,
.nj-header__nav .is-menu-open [aria-current="page"] {
	color: var(--wp--preset--color--primary);
}

/* Tablet: one row, the brand on the left and the call button and menu
 * button on the right. The links open in the same full-screen menu as on
 * phones, so they are never squeezed or wrapped. */
@media (max-width: 1300px) {
	/* Two classes outrank the single-class layout rule, no !important needed. */
	.nj-header .nj-header__bar {
		row-gap: var(--wp--preset--spacing--30);
	}

	/* Two classes: the flex layout's own rule resets child margins. */
	.nj-header .nj-header__brand {
		margin-right: auto;
	}

	.nj-header__cta {
		order: 2;
	}

	.nj-header__nav {
		order: 3;
		flex: 0 0 auto;
	}
}

/* Core shows the links inline from 600px up; between 600px and 1300px the
 * menu button is used instead. */
@media (min-width: 600px) and (max-width: 1300px) {
	.nj-header__nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.nj-header__nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.nj-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		display: flex;
	}
}

/* Phone: brand and menu button on one row, the call button full width below. */
@media (max-width: 599px) {
	.nj-header .wp-block-site-title {
		font-size: var(--wp--preset--font-size--x-large);
	}

	.nj-header__nav {
		order: 2;
	}

	.nj-header__cta {
		order: 3;
		flex-basis: 100%;
	}

	.nj-header__cta .wp-block-button,
	.nj-header__cta .wp-block-button__link {
		width: 100%;
		text-align: center;
	}
}

/* ---- Deep green section: nested styles adapt to the dark ground ---
 * Generated block-style rules all share :root :where() specificity, so a
 * nested card or eyebrow would otherwise win over the section and render
 * white-on-white. These selectors outrank them; colours still come from
 * the palette.
 */

.is-style-section-deep :is(.is-style-eyebrow, .is-style-lede) {
	color: color-mix(in srgb, var(--wp--preset--color--base) 93%, transparent);
}

.is-style-section-deep .is-style-card {
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 8%, transparent);
	border-color: color-mix(in srgb, var(--wp--preset--color--base) 20%, transparent);
	color: inherit;
}

.is-style-section-deep .is-style-card:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--base) 40%, transparent);
	box-shadow: none;
}

.is-style-section-deep .is-style-card :is(.is-style-eyebrow, .is-style-lede),
.is-style-section-deep .is-style-testimonial cite {
	/* Over the card's translucent fill, 93% white drops below 4.5:1. */
	color: var(--wp--preset--color--base);
	opacity: 1;
}

.is-style-section-deep .wp-block-button.is-style-outline > .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--base);
	border-color: color-mix(in srgb, var(--wp--preset--color--base) 65%, transparent);
}

.is-style-section-deep .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.is-style-section-deep .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 12%, transparent);
	color: var(--wp--preset--color--base);
}

/* The default focus ring is primary green: invisible on this ground. */
.is-style-section-deep :where(a, button, .wp-element-button, .wp-block-button__link):focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* ---- Cards with photos: image sits flush inside the rounded card -- */

.nj-post-card,
.nj-photo-card {
	overflow: hidden;
}

.nj-photo-card img {
	transition: transform 0.35s ease;
}

.nj-photo-card:hover img {
	transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
	.nj-photo-card:hover img {
		transform: none;
	}
}

/* "Category · Month Year" */
.nj-post-meta > * + *::before {
	content: "\00B7";
	margin-right: 0.4em;
}

/* ---- Credentials: logos sit in the same slot as the badge icons -- */

.nj-cred-logo {
	display: flex;
	align-items: center;
	min-height: var(--wp--custom--logo--slot);
	margin: 0;
}

.nj-cred-logo img {
	max-width: 100%;
	object-fit: contain;
}

/* ---- Corporate talks: icon, text and button share one row -------- */

.nj-corp > .wp-block-group {
	flex: 1 1 var(--wp--custom--measure--corp-text);
}

/* ---- Image focal point (inc/image-focus.php) ------------------------
   Pages get the position inline on the image; the editor previews it
   through this variable on the block wrapper. Centre by default. */

.wp-block-image img {
	object-position: var(--nj-focal-point, 50% 50%);
}

/* ---- Page header quotation (How I can help) ----------------------- */

.nj-page-header .nj-header-quote {
	margin-inline: 0;
	color: var(--wp--preset--color--primary-deep);
}

.nj-page-header .nj-header-quote p {
	margin: 0;
}

.nj-page-header .nj-header-quote cite {
	display: block;
	margin-top: var(--wp--preset--spacing--10);
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-style: normal;
	color: var(--wp--preset--color--muted);
}

/* ---- Pricing: buttons line up along the bottom of the cards ------ */

.nj-push-end {
	margin-top: auto !important;
}

/* Full-width tier buttons. Done in CSS because the Button block's width
 * setting is saved differently in WP 6.9 (attribute) and 7.x (dimensions). */
.nj-tier .wp-block-button,
.nj-tier .wp-block-button__link {
	width: 100%;
	text-align: center;
}

.nj-measure-centre {
	max-width: var(--wp--custom--measure--note);
	margin-inline: auto !important;
}

/* ---- Contact form (Contact Form 7) --------------------------------- */

.nj-form {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

.nj-form p {
	margin: 0;
}

.nj-field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.nj-field label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--muted);
}

.nj-form :is(input:not([type="submit"]), textarea, select) {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	/* Never below 1rem: iOS Safari zooms into smaller inputs on focus. */
	font-size: max(1rem, var(--wp--preset--font-size--body-small));
	color: var(--wp--preset--color--ink);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--field);
	padding: 0.9rem 1.1rem;
	transition: border-color var(--wp--custom--transition);
}

.nj-form :is(input, textarea, select)::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

.nj-form :is(input:not([type="submit"]), textarea, select):focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}

.nj-form textarea {
	min-height: 9rem;
	resize: vertical;
}

/* Privacy agreement checkbox. */
.nj-field--consent .wpcf7-list-item {
	margin: 0;
}

.nj-field--consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	font-size: var(--wp--preset--font-size--body-small);
	color: var(--wp--preset--color--muted);
	cursor: pointer;
}

.nj-field--consent input[type="checkbox"] {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	margin: 0.2rem 0 0;
	accent-color: var(--wp--preset--color--primary);
}

.nj-field--consent .wpcf7-not-valid-tip {
	margin-left: 1.8rem;
}

.nj-form__note {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* The submit is an <input>; give it the theme's button look. */
.nj-form .wpcf7-submit {
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--primary);
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--pill);
	padding: 1.05rem 2.1rem;
	cursor: pointer;
	transition:
		background-color var(--wp--custom--transition),
		box-shadow var(--wp--custom--transition);
}

.nj-form .wpcf7-submit:hover,
.nj-form .wpcf7-submit:focus-visible {
	background-color: var(--wp--preset--color--primary-deep);
	border-color: var(--wp--preset--color--primary-deep);
	box-shadow: var(--wp--preset--shadow--button);
}

.nj-form .wpcf7-submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

.nj-form .wpcf7-submit:disabled {
	cursor: progress;
	opacity: 0.7;
}

/* Validation and status messages. */
/* Same specificity as the field rule above, and later, so it wins. */
.nj-form :is(input:not([type="submit"]), textarea, select).wpcf7-not-valid {
	border-color: var(--wp--preset--color--alert);
}

.wpcf7 .wpcf7-not-valid-tip {
	margin-top: 0.35rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--alert);
}

/* Status box. CF7's own stylesheet loads after the theme's, so these rules
 * carry one extra class (form.wpcf7-form) to outrank its colours. */
.wpcf7 form.wpcf7-form .wpcf7-response-output {
	margin: 1.25rem 0 0;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--field);
	font-size: var(--wp--preset--font-size--body-small);
}

.wpcf7 form.wpcf7-form.sent .wpcf7-response-output {
	border-color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--mint-wash);
}

.wpcf7 form.wpcf7-form:is(.invalid, .unaccepted, .payment-required, .failed, .aborted, .spam) .wpcf7-response-output {
	border-color: var(--wp--preset--color--alert);
	background-color: var(--wp--preset--color--base);
}

.nj-divider {
	opacity: 0.5;
}

.nj-form-missing {
	padding: 1rem 1.2rem;
	border: 1px dashed var(--wp--preset--color--sand-line);
	border-radius: var(--wp--custom--radius--field);
}

/* ---- Article text ------------------------------------------------ */

.nj-article-body :where(h2, h3) {
	margin-top: var(--wp--preset--spacing--50);
}

/* Headings inside an article read as subheadings, not section titles. */
.nj-article-body :where(h2) {
	font-size: var(--wp--preset--font-size--x-large);
}

.nj-article-body :where(h3) {
	font-size: var(--wp--preset--font-size--large);
}

.nj-article-body > :first-child {
	margin-top: 0;
}

/* The side card stays in view while reading on wide screens. */
@media (min-width: 782px) {
	.nj-article-layout > .wp-block-column:last-child {
		align-self: stretch;
	}

	.nj-article-aside {
		position: sticky;
		top: calc(var(--nj-header-height, 0px) + var(--wp-admin--admin-bar--height, 0px) + var(--wp--preset--spacing--40));
	}
}

.nj-article-aside .wp-block-button,
.nj-article-aside .wp-block-button__link {
	width: 100%;
	text-align: center;
}

/* Readable line length for introductions beside a photo. */
.nj-measure {
	max-width: 46ch;
}

/* ---- Footer ------------------------------------------------------ */


/* On the green band the default (darker green) hover would disappear. */
.nj-footer a:where(:not(.wp-element-button)):hover,
.nj-footer a:where(:not(.wp-element-button)):focus-visible {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---- Legal pages ------------------------------------------------- */

/* The "draft for review" note: hard to miss, and deleted by the client once
   the wording is final. */
.nj-draft-notice {
	border-inline-start: 4px solid var(--wp--preset--color--alert);
}

/* ---- Cookie consent banner (Complianz) ----------------------------
   The plugin sets these variables on :root; setting them on its own
   containers wins without depending on stylesheet order, so the banner
   follows the palette on every site with no plugin colour settings. */

#cmplz-cookiebanner-container,
#cmplz-manage-consent {
	--cmplz_banner_background_color: var(--wp--preset--color--base);
	--cmplz_banner_border_color: var(--wp--preset--color--line);
	--cmplz_banner_border_radius: var(--wp--custom--radius--card);
	--cmplz_text_color: var(--wp--preset--color--ink);
	--cmplz_hyperlink_color: var(--wp--preset--color--primary);
	--cmplz_title_font_size: var(--wp--preset--font-size--medium);
	--cmplz_text_font_size: var(--wp--preset--font-size--small);
	--cmplz_link_font_size: var(--wp--preset--font-size--small);
	--cmplz_category_body_font_size: var(--wp--preset--font-size--small);
	--cmplz_button_font_size: var(--wp--preset--font-size--small);
	--cmplz_button_border_radius: var(--wp--custom--radius--pill);
	--cmplz_button_accept_background_color: var(--wp--preset--color--primary);
	--cmplz_button_accept_border_color: var(--wp--preset--color--primary);
	--cmplz_button_accept_text_color: var(--wp--preset--color--base);
	--cmplz_button_deny_background_color: var(--wp--preset--color--base);
	--cmplz_button_deny_border_color: var(--wp--preset--color--primary);
	--cmplz_button_deny_text_color: var(--wp--preset--color--primary);
	--cmplz_button_settings_background_color: var(--wp--preset--color--base);
	--cmplz_button_settings_border_color: var(--wp--preset--color--line);
	--cmplz_button_settings_text_color: var(--wp--preset--color--ink);
	--cmplz_category_header_always_active_color: var(--wp--preset--color--primary);
	--cmplz_slider_active_color: var(--wp--preset--color--primary);
	--cmplz_slider_inactive_color: var(--wp--preset--color--muted);
}

#cmplz-cookiebanner-container .cmplz-cookiebanner {
	font-family: inherit;
	box-shadow: var(--wp--preset--shadow--photo);
}

#cmplz-cookiebanner-container .cmplz-title {
	font-family: var(--wp--preset--font-family--newsreader, inherit);
}

#cmplz-cookiebanner-container .cmplz-btn {
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition);
}

#cmplz-cookiebanner-container .cmplz-btn.cmplz-accept:hover {
	--cmplz_button_accept_background_color: var(--wp--preset--color--primary-deep);
	--cmplz_button_accept_border_color: var(--wp--preset--color--primary-deep);
}

#cmplz-cookiebanner-container .cmplz-btn.cmplz-deny:hover,
#cmplz-cookiebanner-container .cmplz-btn.cmplz-view-preferences:hover,
#cmplz-cookiebanner-container .cmplz-btn.cmplz-save-preferences:hover {
	--cmplz_button_deny_background_color: var(--wp--preset--color--mint-wash);
	--cmplz_button_settings_background_color: var(--wp--preset--color--mint-wash);
}

/* The "Manage consent" tab reads the banner's text and background
   variables; give it the button colours instead. */
#cmplz-manage-consent {
	--cmplz_banner_background_color: var(--wp--preset--color--primary);
	--cmplz_text_color: var(--wp--preset--color--base);
}

#cmplz-manage-consent .cmplz-manage-consent {
	font-family: inherit;
}

/* Not over the popup or the open mobile menu. */
.nj-dialog-open #cmplz-manage-consent,
.has-modal-open #cmplz-manage-consent {
	visibility: hidden;
}

/* ---- Reduced motion --------------------------------------------- */

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