/* Studio tokens: the Level Lab design system's colours, sizes and type
   (https://levellab.com/style), and the dark and light themes. Nothing
   here styles a thing by itself, so a game with its own look (Staff!) can
   load it with only the parts it shares (dialog.css), and set its own
   values over these. Load it first. The page's data-theme attribute picks
   the theme; dark if it says none. */

:root {
  /* Core palette (fixed) */
  --color-accent: #0077ff;
  --color-accent-light: color-mix(in srgb, var(--color-accent) 50%, var(--color-core-lightest));
  --color-accent-dark: color-mix(in srgb, var(--color-accent) 50%, var(--color-core-darkest));
  --color-core-darkest: #1a1a1a;
  --color-core-darker: #252525;
  --color-core-dark: #3a3a3a;
  --color-core-mid: #8c8c8c;
  --color-core-light: #c5c5c5;
  --color-core-lighter: #dadada;
  --color-core-lightest: #e5e5e5;
  --color-error: #ff3366;
  --color-success: #00cc66;
  --color-warning: #ff8800;
  /* Text on accent, error and other solid fills: always light, in both themes */
  --color-on-accent: var(--color-core-lightest);

  /* 5px spacing scale. --content-gap is the one space between and around
     things: every gap, inset and panel padding. Controls keep their own sizes. */
  --grid-unit: 5px;
  --space-1: calc(var(--grid-unit) * 1);
  --space-2: calc(var(--grid-unit) * 2);
  --space-3: calc(var(--grid-unit) * 3);
  --space-4: calc(var(--grid-unit) * 4);
  --space-5: calc(var(--grid-unit) * 5);
  --content-gap: var(--space-2);

  --height-header: 55px; /* a 35px button with 10px above and below */
  --height-input: 35px; /* Level Lab's is 34px; here every size is a multiple of 5px */

  /* Typography: tiny tags, all text, big things. Lines are 20px. */
  --font-family: 'Roboto', sans-serif;
  --font-weight: 300;
  --font-weight-bold: 700;
  --font-size-sm: 10px;
  --font-size: 15px;
  --font-size-lg: 25px;
  --line-height: 20px;

  --border-width: 1px;
  --border-style: solid;
  --radius-sm: 5px;
  --radius-lg: 10px;
  --overlay-black-50: color-mix(in srgb, black 50%, transparent);
  --shadow-drop: 0 5px 10px var(--overlay-black-50);
}

:root,
:root[data-theme='dark'] { /* dark is the default, should a page not say */
  --color-background: var(--color-core-darkest);
  --color-surface: var(--color-core-darker);
  --color-surface-light: var(--color-core-dark);
  --color-text: var(--color-core-lightest);
  --color-text-dark: var(--color-core-light);
  --color-border: var(--color-core-dark);
  --color-border-light: var(--color-core-mid);
  --color-link: var(--color-core-mid);
  --color-link-light: var(--color-core-lighter);
  --focus-outline: calc(var(--border-width) * 2) var(--border-style) var(--color-text);
  --focus-outline-offset: calc(var(--border-width) * 2);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --color-background: var(--color-core-lightest);
  --color-surface: var(--color-core-lighter);
  --color-surface-light: var(--color-core-light);
  --color-text: var(--color-core-darkest);
  --color-text-dark: var(--color-core-dark);
  --color-border: var(--color-core-light);
  --color-border-light: var(--color-core-mid);
  --color-link: var(--color-core-mid);
  --color-link-light: var(--color-core-darker);
  --focus-outline: calc(var(--border-width) * 2) var(--border-style) var(--color-text);
  --focus-outline-offset: calc(var(--border-width) * 2);
  color-scheme: light;
}
