/* Copyright 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/.
*/

/**********
 * Scales *
 **********/

.scale {
    -GtkScale-slider-length: 16px;
    -GtkRange-slider-width: 16px;
    -GtkRange-trough-border: 0px;
    border-radius: 4px;
}

/* Positive fill colors */
.scale.highlight.left,
.scale.vertical.highlight.bottom,
.menubar .menuitem .scale.highlight.left,
.menubar .menuitem .scale.highlight.bottom {
    border: 1px solid shade(@selection, 0.8);
    border-radius: 12px 0 0 12px;
    background-color: @selection;

    box-shadow: inset 0 0 0 1px alpha (#000, 0.05),
                0 1px 0 0 alpha (#fff, 0.30);
}

/* Insensitive fill colors */
.scale.highlight.left:insensitive,
.scale.highlight.bottom:insensitive,
.menubar .menuitem .scale.highlight.left:insensitive,
.menubar .menuitem .scale.highlight.bottom:insensitive {
    background-color: @insensitive_background;
    border: 1px solid @insensitive_border;
    background-image: none;
    box-shadow: none;
}

/* Hover fill colors */
.scale.highlight.left:hover,
.scale.highlight.bottom:hover,
.menubar .menuitem .scale.highlight.left:hover,
.menubar .menuitem .scale.highlight.bottom:hover {
    background-color: shade(@border, 0.9);
    border: 1px solid @border;
    background-image: none;
}

/* backdrop fill colors */
.scale.vertical.highlight.left:backdrop,
.scale.vertical.highlight.bottom:backdrop,
.menubar .menuitem.scale.highlight.left:backdrop,
.menubar .menuitem.scale.highlight.bottom:backdrop {
    background-color: @backdrop_background;
    border: 1px solid @backdrop_border;
    background-image: none;
    box-shadow: none;
}

/***********
 * Troughs *
 ***********/

/* Margins */
.scale.trough {
    border-width: 1px;
    margin: 6px 0;
}

.scale.trough.vertical {
    border-width: 1px;
    margin: 0 6px;
}

/* Trough colors */
.scale.trough,
.scale.trough.vertical {
    background-color: @background;
    border: 1px solid @border;
}

/* Hover trough colors */
.scale.trough:hover,
.scale.trough.vertical:hover {
    background-color: @hover_background;
    border: 1px solid @hover_border;
}

/* Insensitive trough colors */
.scale.trough:insensitive,
.scale.trough.vertical:insensitive {
    background-color: @insensitive_background;
    border: 1px solid @insensitive_border;
}

/* backdrop trough colors */
.scale.trough:backdrop,
.scale.trough.vertical:backdrop {
    background-color: @backdrop_background;
    border: 1px solid @backdrop_border;
}

/****************
 * Progress Bar *
 ****************/
.scale.progressbar
.scale.progressbar.vertical {
    background-image: linear-gradient(to bottom,
                                  shade(@selection, 1.2),
                                  shade(@selection, 1.0)
                                  );

    border-style: solid;
    border-width: 1px;

    border-image: linear-gradient(to bottom,
                                  shade(@selection, 0.9),
                                  shade(@selection, 0.8)
                                  ) 1 1 1 1;
}

.scale.progressbar:insensitive,
.scale.progressbar.vertical:insensitive {
    background-image: linear-gradient(to bottom,
                                      @insensitive_progressbar_background_a,
                                      @insensitive_progressbar_background_b
                                      );

    border-style: solid;
    border-width: 1px;

    border-image: linear-gradient(to bottom,
                                  shade(@insensitive_border, 0.9),
                                  shade(@insensitive_border, 0.8)
                                  ) 1 1 1 1;
}


.scale.progressbar:backdrop,
.scale.progressbar.vertical:backdrop {
    background-image: linear-gradient(to bottom,
                                      @backdrop_progressbar_background_a,
                                      @backdrop_progressbar_background_b
                                      );

    border-style: solid;
    border-width: 1px;

    border-image: linear-gradient(to bottom,
                                  shade(@backdrop_border, 0.9),
                                  shade(@backdrop_border, 0.8)
                                  ) 1 1 1 1;
}