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

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

.dynamic-notebook .notebook.header {
    background-image: linear-gradient(to bottom,
                                  alpha(#000, 0.20),
                                  alpha(#000, 0.00) 5%
                                  ),
                        linear-gradient(to bottom,
                                  shade (@background, 0.9),
                                  shade (@background, 0.95)
                                  );
    border: 0 solid @border;
    border-radius: 0;
    border: none;
}

.dynamic-notebook .notebook.header:backdrop {
    background-color: @backdrop_background;
    background-image: none;
    border-color: @backdrop_border;
}

.dynamic-notebook {
    background-color: transparent;
    border:none;

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

.dynamic-notebook:backdrop {
    background-clip: border-box;
    background-color: transparent;
    background-image: none;
    border:none;
    icon-shadow: none;
    text-shadow: none;
}


.dynamic-notebook .notebook {
    -GtkNotebook-tab-overlap: 1px;
    border-width: 0;
}

.dynamic-notebook .notebook .button {
    background-image: none;
    box-shadow: none;
    color: shade (@foreground, 1.20);
    border-image: none;
}

.dynamic-notebook .notebook .button GtkImage,
.dynamic-notebook .notebook .button:active GtkImage {
    background-image: none;
    box-shadow: none;
    color: @foreground;
}

.dynamic-notebook GtkImage:insensitive {
    color: @insensitive_text;
}

.dynamic-notebook .notebook .button:hover {
    background-color: alpha(#000, 0.05);
    border-color: alpha(#000, 0.2);
    box-shadow: inset 0 0 0 1px alpha(#000, 0.05);
    color: shade (@foreground, 1.10);
}

.dynamic-notebook .notebook .button:hover:active {
    background-color: alpha(#000, 0.10);
}

.dynamic-notebook GtkLabel {
    background-color: transparent;
    color: @foreground;
    text-shadow: 0px 1px @text_shadow;
}

.dynamic-notebook GtkLabel:active {
    color: @foreground;
    font-weight: bold;
    text-shadow: 0 1px @text_shadow;
}

.dynamic-notebook GtkLabel:backdrop {
    color: @backdrop_text;
    text-shadow: none;
}

.dynamic-notebook GtkLabel:insensitive,
.dynamic-notebook .image:insensitive {
    background-color: transparent;
    color: @insensitive_background;
}


.dynamic-notebook .notebook {
    -GtkNotebook-tab-overlap: 0;
    border-width: 0;
}


.dynamic-notebook .notebook tab {
    text-shadow: 0 1px @text_shadow;
    icon-shadow: 0 1px @text_shadow;
    color: @foreground;
}

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

.dynamic-notebook .notebook tab GtkImage {
    color: @foreground;
}

.dynamic-notebook .notebook tab:active {
    text-shadow: 0 1px @text_shadow;
    icon-shadow: 0 1px @text_shadow;
    color: @foreground;
}


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



.dynamic-notebook .notebook tab:active:backdrop,
.dynamic-notebook .notebook tab:backdrop {
    background-color: @backdrop_background;
    background-image: none;
    border: 0 solid transparent;
    text-shadow: none;
    icon-shadow: none;
    color: @foreground;
}

.dynamic-notebook .notebook tab:insensitive {
    background-color: @insensitive_background;
    border: 0 solid transparent;
    text-shadow: none;
    icon-shadow: none;
    color: @foreground;
}

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

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

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

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


/* Hover */
.dynamic-notebook tab.top:hover {
    box-shadow:inset 0 -3px 0 0 alpha(white, 0.4);
}
.dynamic-notebook tab.bottom:hover {
    box-shadow:inset 0 3px 0 0 alpha(white, 0.4);
}
.dynamic-notebook tab.left:hover {
    box-shadow:inset -3px 0 0 0 alpha(white, 0.4);
}
.dynamic-notebook tab.right:hover {
    box-shadow:inset 3px 0 0 0 alpha(white, 0.4);
}


/* Hover-Backdrop */
.dynamic-notebook tab.top:hover {
    box-shadow:inset 0 -3px 0 0 alpha(white, 0.1);
}
.dynamic-notebook tab.bottom:hover:backdrop {
    box-shadow:inset 0 3px 0 0 alpha(white, 0.1);
}
.dynamic-notebook tab.left:hover:backdrop {
    box-shadow:inset -3px 0 0 0 alpha(white, 0.1);
}
.dynamic-notebook tab.right:hover:backdrop {
    box-shadow:inset 3px 0 0 0 alpha(white, 0.1);
}

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

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

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

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

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

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

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

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

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

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

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


.dynamic-notebook .notebook tab > .button,
.dynamic-notebook .notebook tab > .button:hover,
.dynamic-notebook .notebook tab > .button:hover:active,
.notebook tab .button:hover,
.notebook tab .button:hover:active {
    background-image: none;
    background-color: alpha(#000, 0.02);

    border-color: @border;
}

.dynamic-notebook .notebook tab > .button:hover:active,
.notebook tab > .button:hover:active {
    background-color: alpha(#000, 0.10);
}