@mixin scrollbar() {
  scrolledwindow {
    border: 1px solid $borders;
    border-bottom-color: gtkmix($bg_color, $light_shadow, 0.7);
    border-right-color: gtkmix($bg_color, $light_shadow, 0.7);
  }

  scrollbar {
    border: 1px solid $borders;
    border-bottom-color: gtkmix($bg_color, $light_shadow, 0.7);
    border-right-color: gtkmix($bg_color, $light_shadow, 0.7);
    background-color: gtkshade($bg_color, 0.9);
    padding: 1px;

    trough {
      border: none;
      background-image: image($borders);
      background-size: 3px calc(100% - 10px);
      background-position: center center;
      background-repeat: no-repeat;
      border-radius: 0; 
    }
    
    &.horizontal trough {
      background-size: calc(100% - 10px) 3px;
    }

    button {
      &, &:active, &:disabled {
        &, &:backdrop {
          padding: 0;
          -gtk-icon-source: none;
        }
      }
    }

    &.fine-tune {
    }

    &.overlay-indicator {
      opacity: 1;
    }

    &.horizontal {
      slider {
        min-width: 45px;
        min-height: 12px;
        margin: 0;
        border: 1px solid $borders;
        border-top-color: gtkmix($bg_color, $light_shadow, 0.7);
        border-left-color: gtkmix($bg_color, $light_shadow, 0.7);
        border-radius: $scrollbar_radius;
        background-clip: padding-box;
        background-color: $bg_color;
        background: $bg_color, url('assets/arrow-right.png') right center, url('assets/arrow-left.png') left center;
    background-repeat: no-repeat;
      }

      button {
        min-height: 12px;
        min-width: 8px;
      }
    }

    &.vertical {
      slider {
        min-width: 12px;
        min-height: 45px;
        margin: 0;
        border: 1px solid $borders;
        border-top-color: gtkmix($bg_color, $light_shadow, 0.7);
        border-left-color: gtkmix($bg_color, $light_shadow, 0.7);
        border-radius: $scrollbar_radius;
        background-clip: padding-box;
        background-color: $bg_color;
        background: $bg_color, url('assets/arrow-down.png') bottom center, url('assets/arrow-up.png') top center;
    background-repeat: no-repeat;
      }

      button {
        min-height: 8px;
        min-width: 12px;
      }
    }

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