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


/*************************
 * Touch text selections *
 *************************/

GtkPopover {
    padding: 2px;
    border-radius: 6px;
    background-clip: border-box;
    background-color: @background;
    border: 1px solid alpha(#000, 0.3);
    box-shadow: 0 2px 3px 2px @menu_shadow;
    margin: 10px;
    color: @text;
}

GtkPopover.osd {
    background-color: @osd_popover_background;
    border-color: @border;
    box-shadow: 0 2px 8px 3px alpha(@menu_shadow, 0.4), inset 0 1px 0 0 @osd_popover_background;
    color: darker(white);
}


/* Buttons */
GtkPopover .button,
GtkPopover .button .image-button {
    background-color: @base;
    color: @text;
}

GtkPopover .button:focus,
GtkPopover .button .image-button:focus {
    color: shade(@text, 0.8);
}

GtkPopover .button:hover,
GtkPopover .button .image-button:hover {
    color: @selection;
}

GtkPopover .button:active,
GtkPopover .button .image-button:active {
    background-color: @selection;
    color: shade(@text, 0.8);
}

GtkPopover .button:active:hover,
GtkPopover .button .image-button:active:hover {
    background-color: shade(@selection, 1.1);
    color: @selection_foreground;
}

GtkPopover .button:insensitive,
GtkPopover .button .image-button:insensitive {
    color: @insensitive_text;
}

GtkPopover .button:backdrop,
GtkPopover .button .image-button:backdrop {
    color: @backdrop_text;
}


/* Linked Buttons */
GtkPopover .linked .button,
GtkPopover .linked .button .image-button {
    border: 1px solid @border;
    background-color: @base;
    color: @text;
}

GtkPopover .linked .button:focus,
GtkPopover .linked .button .image-button:focus {
    color: shade(@text, 0.8);
}

GtkPopover .linked .button:hover,
GtkPopover .linked .button .image-button:hover {
    color: @selection;
}

GtkPopover .linked .button:active,
GtkPopover .linked .button .image-button:active {
    background-color: @selection;
    color: shade(@text, 0.8);
}

GtkPopover .linked .button:active:hover,
GtkPopover .linked .button .image-button:active:hover {
    background-color: shade(@selection, 1.1);
    color: shade(@text, 0.8);
}

GtkPopover .linked .button:insensitive,
GtkPopover .linked .button .image-button:insensitive {
    color: @insensitive_text;
}

GtkPopover .linked .button:backdrop,
GtkPopover .linked .button .image-button:backdrop {
    color: @backdrop_text;
}


GtkPopover .linked .button:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

GtkPopover .linked .button:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Separator */
GtkPopover .separator {
    font-size: 80%;
    font-weight: bold;
    color: @border;
    background: none;
    border: 0;
}

GtkPopover.osd > .toolbar .button {
    border-radius: 0px;
    border-width: 0px;
}


/* Images */
GtkPopover .button:focus GtkImage,
GtkPopover .button GtkImage {
    color: @text;
}

GtkPopover .button:active GtkImage {
    color: @selection_foreground;
}

GtkPopover .button:hover GtkImage,
GtkPopover .image-button:hover GtkImage {
    color: shade(@text, 2.0);
}

GtkPopover .button:backdrop GtkImage,
GtkPopover .button:backdrop:hover GtkImage,
GtkPopover .button:active:backdrop GtkImage {
    color: @backdrop_text;
    /*-gtk-image-effect: dim;*/
}

GtkPopover .button:insensitive GtkImage {
    color: @insensitive_text;
    /*-gtk-image-effect: dim;*/
}

GtkPopover .button:insensitive:backdrop GtkImage {
    color: mix(@backdrop_text, @insensitive_text, 0.5);
    /*-gtk-image-effect: dim;*/
}

/* Labels */
GtkPopover .button:focus GtkLabel,
GtkPopover .button GtkLabel {
    color: @text;
}

GtkPopover .button:active GtkLabel {
    color: @selection_foreground;
}

GtkPopover .button:hover GtkLabel {
    color: shade(@text, 2.0);
}

GtkPopover .button:backdrop GtkLabel,
GtkPopover .button:backdrop:hover GtkLabel,
GtkPopover .button:active:backdrop GtkLabel {
    color: @backdrop_text;
}

GtkPopover .button:insensitive GtkLabel {
    color: @insensitive_text;
}

GtkPopover .button:insensitive:backdrop GtkLabel {
    color: mix(@backdrop_text, @insensitive_text, 0.5);
}