/**
 * Platform accents: a page's Platform setting (ip-site-core, post meta ip_accent) adds is-platform-{key} to the
 * body. These rules switch the accent colour of the page content only; the header and footer stay Inverse Paradox
 * red. In the editor the class sits on the canvas body (.editor-styles-wrapper).
 *
 * Each colour is the platform's accessible shade (4.5:1 or better on white) and its lighter shade for dark
 * sections. The pressed shade and the light tint are mixed from it.
 *
 * Enqueued by inc/global-styles.php (front end and editor canvas).
 *
 * @package ip-ollie-child
 */

:is(body[class*="is-platform-"] main, .editor-styles-wrapper[class*="is-platform-"]) {
	--wp--preset--color--primary: var(--ip-platform);
	--wp--preset--color--primary-press: color-mix(in srgb, var(--ip-platform) 82%, #000);
	--wp--preset--color--primary-on-dark: var(--ip-platform-on-dark);
	--wp--preset--color--primary-accent: color-mix(in srgb, var(--ip-platform) 10%, #fff);
	--wp--custom--accent--brand: var(--ip-platform);
	--wp--custom--accent--press: color-mix(in srgb, var(--ip-platform) 82%, #000);
	--wp--custom--accent--on-dark: var(--ip-platform-on-dark);
}


:is(body.is-platform-woocommerce main, .editor-styles-wrapper.is-platform-woocommerce) {
	--ip-platform: #873eff;
	--ip-platform-on-dark: #a983ff;
}

:is(body.is-platform-wordpress main, .editor-styles-wrapper.is-platform-wordpress) {
	--ip-platform: #2271b1;
	--ip-platform-on-dark: #5994c4;
}

:is(body.is-platform-wpvip main, .editor-styles-wrapper.is-platform-wpvip) {
	--ip-platform: #9e691b;
	--ip-platform-on-dark: #b18749;
}

:is(body.is-platform-shopify main, .editor-styles-wrapper.is-platform-shopify) {
	--ip-platform: #558038;
	--ip-platform-on-dark: #729c56;
}

:is(body.is-platform-craft main, .editor-styles-wrapper.is-platform-craft) {
	--ip-platform: #d43d28;
	--ip-platform-on-dark: #ea6855;
}

:is(body.is-platform-learndash main, .editor-styles-wrapper.is-platform-learndash) {
	--ip-platform: #257ab6;
	--ip-platform-on-dark: #3795d8;
}

:is(body.is-platform-lifterlms main, .editor-styles-wrapper.is-platform-lifterlms) {
	--ip-platform: #3f63c6;
	--ip-platform-on-dark: #7d9be6;
}

:is(body.is-platform-moodle main, .editor-styles-wrapper.is-platform-moodle) {
	--ip-platform: #b55d0d;
	--ip-platform-on-dark: #f98012;
}

:is(body.is-platform-vius main, .editor-styles-wrapper.is-platform-vius) {
	--ip-platform: #637e3b;
	--ip-platform-on-dark: #99c25b;
}

:is(body.is-platform-infinite-source main, .editor-styles-wrapper.is-platform-infinite-source) {
	--ip-platform: #d30d1f;
	--ip-platform-on-dark: #e46873;
}
