body {
  margin: 0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  user-select: none;
  -moz-user-select: none;
}

.logo {
  color: black;
  margin: 0 15px;
  font-weight: bold;
  font-size: 16px;
  float: left;
  position: relative;
  top: 10px;
  background-image: url(../images/polypal-logo.svg);
  background-position: top left;
  background-repeat: no-repeat;
  background-size: 34px;
  padding-left: 38px;
}

.top-ui {
  position: absolute;
  top: 10px;
  width: 100%;
  font-family: sans-serif;
  font-size: 12px;
  color: rgba(0,0,0,.6);
  z-index: 9999;
}

.top-ui button {
  background: white;
  color: black;
  border: solid 1px #BBB;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

.top-ui .delete, .top-ui .undo {
  padding: 10px 18px 10px 12px;
}

.top-ui button:hover {
  background: #EEE;
}

.top-ui button:active {
  background: black;
  color: white;
  border: solid 1px black;
}

.bottom-ui {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  font-family: sans-serif;
  font-size: 12px;
  color: rgba(0,0,0,.6);
}

.bottom-ui input {
  width: 300px;
}

.bottom-ui span {
  margin-left: 20px;
  position: relative;
  top: -4px;
  margin-right: 5px;
}

button {
  padding: 3px 10px;
  margin: 0 3px;
  user-select: none;
}

button:focus {
  outline: none;
}

button.selected {
  box-shadow: 0px 0px  0px 3px rgba(0,255,0,.6);
}

h1 {
  position: absolute;
  width: 100%;
  text-align: center;
  color: white;
  top: 0;
  line-height: 26px;
  font-size: 24px;
  color: rgba(255,255,255,.4);
  font-weight: 300;
  transform: rotateX(-20deg);
  padding-bottom: 10px;
}

.scene {
  position: relative;
  background: white;
}

.svg-canvas {
  background: white;
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100vw - 200px);
  height: calc(100vh - 200px);
  width: 100vw;
  height: 100vh;
}

.svg-points svg {
  overflow: visible;
}

.svg-image, .svg-points {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.colors {
  display: block;
  height: 100%;
  position: absolute;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  justify-content: center;
  right: 0;
  bottom: 0;
  top: 0;
  padding-right: 20px;
}

.colors .color-wrapper {
  position: relative;
  margin-bottom: 10px;
  display: flex;
  flex-direction: row;
}


.colors .colorpicker-wrapper input {
  position: absolute;
  opacity: 0;
  background: none;
  border: none;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

.colors .color-ui {
  width: 25px;
  height: 25px;
  margin: 0 5px;
  border-radius: 50%;
  position: relative;
  align-self: center;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .2;
  cursor: pointer;
  display: none;
}


.colors .selected .color-ui {
  display: block;
}


.colors .delete {
  background-image: url(../images/icon-delete.svg);
}

.colors .add {
  background-image: url(../images/icon-add.svg);
}

.colors .colorpicker-wrapper {
  background-image: url(../images/icon-pick.svg);
}

.colors .color-ui:hover {
  opacity: .5;
}

.colors .color-wrapper:only-child .delete {
  display: none;
}




.colors .selected .swatch:after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  left: calc(50% - 15px);
  top: calc(50% - 15px);
  background-image: url(../images/icon-paintbrush-selected.svg);
}

.tools {
  position: absolute;
  left: 0;
  padding-left: 20px;
  height: 100vh;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.tools .tool.selected {
  background: black;
  border: solid 1px black;
  animation: boop .2s ease-in-out;
}

@keyframes boop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(.8);
  }
    75% {
    transform: scale(1.1);
  }
}

.colors .swatch {
  width: 36px;
  height: 36px;
  margin: 0 5px;
  display: block;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
  border: solid 2px transparent;
}

.colors .selected .swatch {
  border: solid 2px rgba(0, 0, 0, .2);
}

.tools .tool {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  display: block;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
}

.tools .tool {
  display: block;
  margin-bottom: 18px;
  background: white;
  border: solid 1px #BBB;
  box-shadow: none;
  border-radius: 50%;
  color: black;
  font-family: sans-serif;
  font-weight: bold;
}

.tools .tool:after {
  position: absolute;
  bottom: -9px;
  right: -9px;
  font-size: 12px;
  border: solid 1px #BBB;
  padding: 3px 5px 2px 5px;
  background: white;
  border-radius: 12px;
}

.tools .tool .label {
  position: absolute;
  left: 50px;
  background: #DDD;
  padding: 13px 15px 12px 15px;
  color: black;
  border-radius: 20px;
  display: none;
  text-transform: capitalize;
  white-space: nowrap;
  font-weight: normal;
}

.tools .tool:hover .label {
  display: block;
  opacity: .4;
}

.tools .tool.selector:after {
  content: "S";
}

.tool.selector {
  background-image: url(../images/icon-selector.svg);
}

.tool.selector.selected {
  background-image: url(../images/icon-selector-selected.svg);
}

.tools .tool.paintbrush:after {
  content: "B";
}

.tool.creator {
  background-image: url(../images/icon-creator.svg);
}

.tool.creator.selected {
  background-image: url(../images/icon-creator-selected.svg);
}

.tools .tool.creator:after {
  content: "C";
}

.tool.paintbrush {
  background-image: url(../images/icon-paintbrush.svg);
}

.tool.paintbrush.selected {
  background-image: url(../images/icon-paintbrush-selected.svg);
}

.tools .tool.move:after {
  content: "M";
}

.tool.move {
  background-image: url(../images/icon-move.svg);
}

.tool.move.selected {
  background-image: url(../images/icon-move-selected.svg);
}

.svg-canvas[tool="creator"] {
  cursor: pointer;
}

.svg-canvas[tool="selector"] {
  cursor: default;
}

.svg-canvas[tool="paintbrush"] {
  cursor: crosshair;
}

.svg-canvas[tool="move"] {
  cursor: move;
}

.top-ui button {
  position: relative;
}

.top-ui button:hover:after {
  position: absolute;
  top: 44px;
  padding: 8px 12px;
  content: attr(text);
  left: calc(50% - 60px);
  width: 120px;
  background: black;
  color: white;
  border-radius: 3px;
  box-sizing: border-box;
  animation: tooltip 2s ease-in;
  transform: translateY(5px);
}

@keyframes tooltip {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  20% {
    opacity: 0;
    transform: translateY(0);
  }
  25% {
    opacity: 1;
    transform: translateY(7px);
  }
  30% {
    transform: translateY(5px);
  }
}

.svg-image polygon.pulse {
  animation: pulse .3s ease-in-out;
  animation-iteration-count: 2;
}

@keyframes pulse {
  50% {
    opacity: .75;
  }
}

.top-ui button:before {
  line-height: 13px;
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 12px;
  border: solid 1px #BBB;
  padding: 3px 5px;
  background: white;
  border-radius: 12px;
}


button.delete:before {
  content: "D";
}

button.undo:before {
  content: "Z";
}
