/* Copyright 2013 - 2014 Sam Hewitt.
*
* This file is part of the Orchis GTK theme.
*
* The Orchis GTK theme is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* The Orchis GTK theme is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with the Orchis GTK theme. If not, see http://www.gnu.org/licenses/.
*/

/**************
 * Scrollbars *
 **************/
 
.scrollbar {
    background-image: none;
    border-style: solid;
    border: 1px solid transparent;
    -GtkRange-trough-border: 2;
    -GtkScrollbar-has-backward-stepper: false;
    -GtkScrollbar-has-forward-stepper: false;
    -GtkRange-slider-width: 6;
    -GtkScrollbar-min-slider-length: 30;

    -GtkRange-stepper-spacing: 0;
    -GtkRange-trough-under-steppers: 1;
}

/* Buttons */
.scrollbar.button,
.scrollbar.button:active,
.scrollbar.button:active:hover,
.scrollbar.button:insensitive,
.scrollbar.button:hover:backdrop,
.scrollbar.button:active:hover:backdrop {
    border-style: none;
    border-image: none;
    border-radius: 0;
    background-image: none;
    background-color: transparent;
}

.scrollbar.button:active,
.scrollbar.button:active:hover {
    background-color: shade(@scrollbar_slider, 1.1);
}

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

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

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

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

.scrollbar.button.top:hover:backdrop,
.scrollbar.button.bottom:hover:backdrop,
.scrollbar.button.right:hover:backdrop,
.scrollbar.button.left:hover:backdrop {
    box-shadow: none;
}

.scrollbar.button {
    color: @scrollbar_slider;
}

.scrollbar.button:hover {
    color: shade(@scrollbar_slider, 1.05);
}

.scrollbar.button:insensitive {
    color: mix(@scrollbar_slider, @scrollbar_trough, 0.4);
}

.scrollbar.button:active {
    color: @scrollbar_slider_active;
}

.scrollbar.button:backdrop {
    color: @scrollbar_slider_backdrop;
}

.scrollbar.button:insensitive:backdrop {
    color: mix(@scrollbar_slider_backdrop, @scrollbar_trough_backdrop, 0.5);
}

/* Slider */
.scrollbar.slider {
    background-color: alpha(@foreground, 0.2);
    /* Borders are opposite what you'd expect */
    border-radius: 10px;
}

.scrollbar.slider:hover {
    background-color: alpha(white, 0.4);
    background-image: none;
}

.scrollbar.slider:active {
    background-color: alpha(@selection, 0.7);
    background-image: none;
}

.scrollbar.slider:prelight:active {
    background-image: none;
    background-color: alpha(@foreground, 0.3);
}

.scrollbar.slider:insensitive {
    background-color: alpha(@insensitive_foreground, 0.2);
}

.scrollbar.slider:backdrop {
    background-color: alpha(@backdrop_foreground, 0.2);
}

.scrollbar.slider.fine-tune:prelight:active {
      background-image: none;
      border: 3px solid transparent;
}


/* Troughs */
.scrollbars-junction, /* the small square between scrollbars!!! */
.scrollbar.trough {
    border-radius: 10px;
    background-image: none;
    background-color: transparent;
    border-width: 0;
    border-image: none;
}

.scrollbar.trough:insensitive {
    background-color: transparent;
    border: 3px solid transparent;
}

.scrollbars-junction:backdrop,
.scrollbar.trough:backdrop {
    background-image: none;
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    border-image: none;
}

.scrollbar.trough:insensitive:backdrop {
    background-image: none;
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    border-image: none;
}

/**********************
 * Overlay Scrollbars *
 *********************/
OsThumb {
    color: @selection;
}

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

OsThumb:active,
OsScrollbar:active {
    background-color: @selection;
}

OsThumb:active:backdrop,
OsScrollbar:active:backdrop,
OsThumb:backdrop,
OsScrollbar:backdrop {
    background-color: @backdrop_text;
}

OsThumb:insensitive,
OsScrollbar:insensitive {
    background-color: @insensitive_text;
}