/*
 * Complianz documents ("Your Privacy Choices": the US opt-out notice and its
 * category toggles), loaded only on those pages (inc/assets.php), after the
 * plugin's document.css. Complianz styles the page by ID (#cmplz-document,
 * #cmplz-manage-consent-container), so these rules use the same IDs and win
 * by coming later. The page template runs content full width for block
 * sections; a legal document gets the Form Section's 800px measure, headings
 * a step below the site's section headings, and the consent card's toggle
 * (assets/css/consent.css). Off track slate-75 (3.4:1 on white), on track
 * slate.
 */

.cmplz-document .cambria-page-title {
	margin-bottom: 48px;
}

.cmplz-document .wp-block-post-content {
	box-sizing: content-box;
	max-width: 800px;
	margin: 0 auto;
	padding: 0 var(--cambria-gutter) var(--cambria-section);
}

#cmplz-document {
	color: var(--wp--preset--color--slate);
	font-size: 17px;
	line-height: 1.6;
}

#cmplz-document > p:first-child {
	margin-top: 0;
	font-size: 15px;
}

#cmplz-document h2 {
	margin: 56px 0 16px;
	padding: 0;
	font-size: 22px;
	letter-spacing: 0.14em;
	line-height: 1.3;
	text-transform: uppercase;
}

#cmplz-document h3 {
	margin: 32px 0 12px;
	padding: 0;
	font-size: 18px;
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.35;
	text-transform: none;
}

#cmplz-document p,
#cmplz-document li {
	margin: 0 0 16px;
}

#cmplz-document ul,
#cmplz-document ol {
	margin: 0 0 16px;
	padding-left: 1.25em;
}

#cmplz-document a {
	color: var(--wp--preset--color--honey-text);
	text-underline-offset: 3px;
}

/* Manage your opt-out preferences: one ruled row per category. */
#cmplz-manage-consent-container.cmplz-manage-consent-container {
	margin: 24px 0 32px;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories {
	margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--cloud);
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category,
#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category:not(:last-child) {
	margin: 0;
	padding: 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--cloud);
	border-radius: 0;
	background: transparent;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header {
	grid-template-columns: minmax(0, 1fr) auto 24px;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	background: transparent;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-category-title {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: 17px;
	font-weight: 400;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-always-active {
	color: var(--wp--preset--color--slate);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: var(--wp--custom--letter-spacing--heading-s);
	text-transform: uppercase;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-description {
	padding: 0 40px 16px 0;
	color: var(--wp--preset--color--ink);
	font-size: 16px;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-category-toggle {
	width: 24px;
	height: 24px;
	color: var(--wp--preset--color--slate);
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-category-toggle:focus-visible {
	outline: var(--wp--custom--focus--ring-width) solid var(--wp--custom--focus--ring-color);
	outline-offset: 2px;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-icon.cmplz-open {
	display: block;
	width: 18px;
	height: 18px;
	background: currentcolor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") center / contain no-repeat;
	transition: none;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-icon.cmplz-open svg {
	display: none;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-category-toggle[aria-expanded="true"] .cmplz-icon.cmplz-open {
	transform: rotate(180deg);
}

/* Toggle: the real checkbox sits invisibly over a 36x20 track, so it keeps
 * its label, keyboard focus and click target. */
#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox {
	position: relative;
	display: inline-flex;
	width: 36px;
	height: 20px;
}

/* Functional can't be switched off: "Always active" replaces its toggle. */
#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category.cmplz-functional .cmplz-category-header .cmplz-banner-checkbox {
	display: none;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox input.cmplz-consent-checkbox {
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox .cmplz-label {
	position: relative;
	display: block;
	width: 36px;
	height: 20px;
	margin: 0;
	padding: 0;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox .cmplz-label::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 10px;
	background: var(--wp--preset--color--slate-75);
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox .cmplz-label::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox input.cmplz-consent-checkbox:checked + .cmplz-label::before {
	background: var(--wp--preset--color--slate);
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox input.cmplz-consent-checkbox:checked + .cmplz-label::after {
	left: 19px;
}

#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox input.cmplz-consent-checkbox:focus-visible + .cmplz-label::before {
	box-shadow: 0 0 0 2px var(--wp--preset--color--white), 0 0 0 4px var(--wp--custom--focus--ring-color);
}

@media (prefers-reduced-motion: no-preference) {

	#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox .cmplz-label::before,
	#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-banner-checkbox .cmplz-label::after,
	#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-icon.cmplz-open {
		transition: background-color 0.15s ease, left 0.15s ease, transform 0.15s ease;
	}
}

@media (max-width: 599px) {

	.cmplz-document .cambria-page-title {
		margin-bottom: 32px;
	}

	#cmplz-document {
		font-size: 16px;
	}

	#cmplz-document h2 {
		margin-top: 40px;
		font-size: 19px;
		letter-spacing: 0.1em;
	}

	#cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-description {
		padding-right: 0;
	}
}
