/* Cookie banner (Complianz) in the site's own look.
   Complianz writes most of the banner's stylesheet from its settings (palette, square corners, button colours,
   width: Complianz > Cookie banner, set by `setup`, inc/consent.php). This file adds what those settings cannot say
   and loads after it. Black and white only: Accept and Deny are both black with white text; there is no gold in the banner
   (gold is for conversion buttons). No motion: the banner and its categories appear instantly. */

.cmplz-cookiebanner,
.cmplz-cookiebanner button,
.cmplz-cookiebanner a,
.cmplz-manage-consent-container,
.cmplz-manage-consent-container button {
	font-family: var(--font);
}

/* Heading on the left, the close button on the right, both tap-sized. */
.cmplz-cookiebanner .cmplz-header { grid-template-columns: 1fr auto; }
.cmplz-cookiebanner .cmplz-title { grid-column-start: 1; justify-self: start; font-size: 16px; font-weight: 500; }
.cmplz-cookiebanner .cmplz-close {
	grid-column-start: 2;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	line-height: 1;
}
.cmplz-cookiebanner .cmplz-close svg { width: 16px; height: 16px; }
.cmplz-cookiebanner .cmplz-close:hover { font-size: inherit; line-height: 1; }

/* Plain ink instead of green; the category panels are the site's light grey with a hairline. */
.cmplz-cookiebanner .cmplz-categories .cmplz-category { background: var(--lift); border: 1px solid var(--hair); }
.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-always-active { color: var(--ink-2); }
.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header { grid-template-columns: 1fr auto 32px; } /* room for the 32px toggle (Complianz allows 25px) */
.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header .cmplz-category-toggle { min-width: 32px; min-height: 32px; }

/* Links in the list at the foot: a 24px target. */
.cmplz-cookiebanner .cmplz-links .cmplz-link { display: inline-flex; align-items: center; min-height: 24px; text-underline-offset: 3px; }

/* The same visible focus ring as the rest of the site (ink, 2px, 2px clear). */
.cmplz-cookiebanner :focus-visible,
.cmplz-manage-consent-container :focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* No motion (the site allows two effects, and neither is the cookie banner). */
.cmplz-cookiebanner,
.cmplz-cookiebanner *,
.cmplz-manage-consent-container,
.cmplz-manage-consent-container * {
	animation: none !important;
	transition: none !important;
}

/* Phones and short landscape screens: a compact sheet at the foot, about a quarter of the screen. The heading row is
   reduced to the close button in the corner, Accept and Deny sit side by side, and Preferences is a text link under them. */
@media (max-width: 767px), (max-height: 500px) {
	/* Complianz's own short-screen rule (max-height 400px) stretches the banner to the full height and zooms it to 60%,
	   which left a blank block and 15px buttons on landscape phones: keep the sheet its natural height, scrolling only
	   when Preferences is open. */
	.cmplz-cookiebanner { padding: 12px 16px !important; grid-gap: 8px; display: grid; height: auto; max-height: calc(100vh - 20px); overflow-y: auto; zoom: 1; }
	/* The heading row takes no space: the title is kept for screen readers (it names the dialog) and the close button,
	   where Complianz puts the keyboard focus, sits in the top corner beside the message. */
	.cmplz-cookiebanner .cmplz-divider-header { display: none; }
	.cmplz-cookiebanner .cmplz-header { display: block; height: 0; }
	.cmplz-cookiebanner .cmplz-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
	.cmplz-cookiebanner .cmplz-close { position: absolute; top: 6px; right: 6px; zoom: 1 !important; }
	.cmplz-cookiebanner .cmplz-body { overflow-x: hidden; margin-top: 0 !important; }
	.cmplz-cookiebanner .cmplz-message { padding-right: 32px; }
	.cmplz-cookiebanner .cmplz-divider { margin-left: -16px; margin-right: -16px; }
	.cmplz-cookiebanner .cmplz-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px !important; }
	/* !important only to undo Complianz's own short-screen rule (14px-high buttons with 8px text, all !important). */
	.cmplz-cookiebanner .cmplz-buttons .cmplz-btn { width: 100%; margin: 0; height: auto !important; min-height: 44px !important; padding: 8px 12px !important; font-size: 15px !important; line-height: 1.2 !important; white-space: normal !important; zoom: 1 !important; }
	.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-view-preferences,
	.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-save-preferences { grid-column: 1 / -1; }
	.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-view-preferences { min-height: 32px !important; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }
}

/* Landscape phones: Preferences joins Accept and Deny on one row, so the sheet stays under half of a 340px-high screen. */
@media (max-height: 500px) and (min-width: 560px) {
	.cmplz-cookiebanner .cmplz-buttons { grid-template-columns: 1fr 1fr auto; }
	.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-view-preferences { grid-column: auto; min-height: 44px !important; }
}

/* The cookie policy page: Complianz's generated document set in the site's legal text layout (17px text, the same headings). */
.legal-body #cmplz-document { max-width: none; font-size: inherit; line-height: inherit; }
.legal-body #cmplz-document p,
.legal-body #cmplz-document li { font-size: inherit; line-height: inherit; margin: 0 0 14px; }
.legal-body #cmplz-document ul { margin: 0 0 14px; }
.legal-body #cmplz-document h2 { font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; line-height: 1.15; margin: 40px 0 12px; }
.legal-body #cmplz-document h3 { font-size: 20px; font-weight: 500; line-height: 1.25; margin: 28px 0 10px; }
.legal-body #cmplz-document a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal-body #cmplz-document .cmplz-manage-consent-container,
.legal-body #cmplz-document .cmplz-manage-consent-container * { font-size: 15px; }

/* Cookie Policy, "Placed cookies": the service name alone in the row header (each cookie's purpose is
   listed when the row opens), no empty "Usage" block, and no stub of the per-service consent toggle, which this site doesn't use. */
.cmplz-dropdown-cookiepolicy summary.cmplz-service-header > div > p,
.cmplz-dropdown-cookiepolicy .cmplz_consent_per_service_label{display:none}
.cmplz-dropdown-cookiepolicy .cmplz-service-description:has(> p:empty){display:none}
.cmplz-dropdown-cookiepolicy summary.cmplz-service-header > div{display:flex;align-items:center}
.cmplz-dropdown-cookiepolicy summary.cmplz-service-header h3{text-align:left;margin:0}
.cmplz-dropdown-cookiepolicy summary.cmplz-service-header .cmplz-accept-service{display:none}
