/**
 * WP Group Scheduler — dark mode (explicit [data-theme="dark"] block).
 *
 * IMPORTANT: as of the fix applied in this phase, grid.css's UNSCOPED
 * .wgs-survey / .wgs-frontend-wrap base rule already defines these same
 * dark values directly — that's what makes dark mode the effective
 * default even before assets/js/theme-toggle.js has run and set a
 * data-theme attribute, satisfying the plan's explicit "no flash of
 * light-mode content on first paint" requirement (theme-light.css is the
 * file doing the real override work, for [data-theme="light"]).
 *
 * This file's [data-theme="dark"] block is therefore redundant with
 * grid.css's base values in practice. It's kept anyway, for the same
 * reason theme-light.css keeps an explicit block instead of relying on
 * "absence of an override": an explicit selector for each theme state
 * is easier to reason about and modify later than one implicit default
 * plus one explicit override, even though only one of the two
 * (theme-light.css) is load-bearing today.
 *
 * Colors here are NOT simply inverted lightness values from a light
 * theme — the three availability colors in particular are chosen to stay
 * clearly distinguishable from each other and from the dark background,
 * which a naive invert can break (e.g. inverting a light amber can drift
 * toward a muddy color that's hard to tell apart from the background at a
 * glance).
 */

.wgs-survey[data-theme='dark'],
.wgs-frontend-wrap[data-theme='dark'] {
	--wgs-bg: #1e1e1e;
	--wgs-text: #e8e8e8;
	--wgs-border: #3a3a3a;
	--wgs-muted: #a0a0a0;

	--wgs-cell-unselected: #333333;
	--wgs-cell-unselected-text: #cccccc;
	--wgs-cell-very-likely: #2ea043;
	--wgs-cell-very-likely-text: #0d1f10;
	--wgs-cell-potentially: #d29922;
	--wgs-cell-potentially-text: #241b02;
	--wgs-cell-not-available: #e5534b;
	--wgs-cell-not-available-text: #240a08;

	--wgs-heat-low: #333333;
	--wgs-heat-high: #4a9eff;
}

/* The popover and moderation queue are positioned via fixed/relative
   layout in grid.css but don't inherit color from a .wgs-survey/
   .wgs-frontend-wrap ancestor in every case (the popover is
   position:fixed, which doesn't affect custom-property inheritance, so
   this rule is actually redundant with the block above in practice —
   kept as an explicit, low-risk safety net in case a future change moves
   the popover's DOM position outside its current parent, which WOULD
   break inheritance for a fixed-position element in some edge cases). */
[data-theme='dark'] .wgs-results__cell-popover {
	background: var( --wgs-bg );
	color: var( --wgs-text );
	border-color: var( --wgs-border );
}
