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


/***********
 * Buttons *
 ***********/
 
.button,
.button.text-button,
.button.image-button {
    -GtkWidget-focus-padding: 0;
    -GtkWidget-focus-line-width: 0;
    
    padding: 3px 8px;

    background-image: linear-gradient(to bottom,
                                  @button_gradient_a,
                                  @button_gradient_b
                                  );

    box-shadow: inset 0 0 0 1px alpha(@base, 0.05),
                inset 0 1px 0 0 alpha(@base, 0.45),
                inset 0 -1px 0 0 alpha(@base, 0.15);
    color: @foreground;
    text-shadow: 0 1px @text_shadow;
    icon-shadow: 0 1px @icon_shadow;
}

.button.flat,
.button.flat:backdrop,
.button.flat:backdrop:insensitive,
.menuitem.button.flat,
.menuitem.button.flat:backdrop,
.menuitem.button.flat:backdrop:hover,
.button:link,
.button:visited,
.button:link:hover,
.button:link:active,
.button:visited:hover,
.button:visited:active,
.button:link:backdrop,
.button:visited:backdrop,
.notebook tab
.button,
.list-row.button,
.list-row.button:backdrop:hover,
GtkCalendar.button,
GtkCalendar.button:hover,
GtkCalendar.button:backdrop,
GtkCalendar.button:backdrop:hover,
.scale-popup .button:hover,
.scale-popup .button:backdrop,
.scale-popup .button:backdrop:hover,
.scale-popup .button:backdrop:insensitive {
  /*border: 1px solid transparent;*/
  background-color: transparent;
  background-image: none;
  text-shadow: none;
  icon-shadow: none;
  box-shadow: none;
  padding: 4px 9px;
}


.button:focus,
.button:hover {
    background-image: linear-gradient(to bottom,
                                  @button_active_gradient_b,
                                  @button_active_gradient_a
                                  );
}


/* Active/Pressed Button */
.button:active {
    background-image: linear-gradient(to bottom,
                                  @button_active_gradient_a,
                                  @button_active_gradient_b
                                  );
}
/* Active/Pressed Button */
.button:active:hover {
    background-image: linear-gradient(to bottom,
                                  shade(@button_active_gradient_a, 1.05),
                                  shade(@button_active_gradient_b, 1.05)
                                  );
}


/* Separator */
.button .separator,
.button.separator {
    color: @border;
}

.button .separator:insensitive,
.button.separator:insensitive {
    color: @insensitive_border;
}

/* Insensitive Button */
.button:insensitive,
.button.default:insensitive,
.button:active:insensitive {
    background-color: @insensitive_background;
    background-image: none;
    color: @insensitive_text;
    text-shadow: none;
}

/* backdrop Button */
.button:backdrop,
.button.default:backdrop,
.button:active:backdrop {
    background-color: @backdrop_background;
    background-image: linear-gradient(to bottom,
                                  @button_backdrop_gradient_a,
                                  @button_backdrop_gradient_b
                                  );
    color: @backdrop_text;
    text-shadow: none;
    box-shadow: none;
}


/* Default Button */
.button.default {
    color: @foreground;
    background-image: linear-gradient(to bottom,
                              @button_gradient_a,
                              @button_gradient_b
                              );
}

.button.default:hover,
.button.default:active {
    color: @active_text;
    background-image: linear-gradient(to bottom,
                              @button_active_gradient_a,
                              @button_active_gradient_b
                              );
}

.button.default:active:hover {
    background-image: linear-gradient(to bottom,
                              @button_active_gradient_a,
                              @button_active_gradient_b
                              );
}

/* Flat Button */
.button.flat:active {
}


/**************
* Help Button *
**************/

.help_button {
    border-radius: 16px;
}

/*************************** 
* Overlay Button *
***************************/

GtkOverlay > .button,
GtkOverlay > .button:hover,
GtkOverlay > .button:backdrop,
GtkOverlay > .button:focus {
    background-image: none;
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;

    box-shadow: 0 1px 0 1px alpha(#000, 0.30);
    text-shadow: 0 1px alpha(#000, 0.30);

    background-clip: border-box;
}

GtkOverlay > .button:active,
GtkOverlay > .button:hover:active {
    background-color: #fff;
    color: @foreground_color;
    border-color: #fff;
    text-shadow: none;
}

GtkOverlay > .button:focus,
GtkOverlay > .button:focus:active {
    border-color: @selection;
}

GtkOverlay > .button:focus:active {
    background-color: @selection;
}


/******************
 * Button No Undo *
 ******************/
.button.noundo,
.content-view .button.noundo {
    border-color: @error_border;
    background-color: shade(@error, 1.08);
    color: @error_foreground;
}

.button.noundo:hover,
.content-view .button.noundo:hover {
    border-color: shade(@error, 0.7);
    background-color: @error;
}

.button.noundo:active,
.content-view .button.noundo:active {
    border-color: @error_border;
    background-color: shade(@error, 0.95);
}

.button.noundo:active:hover,
.content-view .button.noundo:active:hover {
    border-color: shade(@error, 0.7);
    background-color: shade(@error, 0.97);
}

.button.noundo GtkLabel,
.button.noundo Gtklabel:prelight {
    color: @error_foreground;
}

/**********************
 * Affirmative Button *
 **********************/
.button.affirmative,
.content-view .button.affirmative {
    border-color: @selected_border;
    background-color: shade(@selected_background, 1.08);
    color: @selected_foreground;
}

.button.affirmative:hover,
.content-view .button.affirmative:hover {
    border-color: @selected_border;
    background-color: @selected_background;
}

.button.affirmative:active,
.content-view .button.affirmative:active {
    border-color: @selected_border;
    background-color: shade(@selected_background, 0.95);
}

.button.affirmative:active:hover,
.content-view .button.affirmative:active:hover {
    border-color: @selected_border;
    background-color: shade(@selected_background, 0.97);
}

.button.affirmative GtkLabel,
.button.affirmative Gtklabel:prelight {
    color: @selected_foreground;
}