/*
 * Complianz banner, brought onto the uBind design system.
 *
 * Complianz writes its own banner stylesheet at runtime to
 * /wp-content/uploads/complianz/css/banner-<id>-<consenttype>.css, and that file is regenerated
 * whenever the banner settings change - so it cannot be edited directly. These overrides are
 * loaded from the plugin instead and use !important because they have to win against a
 * stylesheet that is injected after them. See also the site-wide ID-scoped reset, which is the
 * other reason !important is unavoidable here.
 */

/* --- Chrome the banner does not need at this size ------------------------------------- */
/* "Manage Consent" is a heading on a dialog whose purpose is already obvious from its body
   copy, and at 412px wide it costs a whole row plus a divider. The close control lives in the
   same header, so hide the title and the divider rather than the header itself. */
.cmplz-cookiebanner .cmplz-title,
.cmplz-cookiebanner .cmplz-logo,
.cmplz-cookiebanner .cmplz-divider.cmplz-divider-header {
	display: none !important;
}

.cmplz-cookiebanner .cmplz-header {
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* --- Tighter box ---------------------------------------------------------------------- */
.cmplz-cookiebanner {
	padding: 16px !important;
}

.cmplz-cookiebanner .cmplz-body {
	margin: 0 !important;
}

.cmplz-cookiebanner .cmplz-message {
	margin: 0 0 12px !important;
}

.cmplz-cookiebanner .cmplz-divider.cmplz-footer {
	display: none !important;
}

/* --- Buttons on the canonical uBind spec ---------------------------------------------- */
/* emerald-500 on a 999px pill, 14px/22px, 15px weight 500 - the same button used everywhere
   else on the site. Complianz ships #3b29ff on a 6px radius, which reads as another brand. */
.cmplz-cookiebanner .cmplz-btn {
	border-radius: 999px !important;
	padding: 14px 22px !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	border: 0 !important;
}

.cmplz-cookiebanner .cmplz-btn.cmplz-accept {
	background-color: var(--emerald-500, #1fa67a) !important;
	color: #fff !important;
}

.cmplz-cookiebanner .cmplz-btn.cmplz-accept:hover,
.cmplz-cookiebanner .cmplz-btn.cmplz-accept:focus-visible {
	background-color: var(--emerald-600, #128a5f) !important;
}

/* Secondary actions: the site's ghost variant, same pill and metrics. */
.cmplz-cookiebanner .cmplz-btn.cmplz-deny,
.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences,
.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences {
	background-color: transparent !important;
	color: var(--ink-700, #333) !important;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14) !important;
}

.cmplz-cookiebanner .cmplz-btn.cmplz-deny:hover,
.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences:hover,
.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences:hover {
	background-color: rgba(0, 0, 0, 0.04) !important;
}

/* --- Legal document links ------------------------------------------------------------- */
/* Complianz offers a row of legal links under the buttons: Cookie Policy, Privacy Policy and
   Impressum. The whole row used to be hidden here, on the reasoning that it duplicated the
   footer and cost a line on a small banner for links nobody follows from a consent prompt.

   That was right about two of the three and wrong about the first. Privacy Policy really is in
   the footer, and Impressum is a German requirement this site has no document for - it renders
   as the literal string "{title}" and Complianz hides it itself. But the Cookie Policy was in
   NEITHER place: the banner row was hidden here, and the footer's only cookie control was the
   "Cookie Preferences" button. The 2026-09-07 QA found the three Cookie Policy pages with zero
   inbound links from anywhere on the site.

   So the row is back, carrying one link. Complianz fills its href from `page_links` for the
   visitor's own region, which is the part a static link cannot do - an EU visitor gets
   /cookie-policy-eu/. The footer now carries a plain crawlable link to the AU document as well,
   because everything here happens in JavaScript and none of it is visible to a crawler.

   Complianz's own settings control is Appearance > "Legal documents", now stored as true; these
   rules narrow what that shows rather than replacing it. */
.cmplz-cookiebanner .cmplz-documents {
	display: flex !important;
}

.cmplz-cookiebanner .cmplz-documents li:has(.privacy-statement),
.cmplz-cookiebanner .cmplz-documents li:has(.impressum) {
	display: none !important;
}

/* Without :has(), hide the anchors themselves. The empty list items collapse to the flex gap,
   which is the same outcome one row narrower. */
@supports not selector(li:has(a)) {
	.cmplz-cookiebanner .cmplz-documents .cmplz-link.privacy-statement,
	.cmplz-cookiebanner .cmplz-documents .cmplz-link.impressum {
		display: none !important;
	}
}

/* --- Close control: out of flow, text wraps around it ---------------------------------- */
/* With the title hidden, the header is a full-width 380x20 row holding one 20x20 icon, and
   everything to its left is dead space. The banner is position:fixed, so it already forms a
   containing block - lift the header into the corner and the row is reclaimed.

   The message then needs to avoid running under the icon. A floated pseudo-element inside the
   message is what makes the text wrap around it: sized to the icon plus a gap, and exactly one
   line-height tall (18px) so it shortens the first line only and leaves the rest full width. */
.cmplz-cookiebanner .cmplz-header {
	position: absolute !important;
	top: 16px !important;
	right: 16px !important;
	/* block, not the inherited grid: a grid box keeps its column tracks and stays ~200px wide,
	   which would leave an invisible overlay across the text and swallow clicks there. */
	display: block !important;
	width: auto !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	z-index: 2 !important;
	pointer-events: none !important;
}

.cmplz-cookiebanner .cmplz-close {
	pointer-events: auto !important;
}

.cmplz-cookiebanner .cmplz-message::before {
	content: "";
	float: right;
	width: 28px;
	height: 18px;
}
