:root {
  font-family: Roboto, Arial, Helvetica, sans-serif;

  color-scheme: light;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  padding: 0;
  margin: 0;
  background-color: #f5f5f5;
}

header:first-child {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 50px;
  color: #141414;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 20px;
  padding: 10px 15px;
  text-shadow: 0 2px #fff;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

header:first-child > span {
  font-weight: 400; 
}

header:first-child > span.badge {
  font-weight: 200;
}

header:first-child > span.version {
  font-size: 9px;
  position: relative;
  bottom: 3px;
  background-color: #141414;
  color: #fff;
  padding: 1px 7px 2px 7px;
  border-radius: 20px;
  text-shadow: none;
}

header:first-child > span.toolbar-button {
  background-position: center center;
  background-size: 20px 20px;
  background-repeat: no-repeat;
  border-radius: 5px;
  display: block;
  width: 26px;
  height: 26px;
  position: absolute;
  right: 15px;
  top: 10px;
  text-align: center;
  font-size: 16px;
  line-height: 28px;
  background-color: #fff;
  border: solid 1px #ccc;
  color: #777;
  cursor: pointer;
}

header:first-child > span.toolbar-button:hover {
  background-color: #fff;
  border-color: #aaa;
  color: #555;
} 

header:first-child > span.toolbar-button:active {
  background-color: #f5f5f5;
  border: solid 1px #ccc;
  color: #777;
}

header:first-child > span.toolbar-button#new-template {
  right: 78px;
}

header:first-child > span.toolbar-button#load-template {
  right: 46px;
}

#layout-container {
  position: fixed;
  top: 50px;
  right: 6px;
  bottom: 28px;
  left: 5px;
}

footer {
  position: fixed;
  bottom: 0px;
  left: 0px;
  right: 0px;
  height: 28px;
  font-size: 10px;
  line-height: 28px;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  body {
      background-color: #000;
      color: #fff;
  }

  header:first-child {
    color: #fff;
    text-shadow: 0 2px #333;
  }

  header:first-child > span.version {
    background-color: #333;
    color: #ccc;
  }

  header:first-child > span.toolbar-button {
    background-color: #141414;
    border: solid 1px #333;
    color: #888;
    text-shadow: 0 2px black;
  }
  
  header:first-child > span.toolbar-button:hover {
    background-color: #141414;
    border-color: #444;
    color: #aaa;
  } 
  
  header:first-child > span.toolbar-button:active {
    background-color: #000;
    border: solid 1px #333;
    color: #888;
  }
}