/* ── The page around the chrome (0.24.0) ─────────────────────────────── */
/* The page keeps its scrollbar's room from the first paint (0.56.1): a screen that grows past the window as its
   scripts fill it (a list, a builder's panes) no longer moves sideways under the pointer. */
html:has(> body.rooster-admin-has-chrome) {
	scrollbar-gutter: stable;
}

/* The window's scrollbar follows the root element's color-scheme, not the body's: the dark schemes reach <html> too. */
html:has(> body.rooster-admin-has-chrome.rooster-admin-dark) {
	color-scheme: dark;
}

html:has(> body.rooster-admin-has-chrome.rooster-admin-scheme-auto) {
	color-scheme: light dark;
}

/* wp-admin's grey in light (its own value), the chrome's own in dark; in dark, core's text and links on the chrome's
   screens read too (the chrome's containers set their colours; a product's own screens follow in their phases). */
body.rooster-admin-has-chrome {
	@apply bg-page;

	@variant dark {
		@apply text-foreground;
	}
}

/* Core colours every heading itself (h1 to h6: #1d2327 in common.css), which the page head's title inherits; in dark
   the headings on the chrome's screens read in the foreground. :where() keeps this under any recipe of its own. */
body.rooster-admin-has-chrome :where(h1, h2, h3, h4, h5, h6) {
	@variant dark {
		@apply text-foreground;
	}
}

/* stylelint-disable selector-max-specificity -- core's ids (both selectors: the footer's was left out of the disable
   from 0.97.1 to 0.98.0); the chrome's and the products' own links (their component classes) keep their recipes (0.45.2:
   the LMS's view pills turned link blue in the dark scheme; 0.100.4: the calendar package's too, whose details' "Open",
   a link drawn as its primary button, read link blue on its own accent, 1.03 to 1), and a storefront preview its
   shop's (0.98.0) */
.rooster-admin-has-chrome #wpbody-content a:not([class*="rooster-admin-"], [class*="rooster-lms-"], [class*="aieo-"], [class*="rooster-calendar"], :where(.rooster-admin-storefront) a),
.rooster-admin-has-chrome #wpfooter a /* 0.97.1: the footer's links too (core's #2271b1 on the dark canvas was 3.85:1) */ {
	@variant dark {
		@apply text-link;
	}
}
/* stylelint-enable selector-max-specificity */

/* stylelint-disable-next-line selector-max-specificity -- core's id */
.rooster-admin-has-chrome #wpfooter {
	@variant dark {
		@apply text-secondary-foreground;
	}
}
