/* Minao: the cookie consent card (Complianz, PHP-printed markup; owner 2026-11-23: a small, clean card bottom left in
   the brand's look). Complianz's own settings hold the same colours for its admin preview; this file puts the card on
   the design tokens. "body" outranks the plugin's generated sheet, which loads after the theme. */

body .cmplz-cookiebanner {
	width: min(var(--wp--custom--layout--consent-width), calc(100vw - 2 * var(--wp--custom--layout--gutter-mobile)));
	padding: var(--wp--preset--spacing--40);
	gap: var(--wp--preset--spacing--30);
	border-color: var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
	box-shadow: var(--wp--preset--shadow--md);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
}

/* Complianz lifts the card with a black shadow (deeper on hover): the tinted md shadow instead, no hover jump. */
body .cmplz-cookiebanner.cmplz-show,
body .cmplz-cookiebanner.cmplz-show:hover {
	box-shadow: var(--wp--preset--shadow--md);
}

body .cmplz-cookiebanner.cmplz-bottom-left {
	left: var(--wp--preset--spacing--40);
	bottom: var(--wp--preset--spacing--40);
}

body .cmplz-cookiebanner .cmplz-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: var(--wp--custom--line-height--heading);
	color: var(--wp--preset--color--contrast);
}

body .cmplz-cookiebanner .cmplz-message {
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--body);
	color: var(--wp--preset--color--contrast);
}

body .cmplz-cookiebanner .cmplz-buttons {
	gap: var(--wp--preset--spacing--20);
}

body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	min-height: var(--wp--custom--control--min);
	padding: 0 var(--wp--custom--control--padding-x-small);
	border-radius: var(--wp--custom--radius--button);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
	transition: background-color var(--wp--custom--transition--fast), border-color var(--wp--custom--transition--fast);
}

/* Accept and Refuse are the same cocoa pill (refusing is as easy as accepting); Préférences is the outline. */
body .cmplz-cookiebanner .cmplz-buttons :is(.cmplz-accept, .cmplz-deny) {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-accent);
}

body .cmplz-cookiebanner .cmplz-buttons :is(.cmplz-accept, .cmplz-deny):hover {
	background-color: var(--wp--preset--color--primary-strong);
	border-color: var(--wp--preset--color--primary-strong);
}

body .cmplz-cookiebanner .cmplz-buttons :is(.cmplz-view-preferences, .cmplz-save-preferences) {
	background-color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--border-strong);
	color: var(--wp--preset--color--contrast);
}

body .cmplz-cookiebanner .cmplz-buttons :is(.cmplz-view-preferences, .cmplz-save-preferences):hover {
	border-color: var(--wp--preset--color--contrast);
}

body .cmplz-cookiebanner :is(.cmplz-btn, a, .cmplz-category-header, input):focus-visible {
	outline: var(--wp--custom--border--focus) solid var(--wp--preset--color--focus);
	outline-offset: var(--wp--custom--border--focus-offset);
}

body .cmplz-cookiebanner :is(.cmplz-links a, .cmplz-message a) {
	color: var(--wp--preset--color--link);
	font-size: var(--wp--preset--font-size--x-small);
}

/* The policy links under the buttons: a 44px target, same small text. */
body .cmplz-cookiebanner .cmplz-documents .cmplz-link {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--control--min);
}

body .cmplz-cookiebanner .cmplz-documents {
	margin-block: calc(var(--wp--preset--spacing--20) * -1);
}

/* A document Complianz has not created yet prints an empty link: hide it rather than show a blank target. */
body .cmplz-cookiebanner .cmplz-documents .cmplz-link:empty {
	display: none;
}

/* Preferences: the categories on the soft sage ground, titles in the heading font. */
body .cmplz-cookiebanner .cmplz-categories .cmplz-category {
	background-color: var(--wp--preset--color--accent-5);
	border-radius: var(--wp--custom--radius--input);
}

body .cmplz-cookiebanner .cmplz-category .cmplz-category-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
}

body .cmplz-cookiebanner .cmplz-category .cmplz-description {
	font-size: var(--wp--preset--font-size--x-small);
	line-height: var(--wp--custom--line-height--body);
}

/* The "Cookies" tab that reopens the choice after a decision. */
body #cmplz-manage-consent .cmplz-manage-consent {
	left: var(--wp--preset--spacing--40);
	min-height: var(--wp--custom--control--min);
	padding: 0 var(--wp--custom--control--padding-x-small);
	border-color: var(--wp--preset--color--accent-6);
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: var(--wp--custom--font-weight--semibold);
	box-shadow: var(--wp--preset--shadow--sm);
}

/* Phones: Accept and Refuse side by side (still equal), Préférences under them, so the card stays short. */
@media (max-width: 767px) {
	body .cmplz-cookiebanner .cmplz-buttons {
		flex-direction: row;
		flex-wrap: wrap;
	}

	body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
		flex: 1 1 100%;
		width: auto;
	}

	body .cmplz-cookiebanner .cmplz-buttons :is(.cmplz-accept, .cmplz-deny) {
		flex-basis: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	body .cmplz-cookiebanner,
	body .cmplz-cookiebanner .cmplz-btn {
		animation: none;
		transition: none;
	}
}
