/*
 * StockBz Docs design tokens: the palette of the StockBz app (frontend/app/globals.css), light and dark.
 * theme.json references these variables, so the dark values apply to blocks and editor presets alike.
 */
:root {
	--sbd-base: #FAF7F2;
	--sbd-contrast: #2b2420;
	--sbd-surface: #ffffff;
	--sbd-border: #E7DFD5;
	--sbd-muted: #F2EDE6;
	--sbd-muted-text: #736658;
	--sbd-accent: #C2410C;
	--sbd-accent-hover: #9A3412;
	--sbd-success: #15803d;
	--sbd-warning: #b45309;
	--sbd-danger: #dc2626;
	--sbd-info: #1d4ed8;
	/* Link colour on --sbd-muted: accent alone is 4.44:1 there in light mode. */
	--sbd-link-on-muted: #9A3412;
	color-scheme: light;
}

/* Dark palette: the light/dark switch sets .dark or .light on <html>; without it the system preference applies. */
:root.dark {
	--sbd-base: #1A1613;
	--sbd-contrast: #F5F0E9;
	--sbd-surface: #221D19;
	--sbd-border: #332B25;
	--sbd-muted: #2A2420;
	--sbd-muted-text: #A89684;
	--sbd-accent: #F97316;
	--sbd-accent-hover: #EA580C;
	--sbd-success: #4ade80;
	--sbd-warning: #fbbf24;
	--sbd-danger: #f87171;
	--sbd-info: #60a5fa;
	--sbd-link-on-muted: #F97316;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not(.light) {
		--sbd-base: #1A1613;
		--sbd-contrast: #F5F0E9;
		--sbd-surface: #221D19;
		--sbd-border: #332B25;
		--sbd-muted: #2A2420;
		--sbd-muted-text: #A89684;
		--sbd-accent: #F97316;
		--sbd-accent-hover: #EA580C;
		--sbd-success: #4ade80;
		--sbd-warning: #fbbf24;
		--sbd-danger: #f87171;
		--sbd-info: #60a5fa;
		--sbd-link-on-muted: #F97316;
		color-scheme: dark;
	}
}

/* Core only ships this class in the admin; the search block uses it for its label. */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.screen-reader-text:focus {
	background: var(--sbd-surface);
	clip-path: none;
	color: var(--sbd-contrast);
	height: auto;
	margin: 0;
	overflow: visible;
	padding: 0.5rem 0.75rem;
	width: auto;
	z-index: 100000;
}
