@mixin scrollbar() {
  scrollbar {
    border: 1px solid gtkshade($borders, 0.8);
    background-color: $bg_color;

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

    &:backdrop {
      background-color: $unfocused_bg_color;
    }

    slider {
      margin: 0;
      border-width: 1px;
      border-radius: 0px;
      border-style: solid;
      border-color: gtkshade($bg_color, 0.65);
      border-top-color: gtkshade($bg_color, 0.75);
      border-left-color: gtkshade($bg_color, 0.75);
      background-color: $bg_color;
      color: $fg_color;
      box-shadow: inset -1px -1px gtkshade($bg_color, 0.85), inset 1px 1px $base_color;
      background-position: center center;
      background-repeat: no-repeat;
    }
    
    &.overlay-indicator {
      &:not(.dragging):not(.hovering) {
        border: 1px solid gtkshade($borders, 0.8);
        opacity: 1;
        margin: 0;
        background-color: $bg_color;
      }
      
      &.dragging, &.hovering {
        opacity: 1;
      }
    }

    &.horizontal {
      box-shadow: inset 0 2px $borders, inset 0 -1px gtkalpha($light_shadow, 0.3);
            
      slider {
        min-height: 13px;
        min-width: 45px;
        border-top-width: 0;
        border-bottom-width: 0;
        background-image: url('assets/thumb-h.png');
      }
      
      button {
        border: none;
        padding: 0;
        box-shadow: none;
        color: transparent;
        outline-color: transparent;
        min-height: 13px;
        min-width: 15px;
        
        &:backdrop {
          color: transparent;
          outline-color: transparent;
        }
        
        &.down {
          background-image: url('assets/arrow_right.png');
          
          &:hover {
            background-image: url('assets/arrow_right.png');
          }
          
          &:active {
            background-image: url('assets/arrow_right_active.png');
          }
        }

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

    &.vertical {
      box-shadow: inset 2px 0 $borders, inset -1px 0 gtkalpha($light_shadow, 0.3);
      
      slider {
        min-width: 13px;
        min-height: 45px;
        border-left-width: 0;
        border-right-width: 0;
        background-image: url('assets/thumb-v.png');
      }

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

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

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