body, html { 
  margin: 0;
  height: 100%;
  padding: 0;
}

body {
  font-family: 'Lato', sans-serif;
  background: radial-gradient(circle at 50% 50%, #fff, transparent 50%), radial-gradient(circle at 50% 50%, rgb(0, 0, 0), rgb(0, 0, 0) 100%);
  overflow: hidden;
}

.dragme { 
  position:  absolute;
  left: 50%;
  top: 50%; 
  width: 10px; 
  height: 10px;
  background: white;
  border:1px solid black;
  transform: translateX(-5px) translateY(-5px);
  z-index: 340;
  border-radius: 50%;
  cursor:pointer;
  transition: transform 0.3s, opacity 0.3s;
  &:active, &:hover {
    transform: translateX(-5px) translateY(-5px) scale(1.5,1.5)
  } 
  &.hide {
    opacity: 0;
  }
}

#canvas {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 300;
} 

%text {
  color:rgba(#f3f3f3,0.4)!important;
  text-shadow: 1px 1px rgba(#333,0.4);
}


.points {
  position: absolute;
  top: 34px;
  right: 0;
  min-height: 30px;
  min-width: 400px;

  @extend %text;
  font-weight: 300;
  font-size: 12px;

  transition:transform 0.3s;
  transform:translateX(100%) translateX(-37px);

  td {
    transition: background-color 0.3s;
    background-color: rgba(white,0.2);
    
    padding: 3px 7px;
    border:none;
    margin: 0;
    input { @extend %text; }
  }
  
  #open_config:checked ~ & { transform: translateX(0px); }
 
  &.empty {
    right:auto;
    left: 50%;
    top: 20%;
    min-width: 260px;
    transform:translateX(-50%);
  }
}


#open_config { display: none; }

.conf-opener {
  width: 15px;
  height: 15px;
  padding: 5px;
  position: absolute;
  top: 5px;
  right: 5px;
  cursor:pointer;
  transform: rotate(0deg);

  &:hover svg {
    transition: transform 1s;
    transform: rotate(180deg);
    #open_config:checked ~ & {
      transform: rotate(-180deg);
    }
  }

  path {
    fill:#fff;
    #open_config:checked ~ & { fill:#7f7f7f; }
  }
}

#export_code {
  width: 23px;
  height: 23px;
  padding: 3px;
  position: absolute;
  top: 5px;
  right: 35px;

  path { fill:rgba(white,0.4); }
  &:hover { path { fill:rgba(white,0.85); } }
}

input:focus, input:active { outline:none;}

.add {
  position: absolute;
  bottom: -30px;
  left: 2px;
  color:white;
  font-weight: 100;
  font-size: 12px;
}

#set_colour,#add_point {
  margin: 0;
  float: left;
  height: 30px;
  border:0;
  background-color: rgba(white,0.2);
  outline: none;
  line-height: 30px;
}

