@mixin scrollbar() {
  scrollbar {
    border: none;
    background-color: transparent;

    trough {
      border: none;
      border-radius: 0;
    }

    &.overlay-indicator {
      &:not(.dragging):not(.hovering) {
       border: 1px solid gtkshade($borders, 0.8);
        opacity: 1;
        margin: 0;
        background-color: transparent;
      }
      
      &.dragging, &.hovering {
        opacity: 1;
      }
    }

    &.horizontal {
      border: 1px solid gtkshade($borders, 0.8);
      background-image: url('assets/trough-h.png');
      background-size: 100% 100%;
      
      slider {
        min-width: 40px;
        border-radius: $scrollbar_radius;
        background-clip: padding-box;
        border: 7px solid transparent;
        border-image: url("assets/scrollbar-h-slider.png") 7 7 7 7 stretch;
        
        &:hover {
          border-image: url("assets/scrollbar-h-slider-active.png") 7 7 7 7 stretch;
        }
      }
      
      button {
        border: none;
        padding: 0;
        border-radius: 0;
        color: transparent;
        box-shadow: none;
        min-width: 13px;
        min-height: 13px;
        
        &:backdrop {
          color: transparent; }
          
        &.down {
          background-image: url('assets/stepper-right.png');
          
          &:hover {
            background-image: url('assets/stepper-right-hover.png');
          }
          
          &:active {
            background-image: url('assets/stepper-right-active.png');
          }
        }

        &.up {
          background-image: url('assets/stepper-left.png');
          
          &:hover {
            background-image: url('assets/stepper-left-hover.png');
          }
          
          &:active {
            background-image: url('assets/stepper-left-active.png');
          }
        }
      }
    }

    &.vertical {
      border: 1px solid gtkshade($borders, 0.8);
      background-image: url('assets/trough-v.png');
      background-size: 100% 100%;
      
      slider {
        min-height: 40px;
        border: none;
        border-radius: $scrollbar_radius;
        background-clip: padding-box;
        border: 7px solid transparent;
        border-image: url("assets/scrollbar-v-slider.png") 7 7 7 7 stretch;
        
        &:hover {
          border-image: url("assets/scrollbar-v-slider-active.png") 7 7 7 7 stretch;
        }
      }

      button {
        border: none;
        padding: 0;
        border-radius: 0;
        color: transparent;
        box-shadow: none;
        min-width: 13px;
        min-height: 13px;
        
        &:backdrop {
          color: transparent; }
          
        &.down {
          background-image: url('assets/stepper-down.png');
          
          &:hover {
            background-image: url('assets/stepper-down-hover.png');
          }
          
          &:active {
            background-image: url('assets/stepper-down-active.png');
          }
        }

        &.up {
          background-image: url('assets/stepper-up.png');
          
          &:hover {
            background-image: url('assets/stepper-up-hover.png');
          }
          
          &:active {
            background-image: url('assets/stepper-up-active.png');
          }
        }
      }
    }

    treeview ~ &.vertical {
      border-top: 1px solid $borders;
      margin-top: -1px;
    }
  }
}
