/**
 * Steuber Theme: the cookie banner of the Complianz plugin in the style of
 * the theme.
 *
 * Loaded only when that plugin is active. The banner reads its colours and
 * sizes from custom properties, so they are pointed at the theme's presets:
 * accept is the primary button, deny an outline button of the same weight,
 * and the preferences buttons are text buttons.
 */
#cmplz-cookiebanner-container .cmplz-cookiebanner {
	--cmplz_banner_background_color: var(--wp--preset--color--surface);
	--cmplz_banner_border_color: var(--wp--preset--color--line);
	--cmplz_banner_border_width: var(--wp--custom--card--accent-width) 1px 1px 1px;
	--cmplz_banner_border_radius: var(--wp--custom--radius--md) var(--wp--custom--radius--md) var(--wp--custom--radius--md) var(--wp--custom--radius--md);
	--cmplz_text_color: var(--wp--preset--color--ink);
	--cmplz_hyperlink_color: var(--wp--preset--color--link);
	--cmplz_text_font_size: var(--wp--preset--font-size--body-sm);
	--cmplz_link_font_size: var(--wp--preset--font-size--body-sm);
	--cmplz_category_body_font_size: var(--wp--preset--font-size--body-sm);
	--cmplz_title_font_size: var(--wp--preset--font-size--body-lg);
	--cmplz_button_font_size: var(--wp--custom--button--small--font-size);
	--cmplz_button_border_radius: var(--wp--custom--radius--md) var(--wp--custom--radius--md) var(--wp--custom--radius--md) var(--wp--custom--radius--md);
	--cmplz_button_accept_background_color: var(--wp--preset--color--highlight);
	--cmplz_button_accept_border_color: var(--wp--preset--color--highlight);
	--cmplz_button_accept_text_color: var(--wp--preset--color--ink);
	--cmplz_button_deny_background_color: transparent;
	--cmplz_button_deny_border_color: var(--wp--preset--color--primary);
	--cmplz_button_deny_text_color: var(--wp--preset--color--primary);
	--cmplz_button_settings_background_color: transparent;
	--cmplz_button_settings_border_color: transparent;
	--cmplz_button_settings_text_color: var(--wp--preset--color--link);
	--cmplz_category_header_always_active_color: var(--wp--preset--color--accent-strong);
	--cmplz_slider_active_color: var(--wp--preset--color--primary);
	--cmplz_slider_inactive_color: var(--wp--preset--color--ink-muted);
	--cmplz_slider_bullet_color: var(--wp--preset--color--surface);

	border-top-color: var(--wp--preset--color--accent);
	box-shadow: var(--wp--custom--shadow--card-hover);
	font-family: var(--wp--preset--font-family--body);
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-title {
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	font-weight: 600;
	transition:
		background-color var(--wp--custom--transition),
		border-color var(--wp--custom--transition),
		color var(--wp--custom--transition);
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept:hover {
	border-color: var(--wp--preset--color--highlight-hover);
	background-color: var(--wp--preset--color--highlight-hover);
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny {
	border-width: 2px;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-dark);
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn:is(.cmplz-view-preferences, .cmplz-save-preferences, .cmplz-manage-options) {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* The "manage consent" tab that stays after a choice. */
#cmplz-manage-consent .cmplz-manage-consent {
	border-radius: var(--wp--custom--radius--md) var(--wp--custom--radius--md) 0 0;
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {

	#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
		transition: none;
	}
}
