@use 'sass:meta';
@use '../shared/styles/theme';
@use '../shared/styles/tokens';
@use '../shared/styles/scrollbars';

* {
	box-sizing: border-box;
}

// avoids FOUC for elements not yet called with `define()`
:not(:defined) {
	visibility: hidden;
}

[hidden] {
	display: none !important;
}

html {
	height: 100%;
	font-size: 62.5%;
	text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

	--color-focus-border: var(--vscode-focusBorder);
}

body {
	min-height: 100%;
	padding: 0;
	overflow: hidden;
	font-family: var(--font-family);
	font-size: var(--vscode-font-size);
	line-height: 1.4;
	color: var(--color-foreground);
	background-color: var(--color-background);
}

:focus,
:focus-within {
	outline-color: var(--color-focus-border);
}

@include meta.load-css('../shared/codicons');
@include meta.load-css('../shared/utils');
@include scrollbars.scrollbarFix;
@include scrollbars.scrollableBase;

/* Ensure tooltip variables have fallbacks for hoisted tooltips */
:root {
	--wa-tooltip-background-color: var(
		--color-hover-background,
		var(--vscode-editorHoverWidget-background, var(--vscode-editor-background))
	);
	--wa-tooltip-color: var(
		--color-hover-foreground,
		var(--vscode-editorHoverWidget-foreground, var(--vscode-foreground))
	);
	--gl-tooltip-border-color: var(
		--color-hover-border,
		var(--vscode-editorHoverWidget-border, var(--vscode-widget-border))
	);
	--gl-tooltip-shadow: var(--vscode-widget-shadow, rgb(0 0 0 / 36%));
}
