/**************
 * 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;
}

.scrollbars-junction { /* the small square between scrollbars!!! */
    background-image: none;
    background-color: @theme_bg_color;
    border-width: 0;
    border-radius: 0;
    border-image: none;
    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: 1px;
    border-top-width: 0px;
    border-bottom-width: 0px;
    border-radius: 0;
    border-width: 0 0 0 0;
    border-style: 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: 1px;
    border-radius: 0;
    border-width: 0 0 0 0;
    border-style: 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:active,
.scrollbar.button:active:hover,
.scrollbar.button:insensitive {
    box-shadow: inset 0 -1px mix(@scrollbar_slider, @scrollbar_trough, 0.8);
    border-style: none;
    border-image: none;
    border-radius: 0;
    background-image: none;
    background-color: transparent;
}

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

.scrollbar.button.top:hover {
    box-shadow: inset 0 -1px mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button.bottom:hover {
    box-shadow: inset 0 1px mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button.right:hover {
    box-shadow: inset 1px 0 mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button.left:hover {
    box-shadow: inset -1px 0 mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button {
    color: @theme_fg_color;
}

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

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

.scrollbar.button:active {
    color: @theme_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;
    -unico-border-gradient: none;
    -unico-inner-stroke-width: 0;
    -unico-outer-stroke-width: 0;
}
