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

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

.dynamic-notebook .notebook.header {
    background: none;
    background-color: @background;
    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: none;
    border:none;

}

.dynamic-notebook:backdrop {
    background-clip: border-box;
    background: none;
    background-image: none;
    border: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: none;
    color: @foreground;
}

.dynamic-notebook GtkLabel:active {
    color: @foreground;
    font-weight: bold;
}

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

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


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


.dynamic-notebook .notebook tab {
    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 {
    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;
    color: @foreground;
}

.dynamic-notebook .notebook tab:insensitive {
    background-color: @insensitive_background;
    border: 0 solid transparent;
    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: 4px;
    padding-left: 8px;
    padding-bottom: 6px;
    padding-right: 8px;
}

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

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

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

.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: 6px;
}

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


.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);
}