/**************
 * Scrollbars *
 **************/

.scrollbar {
    background-image: none;
    border-style: solid;
    -GtkRange-stepper-size: 16;
    -GtkRange-stepper-spacing: 0;
    -GtkRange-trough-border: 0;
    -GtkRange-arrow-scaling: 0.666;
    -GtkRange-slider-width: 13;
    -GtkRange-trough-under-steppers: 1;
    -GtkScrollbar-has-backward-stepper: true;
    -GtkScrollbar-has-forward-stepper: true;
    -GtkScrollbar-activate-slider: 1;
    -GtkScrollbar-min-slider-length: 31;
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 1;
}

 /* the small square between scrollbars!!!
     no borders with background-image */
.scrollbars-junction {
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.05),
                                      shade(@theme_bg_color, 1.05));
    border-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.05),
                                      shade(@theme_bg_color, 1.05));
    background-color: transparent;
    border-style: none;
    border-width: 0;
    box-shadow: none;
}

.scrollbar.trough,
.scrollbar.trough.vertical {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@theme_bg_color, 0.98)),
                                     to (shade (@theme_bg_color, 1.06)));
    border-left-width: 1px;
    border-right-width: 0px;
    border-top-width: 0px;
    border-bottom-width: 0px;
    border-radius: 0;
    border-color: shade(@button_border, 1.13);
    border-style: solid;
    box-shadow: none;
}

.scrollbar.trough.horizontal {
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (shade (@theme_bg_color, 0.98)),
                                     to (shade (@theme_bg_color, 1.06)));
    border-left-width: 0px;
    border-right-width: 0px;
    border-top-width: 1px;
    border-bottom-width: 0px;
    border-radius: 0;
    border-style: solid;
    box-shadow: none;
}

/* Sliders and buttons */
.scrollbar.slider.vertical {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@theme_bg_color, 0.95)),
                                     to (shade (@theme_bg_color, 0.8)));
    border-color: shade (@theme_bg_color, 0.65);
    border-radius: 10px;
    border-width: 1px;
}

.scrollbar.slider.vertical:hover,
.scrollbar.slider.vertical:hover:active {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@theme_bg_color, 0.85)),
                                     to (shade (@theme_bg_color, 0.7)));
    border-color: shade (@theme_bg_color, 0.85);
    border-width: 0 0 0 0;
}

.scrollbar.slider.horizontal {
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (shade (@theme_bg_color, 0.95)),
                                     to (shade (@theme_bg_color, 0.8)));
    border-color: shade (@theme_bg_color, 0.65);
    border-radius: 10px;
    border-width: 1px;
}

.scrollbar.slider.horizontal:hover,
.scrollbar.slider.horizontal:hover:active {
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (shade (@theme_bg_color, 0.85)),
                                     to (shade (@theme_bg_color, 0.7)));
    border-color: shade (@theme_bg_color, 0.85);
    border-width: 0 0 0 0;
}

.scrollbar.slider:insensitive {
    background-color: shade (@theme_bg_color, 0.9);
}

.scrollbar.trough:insensitive {
    background-color: shade (@theme_bg_color, 1.06);
}

.scrollbar.button,
.scrollbar.button:hover,
.scrollbar.button:hover:active,
.scrollbar.button:insensitive {
    box-shadow: none;
    border-style: none;
    border-image: none;
    border-radius: 0;
    background-image: none;
    background-color: transparent;
}

.scrollbar.button:hover,
.scrollbar.button:hover:active {
    background-color: alpha(shade(@scrollbar_trough, 0.8), 0.5);
}

.scrollbar.button.top:hover {
    box-shadow: none;
    -gtk-image-effect: highlight;
}

.scrollbar.button.bottom:hover {
    box-shadow: none;
    -gtk-image-effect: highlight;
}

.scrollbar.button.right:hover {
    box-shadow: none;
    -gtk-image-effect: highlight;
}

.scrollbar.button.left:hover {
    box-shadow: none;
    -gtk-image-effect: highlight;
}

.scrollbar.button {
    color: @theme_fg_color;
}

.scrollbar.button:hover {
    color: @theme_fg_color;
}

.scrollbar.button:insensitive {
    color: @insensitive_fg_color;
}

.scrollbar.slider.fine-tune:prelight:active {
    background-image: url("assets/slider_fine_horizontal.svg"),
                      linear-gradient(to top,
                                      shade(@scrollbar_slider, 0.9),
                                      shade(@scrollbar_slider, 0.81) 55%,
                                      shade(@scrollbar_slider, 0.6));
    background-repeat: no-repeat;
    background-position: center;
    border-style: solid;
    border-image: none;
    border-color: shade(@scrollbar_slider, 0.65);
    border-width: 1px;
}

.scrollbar.slider.vertical.fine-tune:prelight:active {
    background-image: url("assets/slider_fine_vertical.svg"),
                      linear-gradient(to left,
                                      shade(@scrollbar_slider, 0.9),
                                      shade(@scrollbar_slider, 0.81) 55%,
                                      shade(@scrollbar_slider, 0.6));
    background-repeat: no-repeat;
    background-position: center;
    border-style: solid;
    border-image: none;
    border-color: shade(@scrollbar_slider, 0.65);
    border-width: 1px;
}

.scrollbar.slider.fine-tune:prelight:active {
    background-image: url("assets/slider_fine_horizontal.svg"),
                      linear-gradient(to top,
                                      shade(@scrollbar_slider, 0.9),
                                      shade(@scrollbar_slider, 0.81) 55%,
                                      shade(@scrollbar_slider, 0.6));
    background-repeat: no-repeat;
    background-position: center;
    border-style: solid;
    border-image: none;
    border-color: shade(@scrollbar_slider, 0.65);
    border-width: 1px;
}

.scrollbar.slider.vertical.fine-tune:prelight:active {
    background-image: url("assets/slider_fine_vertical.svg"),
                      linear-gradient(to left,
                                      shade(@scrollbar_slider, 0.9),
                                      shade(@scrollbar_slider, 0.81) 55%,
                                      shade(@scrollbar_slider, 0.6));
    background-repeat: no-repeat;
    background-position: center;
    border-style: solid;
    border-image: none;
    border-color: shade(@scrollbar_slider, 0.65);
    border-width: 1px;
}

/* overlay scrollbar */
OsThumb {
    color: shade (@theme_fg_color, 1.6);
}

OsThumb:selected,
OsScrollbar:selected {
    background-color: @theme_selected_bg_color;
}

OsThumb:active,
OsScrollbar:active {
    background-color: shade (@theme_bg_color, 0.6);
}

OsThumb:insensitive,
OsScrollbar:insensitive {
    background-color: shade (@theme_bg_color, 0.85);
}

/*******************
 * scrolled window *
 *******************/
GtkScrolledWindow.frame {
    border-top-color: shade (@theme_bg_color, 0.84);
    border-right-color: shade (@theme_bg_color, 0.76);
    border-bottom-color: shade (@theme_bg_color, 0.86);
    border-left-color: shade (@theme_bg_color, 0.76);
    border-radius: 0;
    border-style: solid;
}
