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

/*******************
 * Notebook & Tabs *
 *******************/

.notebook {
    
    background-color: @base;
    border:none;
    
    box-shadow:0 0 0 1px @border;

    background-clip: border-box;

    text-shadow: 0 1px @text_shadow;
    icon-shadow: 0 1px @text_shadow;
    
}
.notebook.header {
    border: none;
    background-color: transparent;
}

.notebook.frame {
   /*FIXME: Move the border down here so devs have more control*/
    border: none;
}

.notebook GtkViewport {
    background-color: @base;
    border:none;
}

.notebook:insensitive,
.notebook GtkViewport:insensitive {
    background-color: @insensitive_background;
    border-color: @insensitive_border;
    color: @insensitive_text;
}

.notebook:backdrop,
.notebook GtkViewport:backdrop {
    background-color: @backdrop_background;
    border-color: @backdrop_border;
    color: @backdrop_text;
    text-shadow:none;
}

.notebook:insensitive:backdrop,
.notebook GtkViewport:insensitive:backdrop {
    background-color: @backdrop_insensitive_background;
    border-color: @backdrop_border;
    text-shadow:none;
}


/*----- Tabs -----*/

.notebook tab {
    border: none;
    border-radius: 0;
    background: none;
    color: @foreground;
}

.notebook tab > .entry {
    border-radius: 2px;
    padding: 2px 5px;
}

.notebook tab:active {
    border: none;
    background: none;
    color: @foreground;
}

.notebook tab:hover {
    background-image: linear-gradient(to bottom,
                                  alpha(#fff, 0.10),
                                  alpha(#fff, 0.20)
                                  );
}

.notebook tab:backdrop {
    border: none;
    background: none;
    color: @backdrop_text;
}

.notebook tab:insensitive {
    border: none;
    background: none;
    color: @insensitive_text;
}

/*----- Tab indicator bar -----*/

/* Normal */
.notebook tab.top {
    box-shadow:inset 0 -1px 0 0 @border;
}
.notebook tab.bottom {
    box-shadow:inset 0 1px 0 0 @border;
}
.notebook tab.left {
    box-shadow:inset -1px 0 0 0 @border;
}
.notebook tab.right {
    box-shadow:inset 1px 0 0 0 @border;
}

/* Active */
.notebook tab.top:active {
    box-shadow:inset 0 -3px 0 0 @selection;
}
.notebook tab.bottom:active {
    box-shadow:inset 0 3px 0 0 @selection;
}
.notebook tab.left:active {
    box-shadow:inset -3px 0 0 0 @selection;
}
.notebook tab.right:active {
    box-shadow:inset 3px 0 0 0 @selection;
}

/* Active-Backdrop */
.notebook tab.top:active:backdrop {
    box-shadow:inset 0 -3px 0 0 @backdrop_border;
}
.notebook tab.bottom:active:backdrop {
    box-shadow:inset 0 3px 0 0 @backdrop_border;
}
.notebook tab.left:active:backdrop {
    box-shadow:inset -3px 0 0 0 @backdrop_border;
}
.notebook tab.right:active:backdrop {
    box-shadow:inset 3px 0 0 0 @backdrop_border;
}

/* Backdrop */
.notebook tab.top:backdrop {
    box-shadow:inset 0 -1px 0 0 @backdrop_border;
}
.notebook tab.bottom:backdrop {
    box-shadow:inset 0 1px 0 0 @backdrop_border;
}
.notebook tab.left:backdrop {
    box-shadow:inset -1px 0 0 0 @backdrop_border;
}
.notebook tab.right:backdrop {
    box-shadow:inset 1px 0 0 0 @backdrop_border;
}

/* Insensitive */
.notebook tab.top:insensitive {
    box-shadow:inset 0 -1px 0 0 @insensitive_border;
}
.notebook tab.bottom:insensitive {
    box-shadow:inset 0 1px 0 0 @insensitive_border;
}
.notebook tab.left:insensitive {
    box-shadow:inset -1px 0 0 0 @insensitive_border;
}
.notebook tab.right:insensitive {
    box-shadow:inset 1px 0 0 0 @insensitive_border;
}

/*----- In-tab padding -----*/

.notebook tab.top {
    padding-top: 2px;
    padding-left: 8px;
    padding-bottom: 3px;
    padding-right: 8px;
}

.notebook tab.bottom {
    padding-top: 3px;
    padding-left: 8px;
    padding-bottom: 2px;
    padding-right: 8px;
}

.notebook tab.left {
    padding: 2px 3px 2px 2px;
}

.notebook tab.right {
    padding: 2px 2px 2px 3px;
}

.notebook tab.top:active {
    padding: 2px 8px 3px 8px;
}

.notebook tab.bottom:active {
    padding: 3px 8px 2px 8px;
}

.notebook tab.left:active {
    padding: 2px 3px 2px 2px;
}

.notebook tab.right:active {
    padding: 2px 2px 2px 3px;
}

.notebook.header,
.notebook.header:backdrop {
    background-color: shade(@background, 0.95);
    box-shadow: inset 0 1px alpha(#000, 0.03);
    border-width: 0px;
}

.notebook.header.frame.top,
.notebook.header.frame.top:backdrop {
    border-top: 1px solid @border;
    border-left: 1px solid @border;
    border-right: 1px solid @border;
}

.notebook.header.frame.bottom,
.notebook.header.frame.bottom:backdrop {
    border-bottom: 1px solid @border;
    border-left: 1px solid @border;
    border-right: 1px solid @border;
}

.notebook.header.frame.left,
.notebook.header.frame.left:backdrop {
    border-top: 1px solid @border;
    border-bottom: 1px solid @border;
    border-left: 1px solid @border;
}

.notebook.header.frame.right,
.notebook.header.frame.right:backdrop {
    border-top: 1px solid @border;
    border-bottom: 1px solid @border;
    border-right: 1px solid @border;
}

/*----- Labels -----*/

.notebook tab GtkLabel {
    background-color: transparent;
    color: @backdrop_text;
    /*text-shadow: 0px 1px @text_shadow;*/
    text-shadow: none;
}

.notebook tab:active GtkLabel,
.notebook .active-page,
.notebook tab .active-page GtkLabel {
    background-color: transparent;
    color: @foreground;
    font-weight: bold;
    text-shadow: 0 1px alpha(@base,0.2);
}

.notebook tab:backdrop GtkLabel,
.notebook tab GtkLabel:backdrop {
    background-color: transparent;
    color: @backdrop_text;
    text-shadow: none;
}

/*----- Close Button -----*/

/* close button styling */
.notebook tab .button,
.notebook tab .button:active,
.notebook tab .button:hover {
    color: @backdrop_text;
    border-image: none;
    background-image: none;
    background-color: transparent;
    border-radius: 3px;
    border-style: solid;
    border-color: transparent;
    border-width: 1px;
    padding: 2px;
    icon-shadow: 0 1px @text_shadow;
    box-shadow: none;
}

.notebook tab .button:hover {
    color: @foreground;
    border-color: alpha(#000, 0.1);
}

.notebook tab .button:active,
.notebook tab .button: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;

    border-color: @border;
}

.notebook tab .button:backdrop {
    color: mix(@backdrop_foreground, @backdrop_base, 0.7);
    icon-shadow: none;
}

.notebook tab .button:backdrop:hover {
    color: @backdrop_foreground;
}