/* Copyright 2015 Sam Hewitt.
*
* This file is part of the Paper GTK theme.
*
* The Paper 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 Paper 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 Paper GTK theme. If not, see http://www.gnu.org/licenses/.
*/

/* Slider colors */
@define-color slider @background;
@define-color slider_border alpha(#000, 0.3);
@define-color backdrop_slider @backdrop_background;
@define-color insensitive_slider @insensitive_background;

/* Trough colors */
@define-color trough shade(@base, 0.8);
@define-color trough_border alpha(#000, 0.2);
@define-color backdrop_trough shade(@backdrop_base, 0.8);
@define-color insensitive_trough shade(@insensitive_base, 0.8);

/*************
 * GtkSwitch *
 *************/

GtkSwitch {
    border-radius: 5px;
    font: condensed;
}

/* Trough */
GtkSwitch.trough {
    border-radius: 5px;
    border: 1px solid @trough_border;
    background-color: @trough;
    color: alpha(@text, 0.5);
}

GtkSwitch.trough:active {
    border: 1px solid shade(@selection, 0.8);
    background-color: @selection;
    color: @selection_foreground;
}

GtkSwitch.trough:backdrop,
GtkSwitch.trough:active:backdrop {
    background: none;
    border: 1px solid @backdrop_border;
    color: @backdrop_text;
}

GtkSwitch.trough:insensitive,
GtkSwitch.trough:active:insensitive {
    background: none;
    border: 1px solid @insensitive_border;
    color: @insensitive_text;
}

/* Slider */

GtkSwitch.slider,
GtkSwitch.slider:active {
    border: 1px solid @slider_border;
    background-color: @slider;
    background-image: linear-gradient(to bottom, 
                                      @slider,
                                      shade(@slider, 0.98)
                                      );
}

GtkSwitch.slider:active:insensitive,
GtkSwitch.slider:insensitive {
    border: 1px solid @insensitive_border;
    background-color: @insensitive_slider;
}

GtkSwitch.slider:active:backdrop,
GtkSwitch.slider:backdrop {
    border: 1px solid @backdrop_border;
    background-color: @insensitive_slider;
}