#set_colour {
  height: 28px;
  margin-left: 2px;
  padding-left: 10px;
  width: 200px;
  @extend %text;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  transition: background-color 0.3s;

  &:focus {
    background-color: rgba(white,0.1);
    &::-webkit-input-placeholder { color:rgba(#f3f3f3,0.2); text-shadow: 1px 1px rgba(#333,0.2);}
    &:-moz-placeholder { color:rgba(#f3f3f3,0.2); text-shadow: 1px 1px rgba(#333,0.2);}
    &::-moz-placeholder { color:rgba(#f3f3f3,0.2); text-shadow: 1px 1px rgba(#333,0.2);}
    &:-ms-input-placeholder { color:rgba(#f3f3f3,0.2); text-shadow: 1px 1px rgba(#333,0.2);}
  }

  &::-webkit-input-placeholder { color:rgba(#f3f3f3,0.4); text-shadow: 1px 1px rgba(#333,0.4);}
  &:-moz-placeholder { color:rgba(#f3f3f3,0.4); text-shadow: 1px 1px rgba(#333,0.4);}
  &::-moz-placeholder { color:rgba(#f3f3f3,0.4); text-shadow: 1px 1px rgba(#333,0.4);}
  &:-ms-input-placeholder { color:rgba(#f3f3f3,0.4); text-shadow: 1px 1px rgba(#333,0.4);}
}

#add_point {
  cursor:pointer;
  display: block;
  width: 34px;
  margin: 0;
  text-align: center;
  font-size: 16px;
  color:white;
  font-family: 'Lato', sans-serif;
  font-weight: 100;
  line-height: 20px;
  background-color: rgba(#1abc9c,0.5);

  &:hover { background-color: #1abc9c; }
}

.c_name { 
  text-transform: uppercase;
  width: 20px;
}

.c_deep-value {
  & input {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    background-color: transparent;
    text-align: center;
    width: 40px;
    border:0;
    color:white;
  }
  &:after { content:'%'}
}
.c_del{ background-color: rgba(#c0392b,0.85)!important; }
.c_up { background-color: rgba(#3498db,0.85)!important; }

.del_item, .up_item {
  border:0;
  background-color: transparent;
  color:white;
  width: 27px;
  height: 20px;
  cursor:pointer;
  svg {
    display: inline-block;
    vertical-align: middle;
  }
  &:hover path {
    fill: rgba(white,0.85);
  }
}

.del_item path { fill: white; }
.up_item path { fill: white; }
.del_item:hover path { fill: rgba(white,0.85); }
.up_item:hover path { fill: rgba(white,0.85); }

#coords{ text-align: center;}

.current {
  td {
    background-color: rgba(white,0.5);
  }
}

.header {
  position: fixed;
  top: 5px;
  left: 10px;
  z-index: 100;  
}

.main-logo {
  text-decoration: none;
  font-weight: 300;
  color:white;
  font-variant: small-caps;
  font-size: 25px;
  margin: 0;
}

.social {
  position: absolute;
  bottom: 5px;
  right: 5px;
  border:0;
  background-color: transparent;
  cursor: pointer;
  padding: 0;
  margin: 0;

  li {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin: 5px; 
  }

  button {
    border:0;
    display:inline-block;
    background-color: transparent;
  }
}

.other-controls { 
  position: absolute;
  left: 10px;
  bottom: 10px;
}

#bg-color {
  width: 20px;
  height: 20px;
  border:0;
  border:1px solid rgba(white,0.2);
  
  display: inline-block;
  text-indent: -9999px;
  vertical-align: middle;
}

#points-op {
  display: inline-block;
  margin: 0;
  padding: 0;
  list-style: none;
  vertical-align: bottom;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  position: relative;
  color:inherit;
  background-color: rgba(white,0.2);
  
  &:after {
    content:'';
    width: 16px;
    height: 16px;
    left: 4px;
    top: 4px;
    background-color: rgba(white,0.7);
    border-radius:50%;
    position: absolute;
  }

  &.hide {
    &:after {
      background-color: transparent;
      box-shadow:0 0 2px rgba(white,0.7);
    }
  }
}

.input_colour {
  border:0;
  padding:5px;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
}

#random {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: middle;
  background-color: rgba(white,0.3);
  padding: 5px;
  
}

.center {
  text-align: center;
}
.popup {
  box-sizing:border-box;
  position: absolute;
  width: 70%;
  top: 50%; left: 50%;
  background-color: #3f3f3f;
  padding: 10px 20px;
  font-weight: 100;
  color:white;
  transform:translate(-50%, -50%);
  transition: all 0.3s;
  opacity: 0;
  line-height: 1.5em;
  visibility: hidden;
  &.open {
    opacity: 1;
    visibility: visible;
  }
  a { 
    color:rgba(white,0.7);
    text-decoration: none;
  }
  strong {
    font-weight: 300;
  }
}

hr {
  border:0;
  height: 1px;
  background-color: rgba(white,0.2);
  margin-top: 7px;
  margin-bottom: 7px;
}
.code {
  box-sizing:border-box;
  display: block;
  border:0;
  width: 100%;
  
  background-color: lighten(#3f3f3f,5);
  white-space: normal;
  padding: 10px;

  max-height: 250px;
  overflow: auto;
  cursor:pointer;
  position: relative;
  &:after {
    content:'copied';
    position: absolute;
    background-color:#1abc9c;
    line-height: 30px;
    bottom: 0;
    width: 100px;
    height: 30px;
    text-align: center;
    margin: auto;
    top: 0; right: 0; bottom: 0; left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
  }
  &.copied {
    &:after {
      opacity: 1;
      visibility: visible;
    }
  }
}

.popup-icon {
  width: 18px;
  height: 18px;
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;
}

#codepen {
  display: none;
}

#popup-q {
  max-height: 88%;
  overflow: auto;
}

@import "responsive";