* {
  -webkit-tap-highlight-color: transparent;
}
html, body {
  height: 100%;
  width: 100%;
}
body {
  margin: 0;
  font-size: 0;
  background-color: #040405;
  font-family: 'Open Sans', sans-serif;
  line-height: 1;
}
.hidden {
  display: none;
}
canvas {
  -ms-interpolation-mode: bicubic;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  background-position: 0px 0px, 10px 10px;
  background-size: 20px 20px;
}
.transparent {
  background-image: linear-gradient(45deg, #2B2B2B 25%, transparent 25%, transparent 75%, #2B2B2B 75%, #2B2B2B 100%), linear-gradient(45deg, #2B2B2B 25%, #212121 25%, #212121 75%, #2B2B2B 75%, #2B2B2B 100%);
}
.toolbar {
  position: fixed;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: #2F1D42;
  height: 24px;
}
.toolbar .icon {
  display: inline-block;
  height: 24px;
  width: 24px;
  opacity: 0.4;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath fill='none' stroke='white' d='M1 1H14V14H1z'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}
.toolbar .icon:hover, .toolbar .icon:focus {
  outline: none;
  opacity: 0.6;
}
.toolbar .icon.active {
  opacity: 0.8;
}
.toolbar .separator {
  display: inline-block;
  background-color: rgba(255,255,255,0.1);
  width: 1px;
  height: 16px;
  margin: 4px;
}
.toolbar .text {
  color: rgba(255,255,255,0.6);
  display: inline-block;
  padding: 4px;
  font-size: 16px;
  cursor: pointer;
}
.toolbar .text:hover, .toolbar .text:focus {
  outline: none;
  color: rgba(255,255,255,0.8);
}
.toolbar .handle {
  cursor: pointer;
  width: 5px;
  height: 100%;
  display: inline-block;
  vertical-align: top;
  background-color: rgba(255,255,255,0.1);
}
#toolbar { /* TEMP */
  top: 400px;
  left: 0;
}
#taskbar {
  top: 426px;
  left: 0;
}
#undo {
  background-image: url("img/icon_undo.svg");
}
#redo {
  background-image: url("img/icon_redo.svg");
}

.tabs {
  display: flex;
  border-bottom: 1px solid #E3006E;
}
.tabs span {
  flex: 1 0 0;
  font-size: 12px;
  text-transform: uppercase;
  text-align: center;
  padding: 6px 0;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
}
.tabs span:hover {
  color: white;
}
.tabs span.active {
  color: white;
  background-color: #E3006E;
  cursor: default;
}

#colourbar {
  background-color: #3D2D53;
  width: 200px;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
}
#colourbar h3 {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  font-weight: normal;
  background-color: #35224A;
  margin: 0;
  padding: 5px;
}
#colourrect {
  background-color: hsl(0,100%,50%);
  height: 100px;
  width: 180px;
  background-image: linear-gradient(0deg, black, transparent), linear-gradient(90deg, white, transparent);
  position: relative;
  margin: 10px;
  border-radius: 2px;
}
#colourrect span {
  box-sizing: border-box;
  position: absolute;
  bottom: 100%;
  left: 100%;
  border: 1px solid white;
  height: 10px;
  width: 10px;
  margin-bottom: -5px;
  margin-left: -5px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(0,0,0,0.2);
  background-color: red;
}
.slider {
  width: 180px;
  margin: 10px;
  height: 10px;
  border-radius: 5px;
  position: relative;
}
.slider .slider {
  margin: 0;
}
.slider span {
  position: absolute;
  left: 5px;
  background-color: white;
  border-radius: 50%;
  height: 5px;
  width: 5px;
  margin: 2.5px;
  margin-left: -2.5px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
}
#hue {
  background-image: linear-gradient(
    90deg,
    hsl(0,100%,50%),
    hsl(60,100%,50%),
    hsl(120,100%,50%),
    hsl(180,100%,50%),
    hsl(240,100%,50%),
    hsl(300,100%,50%),
    hsl(0,100%,50%)
  );
  background-color: red;
  background-size: 170px 10px;
  background-repeat: no-repeat;
  background-position: center;
}
#opacity {
  background-position: 0px 0px, 5px 5px;
  background-size: 10px 10px;
  margin-bottom: 0;
}
#opacity > div {
  background-image: linear-gradient(270deg, red, transparent), linear-gradient(red, red);
  background-size: 170px 10px, 5px 10px;
  background-repeat: no-repeat;
  background-position: center, right;
}
.input-wrapper {
  display: inline-block;
  margin: 10px;
  margin-right: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  position: relative;
}
.input-wrapper::before {
  position: absolute;
  margin: 5px;
  opacity: 0.6;
}
.input-wrapper input {
  display: inline-block;
  background: none;
  border-radius: 2px;
  background-color: #2F1D42;
  border: none;
  height: 14px;
  color: inherit;
  padding: 5px;
  cursor: pointer;
}
.input-wrapper input:focus {
  outline: none;
  background-color: #4c3b63;
  cursor: auto;
}
.hex::before {
  content: "#";
  left: 0;
}
.hex input {
  padding-left: 17px;
}
.percentage::before {
  content: "%";
  right: 0;
}
.percentage input {
  padding-right: 20px;
  text-align: right;
}
.pixels::before {
  content: "px";
  right: 0;
}
.pixels input {
  padding-right: 23px;
  text-align: right;
}
#hex {
  width: 55px;
}
#opacityinput {
  width: 25px;
}
#width, #height {
  width: 30px;
}
.label {
  display: inline-block;
  height: 1em;
  color: rgba(255,255,255,0.4);
  padding: 5px;
  font-size: 14px;
  margin: 10px 0;
  margin-right: -10px;
}
#pickcolour {
  opacity: 0.6;
  background: none;
  background-image: url("img/material_colorize.svg");
  height: 24px;
  width: 24px;
  border: none;
  padding: 0;
  margin: 10px;
  vertical-align: top;
}
#pickcolour:focus {
  outline: none;
  opacity: 0.8;
}
input[type=checkbox] {
  display: inline-block;
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  border-radius: 2px;
  background-color: #2F1D42;
  vertical-align: top;
  border: 1px solid transparent;
  box-sizing: border-box;
  cursor: pointer;
}
input[type=checkbox]:checked {
  background-image: url('img/icon_checked.svg');
  background-repeat: no-repeat;
  background-size: 12px;
  background-position: center;
  border-color: #E3006E;
}
input[type=checkbox]:focus {
  outline: none;
  box-shadow: 0 0 0 2px #4c3b63;
}
.checkbox-wrapper input[type=checkbox] {
  margin: 10px;
}
.checkbox-wrapper .label {
  padding: 0;
  line-height: 0.9;
}

#canvases {
  position: fixed;
  top: 0;
  left: 0;
}
#canvases canvas {
  position: absolute;
}
#preview {
  pointer-events: none;
  filter: drop-shadow(0 0 3px red);
}
