/*  Complianz consent banner, aligned to the board.

	The palette itself is NOT set here — it lives in the plugin's own banner
	record, so Complianz regenerates its stylesheet with the right colours and a
	plugin update or a settings change does not undo the theme. This file only
	covers what that palette does not reach: the typeface, the spacing and the
	button proportions from the board.

	Board reference: cookie overlay on node 26:3 — card #131A16 on a 1px #28312C
	border, radius 2, title 15/600, body 13/1.52, buttons 13 at 12/18. */

/*  Everything below is what the variables do not reach. */

.cmplz-cookiebanner,
#cmplz-manage-consent .cmplz-manage-consent {
	font-family: var(--ek-font);
	box-shadow: var(--ek-shadow-cookie);
}

/*  Corner is the plugin's setting; only the viewport clamp is ours. */
.cmplz-cookiebanner {
	max-width: calc(100vw - var(--ek-gutter));
}

.cmplz-cookiebanner .cmplz-title {
	font-size: var(--cmplz_title_font_size);
	font-weight: 600;
	letter-spacing: -0.002em;
	color: var(--ek-text);
}

.cmplz-cookiebanner .cmplz-message {
	line-height: 1.52;
	color: var(--ek-text-soft);
}

.cmplz-cookiebanner .cmplz-close {
	color: var(--ek-text-muted);
}

.cmplz-cookiebanner .cmplz-close:hover {
	color: var(--ek-text);
}

.cmplz-cookiebanner .cmplz-divider {
	background-color: var(--ek-line);
	border: 0;
	height: 1px;
}

.cmplz-cookiebanner .cmplz-category {
	background-color: var(--ek-bg-mid);
	border: 1px solid var(--ek-line);
	border-radius: var(--ek-radius);
}

.cmplz-cookiebanner .cmplz-category-title {
	color: var(--ek-text);
	font-weight: 500;
}

.cmplz-cookiebanner .cmplz-description {
	color: var(--ek-text-soft);
	line-height: 1.5;
}

.cmplz-cookiebanner .cmplz-category-toggle {
	color: var(--ek-text-muted);
}

.cmplz-cookiebanner .cmplz-links a,
.cmplz-cookiebanner .cmplz-documents a {
	color: var(--ek-text-muted);
	font-size: var(--cmplz_link_font_size);
}

.cmplz-cookiebanner .cmplz-links a:hover,
.cmplz-cookiebanner .cmplz-documents a:hover {
	color: var(--ek-accent-text);
}

/*  Buttons: the plugin's own padding is tuned for a 15px label; the board's is
	12/18 on a 13px label. */
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	padding: 12px 18px;
	font-weight: 600;
	line-height: 1.2;
	border-width: 1px;
	border-style: solid;
	transition: background-color var(--ek-dur) var(--ek-ease),
		border-color var(--ek-dur) var(--ek-ease);
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-accept:hover {
	background-color: var(--ek-accent-dot);
	border-color: var(--ek-accent-dot);
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-deny:hover,
.cmplz-cookiebanner .cmplz-buttons .cmplz-view-preferences:hover,
.cmplz-cookiebanner .cmplz-buttons .cmplz-save-preferences:hover {
	border-color: var(--ek-text-soft);
}

/*  The persistent "Manage consent" tab. */
#cmplz-manage-consent .cmplz-manage-consent {
	color: var(--ek-text-soft);
	font-size: var(--cmplz_link_font_size);
	font-weight: 500;
	border-color: var(--ek-line);
}

#cmplz-manage-consent .cmplz-manage-consent:hover {
	color: var(--ek-text);
}

@media (max-width: 767px) {
	:root {
		--cmplz_banner_margin: 24px;
	}

	.cmplz-cookiebanner .cmplz-header,
	.cmplz-cookiebanner .cmplz-body,
	.cmplz-cookiebanner .cmplz-buttons,
	.cmplz-cookiebanner .cmplz-links,
	.cmplz-cookiebanner .cmplz-documents {
		padding-inline: 20px;
	}
}

/*  Header alignment.
	.cmplz-header is a three-column grid: logo | title | close, with the title
	centred in the middle column. Text-align cannot move a centred grid item, so
	the title is moved into the first column instead and the empty logo slot is
	removed — that empty div was what pushed the heading off the text edge. */
.cmplz-cookiebanner .cmplz-logo:empty {
	display: none;
}

.cmplz-cookiebanner .cmplz-title {
	grid-column: 1 / 2;
	justify-self: start;
	text-align: left;
}

/*  One inline edge for every region, so the title, the copy, the buttons and
	the links all start on the same vertical line. */
.cmplz-cookiebanner .cmplz-header,
.cmplz-cookiebanner .cmplz-body,
.cmplz-cookiebanner .cmplz-buttons,
.cmplz-cookiebanner .cmplz-links,
.cmplz-cookiebanner .cmplz-documents {
	padding-inline: 26px;
}

.cmplz-cookiebanner .cmplz-links,
.cmplz-cookiebanner .cmplz-documents {
	justify-content: flex-start;
}

.cmplz-cookiebanner .cmplz-documents ul,
.cmplz-cookiebanner .cmplz-links ul {
	display: flex;
	gap: 20px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.cmplz-cookiebanner .cmplz-close {
	border: 0;
	background: none;
	padding: 0;
	width: 18px;
	height: 18px;
	flex: none;
}

.cmplz-cookiebanner .cmplz-close svg {
	width: 11px;
	height: 11px;
}

/*  With the logo slot removed the header only needs two columns: the title
	takes the free space, the close control sits at the end. Without this the
	title inherits the narrow column the logo used to occupy and wraps. */
.cmplz-cookiebanner .cmplz-header {
	grid-template-columns: 1fr auto;
	align-items: center;
	max-height: none;
}

.cmplz-cookiebanner .cmplz-close {
	grid-column: 2 / 3;
	justify-self: end;
}

/*  Link rows: the plugin centres them; the board runs everything off the same
	left edge. The list itself is the flex container, so it is the one to move. */
.cmplz-cookiebanner .cmplz-links,
.cmplz-cookiebanner .cmplz-documents {
	display: block;
	text-align: left;
}

.cmplz-cookiebanner .cmplz-links ul,
.cmplz-cookiebanner .cmplz-documents ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*  The title is a two-word phrase in a fixed-width dialog; letting it wrap
	pushes the close control down and the header gains a second line. It only
	needs to wrap on a narrow phone, so the guard is lifted below 480px. */
.cmplz-cookiebanner .cmplz-title,
#cmplz-manage-consent .cmplz-manage-consent {
	white-space: nowrap;
}

@media (max-width: 479px) {
	.cmplz-cookiebanner .cmplz-title {
		white-space: normal;
	}
}

/*  Complianz hides the dialog title below 425px, leaving a header that is just
	a close button. The board keeps it on the 390 board, and a modal without a
	visible name is also worse for screen readers, so it comes back. */
@media (max-width: 425px) {
	.cmplz-cookiebanner .cmplz-header .cmplz-title {
		display: block;
	}
}
