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

/**************
 * Header Bar *
 **************/

.header-bar,
.header-bar.toolbar {
    padding-top: 4px;
    padding-left: 6px;
    padding-bottom: 4px;
    padding-right: 6px;
    border: none;
    box-shadow: inset 0 -1px 0 0 @border;
    background-image: linear-gradient(to bottom,
                                  @gradient_a,
                                  @gradient_b
                                  );
}

.maximized .header-bar {
    padding-top: 4px;
    padding-left: 6px;
    padding-bottom: 4px;
    padding-right: 6px;
    border: none;
    box-shadow: inset 0 -1px 0 0 @border;
}

.header-bar:backdrop,
.header-bar.toolbar:backdrop {
    border: none;
    box-shadow: inset 0 -1px 0 0 @backdrop_border;
    background-color: @backdrop_gradient_a;
    background-image: linear-gradient(to bottom,
                                  @backdrop_gradient_a,
                                  @backdrop_gradient_b
                                  );
}

.header-bar .button.text-button {
    padding: 2px 16px;
}

.header-bar .button.image-button {
    padding-top: 4px;
    padding-left: 4px;
    padding-bottom: 4px;
    padding-right: 4px;/*
    border: none;
    border-image: none;
    box-shadow: none;
    border: 1px solid transparent;
}

.header-bar .button.image-button:hover,
.header-bar .button.image-button:active {
    border: 1px solid @border;*/
}

/* Title */
.header-bar .title {
    font: Bold 11;
}

.header-bar .title:backdrop {
    color: @backdrop_text;
}

/* Subtitle */
.header-bar .subtitle {
    font: 9;
}

.header-bar GtkComboBox,
.header-bar .button {
    color: @foreground;
    background-image: linear-gradient(to bottom,
                                  @button_gradient_a,
                                  @button_gradient_b
                                  );

    box-shadow: inset 0 0 0 1px alpha(@base, 0.1),
                inset 0 1px 0 0 alpha(@base, 0.45),
                inset 0 -1px 0 0 alpha(@base, 0.15);

    text-shadow: 0 1px @text_shadow;
    icon-shadow: 0 1px @icon_shadow;
}

.header-bar GtkComboBox:active,
.header-bar .button:active {
    color: @foreground;
    background-image: linear-gradient(to bottom,
                                  @button_active_gradient_a,
                                  @button_active_gradient_b
                                  );
    
    box-shadow: inset 0 0 0 1px alpha(@base, 0.1),
                inset 0 1px 0 0 alpha(@base, 0.45),
                inset 0 -1px 0 0 alpha(@base, 0.15);
}

.header-bar GtkComboBox:hover,
.header-bar .button:hover {
    color: @foreground;
    background-image: linear-gradient(to bottom,
                                  shade(@button_gradient_a, 1.05),
                                  shade(@button_gradient_b, 1.05)
                                  );
    
    box-shadow: inset 0 0 0 1px alpha(@base, 0.1),
                inset 0 1px 0 0 alpha(@base, 0.45),
                inset 0 -1px 0 0 alpha(@base, 0.15);
}

.header-bar GtkComboBox:backdrop,
.header-bar .button:backdrop,
.header-bar .button.image-button:backdrop {
    color: @backdrop_text;
    background-image: linear-gradient(to bottom,
                                  @backdrop_gradient_a,
                                  @backdrop_gradient_b
                                  );
    box-shadow: none;
}


.header-bar .button:backdrop:hover {
    border: 1px solid shade(@backdrop_border, 1.1);
    background-image: linear-gradient(to bottom,
                                  @backdrop_gradient_a,
                                  @backdrop_gradient_b
                                  );
}


.header-bar GtkComboBox:insensitive,
.header-bar .button:insensitive {
    color: @insensitive_text;
    background-image: linear-gradient(to bottom,
                                  @button_insensitive_gradient_a,
                                  @button_insensitive_gradient_b
                                  );
    box-shadow: none;
}

.header-bar .button GtkImage:insensitive {
    color: @insensitive_text;
}

.header-bar GtkComboBox:hover,
.header-bar .button:hover {
    color: @hover_text;
    background-image: linear-gradient(to bottom,
                                  @button_hover_gradient_a,
                                  @button_hover_gradient_b
                                  );
}

.header-bar GtkComboBox:active:hover,
.header-bar .button:active:hover {
    color: @hover_text;
    background-image: linear-gradient(to bottom,
                                  @button_hover_gradient_b,
                                  @button_hover_gradient_a
                                  );
}


/*************************
 * Header bar separator  *
 *************************/

.header-bar > GtkBox > .separator.vertical {
    -GtkWidget-wide-separators: 1;
    -GtkWidget-separator-width: 2px;
    background: transparent;
    border-width: 0 1px 0 1px;
    border-style: solid;
    border-color: transparent;
}

/* Separator */
.header-bar .separator,
.header-bar .button .separator,
.header-bar .button.separator {
    color: transparent;
}

/* Close button */

.header-bar .button GtkImage {
    border-radius: 4px;
    color: @foreground;
    border: 1px solid transparent;
    icon-shadow: 0 1px @text_shadow;
    text-shadow: 0 1px @text_shadow;
}

.header-bar .button GtkImage:hover {
    color: @active_text;
    border:none;
}

.header-bar .button GtkImage:active,
.header-bar .button GtkImage:active:hover {
    background-color: alpha(#000, 0.08);
    box-shadow: inset 0 1px alpha(#000, 0.05);
    color:  @button_active_text;
    icon-shadow: 0 1px @text_shadow;
    text-shadow: 0 1px @text_shadow;

    border-color: @border;
}

.header-bar .button GtkImage:backdrop {
    color: @backdrop_text;
    icon-shadow: none;
}

.header-bar .button GtkImage:backdrop:hover {
    color: @foreground;
}