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


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

GtkSwitch {
    border-radius: 1em;
    font: condensed;
    box-shadow: 0 0 0 1px alpha(#fff, 0.03);
}

/* Normal */
GtkSwitch.trough {
    color: @text;
    border-radius: 1em;
    padding: 0.25em;

    border: 1px solid @border;
    background-color: @background;
    background-image: linear-gradient(to bottom,
                                  alpha(#000, 0.10),
                                  alpha(#000, 0.05)
                                  );

    box-shadow: inset 0 0 0 1px alpha(#000, 0.03),
                0 1px 0 1px alpha(@base, 0.30);
}

GtkSwitch.slider {
    border: 1px solid alpha(#000, 0.3);
    background-image: linear-gradient(to bottom,
                                      @button_gradient_a,
                                      @button_gradient_a
                                      );
}


/* Active */
GtkSwitch.slider:active {
    border: 1px solid alpha(#000, 0.3);
    background-image: linear-gradient(to bottom,
                                      @button_gradient_a,
                                      @button_gradient_a
                                      );
}

GtkSwitch.trough:active {
    color: @selected_foreground;
    background-image: linear-gradient(to bottom,
                                  shade (@selection, 0.9),
                                  @selection
                                  );

    border-style: none;
    box-shadow: inset 0 0 0 1px shade(@selection, 0.8);
    text-shadow:none;
}


/* Insensitive */
GtkSwitch.slider:insensitive {
    border: 1px solid @insensitive_border;
    background-image: linear-gradient(to bottom,
                                      @button_insensitive_gradient_a,
                                      @button_insensitive_gradient_a
                                      );
}

GtkSwitch.trough:insensitive,
GtkSwitch.trough:active:insensitive {
    color: @insensitive_text;
    box-shadow: inset 0px 0px 0px 1px @insensitive_border;
    background: @insensitive_trough_background;
    text-shadow: none;
}

/* backdrop */
GtkSwitch.slider:backdrop {
    border: 1px solid @backdrop_border;
    background-image: linear-gradient(to bottom,
                                      @button_backdrop_gradient_a,
                                      @button_backdrop_gradient_a
                                      );
}

GtkSwitch.trough:backdrop,
GtkSwitch.trough:active:backdrop {
    border-radius: 1em;
    color: @backdrop_text;
    background: @backdrop_trough_background;
    
    border: 1px solid @backdrop_border;
    box-shadow: none;
    text-shadow: none;
}