/*
 * Social Workspace dark theme (RC150).
 *
 * This file is the only place the --sw-* tokens get values. ThemePreference prints it with media="screen" (Dark),
 * "screen and (prefers-color-scheme: dark)" (System) or "not all" (Light), so Light pages, printing and the System
 * choice on a light device never apply it. Plugin stylesheets read the tokens as var(--sw-role,<light colour>).
 *
 * Surfaces follow the Light layering: white cards are raised (--sw-surface), off-white pages and wells are recessed
 * (--sw-surface-2 and --sw-canvas), grey chips and tracks are --sw-surface-3. Each status family has text, accent
 * (text or rule on surfaces), tint (washes), line (rules and focus), fill and fill-strong (white-text buttons).
 */
:root {
	color-scheme: dark;
	--sw-canvas: #0f131b;
	--sw-surface: #181e29;
	--sw-surface-2: #121720;
	--sw-surface-3: #262d3b;
	--sw-surface-rgb: 24, 30, 41;
	--sw-text: #e8ebf2;
	--sw-text-2: #c4cad6;
	--sw-text-3: #9ba4b5;
	--sw-ink-rgb: 232, 235, 242;
	--sw-border: #2c3444;
	--sw-border-2: #3d4658;
	--sw-border-3: #5b6579;
	--sw-input-bg: #121720;
	--sw-on-fill: #fff;
	--sw-primary-text: #aebcff;
	--sw-primary-accent: #93a3ff;
	--sw-primary-tint: #1a2246;
	--sw-primary-line: #5165d6;
	--sw-primary-fill: #3a50d9;
	--sw-primary-fill-strong: #2f44c2;
	--sw-success-text: #7ddcae;
	--sw-success-accent: #55c896;
	--sw-success-tint: #0f2a20;
	--sw-success-line: #2c7a57;
	--sw-success-fill: #13805a;
	--sw-success-fill-strong: #0f6e4d;
	--sw-warning-text: #f3cf7a;
	--sw-warning-accent: #e5b04f;
	--sw-warning-tint: #2b2210;
	--sw-warning-line: #8a6a22;
	--sw-warning-fill: #9a6a0a;
	--sw-warning-fill-strong: #855b08;
	--sw-danger-text: #ffaab0;
	--sw-danger-accent: #f5848c;
	--sw-danger-tint: #33181c;
	--sw-danger-line: #a2434c;
	--sw-danger-fill: #c13e4a;
	--sw-danger-fill-strong: #a9333f;
	--sw-info-text: #86d8ea;
	--sw-info-accent: #55c2da;
	--sw-info-tint: #0f2a31;
	--sw-info-line: #2b7889;
	--sw-info-fill: #0b7a93;
	--sw-info-fill-strong: #08687e;
	--sw-violet-text: #cdbcff;
	--sw-violet-accent: #b29cf8;
	--sw-violet-tint: #251d42;
	--sw-violet-line: #6c58c6;
	--sw-violet-fill: #6a4fc9;
	--sw-violet-fill-strong: #5a40b6;
	background-color: var(--sw-canvas);
}

/* Native controls in the portals inherit dark field colours; fields the plugin styles keep their own rules. */
:where(body:not(.wp-admin)) :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button], [type=reset], [type=image]), select, textarea) {
	background-color: var(--sw-input-bg);
	color: var(--sw-text);
}

/* Browser autofill keeps the dark field instead of a pale yellow or blue wash. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
	-webkit-text-fill-color: var(--sw-text);
	caret-color: var(--sw-text);
	box-shadow: 0 0 0 1000px var(--sw-input-bg) inset;
	transition: background-color 99999s ease-out 0s;
}

::placeholder {
	color: var(--sw-text-3);
	opacity: 1;
}

:where(input[type=file])::file-selector-button {
	border: 1px solid var(--sw-border-2);
	border-radius: 6px;
	background-color: var(--sw-surface-3);
	color: var(--sw-text);
}
