@mixin scrollbar() {
  scrollbar {
    border: none;
    background-color: gtkmix($bg_color, $fg_color, 0.1);

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

    &:backdrop {
      background-color: gtkmix($bg_color, $fg_color, 0.1);
    }
    
    button {
      &:hover {
        border-color: gtkmix($bg_color, $fg_color, 0.1);
        background-color: gtkmix($bg_color, $fg_color, 0.2);
      }
      
      &:active {
        border-color: gtkmix($bg_color, $fg_color, 0.1);
        background-color: gtkmix($bg_color, $fg_color, 0.6);
      }
    
      &, &:disabled {
        &, &:backdrop {
          padding: 3px;
          border-color: gtkmix($bg_color, $fg_color, 0.1);
          background-color: gtkmix($bg_color, $fg_color, 0.1);
        }
      }
    }

    slider {
      min-width: 45px;
      min-height: 14px;
      margin: 0;
      border: none;
      border-radius: $scrollbar_radius;
      background-clip: padding-box;
      background-color: gtkmix($bg_color, $fg_color, 0.4);

      &:hover {
        background-color: gtkmix($bg_color, $fg_color, 0.35);

        &:active {
          background-color: gtkmix($bg_color, $fg_color, 0.6);
        }
      }

      &:backdrop {
        background-color: gtkmix($bg_color, $fg_color, 0.45);
      }

      &:disabled {
        background-color: transparent;
      }
    }
    
    &.vertical slider {
      min-width: 14px;
      min-height: 45px;
    }

    &.fine-tune {
    }

    &.overlay-indicator {
      &:not(.dragging):not(.hovering) {
        border: none;
        opacity: 0.7;
        margin: 0;
        background-color: transparent;

        slider {
          margin: 0;
          min-width: 2px;
          min-height: 2px;
          background-color: gtkmix($bg_color, $fg_color, 0.6);
          border: 2px solid transparent;
          border-radius: 2px;
        }

        &.horizontal {
          slider {
            margin: 0;
            min-width: 40px;
          }
        }

        &.vertical {
          slider {
            margin: 0;
            min-height: 40px;
          }
        }
        
        // hide overlay scrollbutton
        button {
          min-width: 0;
          min-height: 0;
          padding: 0;
          border: none;
          box-shadow: none;
          color: transparent;
          background-color: transparent;
        }
      }
      
      &.dragging, &.hovering {
        opacity: 1;
      }
    }

    &.horizontal {
      slider {
        min-width: 40px;
      }

      button {
        min-height: 6px;
        min-width: 6px;
      
        &.down {
          -gtk-icon-source: url('assets/arrow-right.svg');
          
          &:active {
            -gtk-icon-source: url('assets/arrow-right-active.svg');
          }
        }

        &.up {
          -gtk-icon-source: url('assets/arrow-left.svg');
          
          &:active {
            -gtk-icon-source: url('assets/arrow-left-active.svg');
          }
        }
      }
    }

    &.vertical {
      slider {
        min-height: 40px;
      }

      button {
        min-height: 6px;
        min-width: 6px;

        &.down {
          -gtk-icon-source: url('assets/arrow-down.svg');
          
          &:active {
            -gtk-icon-source: url('assets/arrow-down-active.svg');
          }
        }

        &.up {
          -gtk-icon-source: url('assets/arrow-up.svg');
          
          &:active {
            -gtk-icon-source: url('assets/arrow-up-active.svg');
          }
        }
      }
    }

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