$background-color: #1a1a1a;

$hover-lighten: 5%;
$border-lighten: 7%;
$active-lighten: 10%;

$number-color: #2FA1D6;
$boolean-color: #806787;
$string-color: #1ed36f;
$function-color: #e61d5f;
$save-row-color: #dad5cb;
$button-color: darken($save-row-color, 10%);
$border-color: lighten($background-color, $border-lighten);
$input-color: lighten($background-color, 8.5%);

@mixin transition($prop, $time, $curve) {
  -webkit-transition: $prop $time $curve;
  -o-transition: $prop $time $curve;
  -moz-transition: $prop $time $curve;
  transition: $prop $time $curve;
}

@mixin gradient($a, $b) {
  background: -webkit-gradient(linear, 0% 0%, 0% 100%, from($a), to($b));
  background: -o-gradient(linear, 0% 0%, 0% 100%, from($a), to($b));
  background: -moz-gradient(linear, 0% 0%, 0% 100%, from($a), to($b));
}

@mixin button() {
  margin-left: 5px;
  margin-top: 1px;
  border-radius: 2px;
  font-size: 9px;
  line-height: 7px;
  padding: 4px 4px 5px 4px;
  background: $button-color;
  color: #fff;
  text-shadow: 0 1px 0 darken($button-color, 10%);
  box-shadow: 0 -1px 0 darken($button-color, 10%);
  cursor: pointer;
}

@mixin gears() {
  background: $button-color url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;
  height: 7px;
  width: 8px;
}

@import "structure";

/** Main type */
.dg {

  color: #eee;
  font: 11px 'Lucida Grande', sans-serif;
  text-shadow: 0 -1px 0 #111;

  /** Auto place */
  &.main {

    /** Scrollbar */
    &::-webkit-scrollbar {
      width: 5px;
      background: $background-color;
    }
    &::-webkit-scrollbar-corner {
      height: 0;
      display: none;
    }
    &::-webkit-scrollbar-thumb {
      border-radius: 5px;
      background: lighten($background-color, 30%);
    }

  }

  li {
   

    &:not(.folder) {
      background: $background-color;
      border-bottom: 1px solid $border-color;
    }

    &.save-row {

      line-height: 25px;
      background: $save-row-color;
      border: 0;

      select {
        margin-left: 5px;
        width: 108px;

      }

      .button {

        &.gears {
          @include gears;
        }

        @include button;

        &:hover {
          background-color: darken($button-color, 5%);
          box-shadow: 0 -1px 0 darken($button-color, 10%);
        }

      }

    }

    &.folder {
      border-bottom: 0;
    }

    &.title {
      display: flex;
      justify-content: space-between;

      padding-left: 16px;
      
      background: url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;
      background-color: #000;
      cursor: pointer;
      border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    & .buttonContainer  {
      display: flex;
      flex-direction: row;
    }

    & .buttonContainer button {
      border: none;
      background-color: Transparent;
      background-repeat:no-repeat;
      cursor:pointer;
      overflow: hidden;
      outline:none;

      display: flex;
      flex-direction: row;
      align-content: center;
      align-items: center;
    }

    & .buttonContainer button:hover {
      background-color: rgba(255, 255, 255, 0.2);
    }

    & .buttonContainer button .upIcon {
      display: block;
      text-indent: -9999px;

      width: 16px;
      height: 16px;

     background-size: 16px 16px;
      //background: url("baseline-keyboard_arrow_down-24px.svg") no-repeat;
      background:   url("1x/baseline_keyboard_arrow_up_white_18dp.png") no-repeat;
      
    }
    & .buttonContainer button .downIcon {
      display: block;
      text-align: center;
      text-indent: -9999px;
      width: 16px;
      height: 16px;

      fill:white;
     background-size: 16px 16px;
      //background: url("baseline-keyboard_arrow_down-24px.svg") no-repeat;
      background:   url("1x/baseline_keyboard_arrow_down_white_18dp.png") no-repeat;

    }

    & .buttonContainer button .removeIcon {
      display: block;
      text-indent: -9999px;

      width: 16px;
      height: 16px;

     background-size: 16px 16px;
      //background: url("baseline-keyboard_arrow_down-24px.svg") no-repeat;
      background:   url("1x/baseline_keyboard_arrow_up_white_18dp.png") no-repeat;
      
    }

  }

  .closed li.title {
    background-image: url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==);
  }

  /* Controller row, <li> */
  .cr {

    &.boolean {
      border-left: 3px solid $boolean-color;
    }

    &.color {
      border-left: 3px solid;
    }

    &.function {
      border-left: 3px solid $function-color;
    }

    &.number {
      border-left: 3px solid $number-color;
      input[type=text] {
        color: $number-color;
      }
    }

    &.string {
      border-left: 3px solid $string-color;
      input[type=text] {
        color: $string-color;
      }
    }

    &.function:hover,
    &.boolean:hover {
      background: #111;
    }

  }

  /** Controllers */
  .c {
   
    
    input[type=text] {

      background: $input-color;
      outline: none;
      &:hover {
        background: lighten($input-color, $hover-lighten);
      }
      &:focus {
        background: lighten($input-color, $active-lighten);
        color: #fff;
      }

    }

    .slider {
      background: $input-color;
      cursor: ew-resize;
    }

    .slider-fg {
      background: $number-color;
      max-width: 100%;
    }

    .slider:hover {
      background: lighten($input-color, $hover-lighten);
      .slider-fg {
        background: lighten($number-color, $hover-lighten);
      }
    }

  }

}
