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

/***********/
/* Borders */
/***********/

/* generic element borders */
.entry,
GtkComboBox.combobox-entry .entry,
GtkComboBox.combobox-entry .button,
.toolbar .button,
.toolbar .button:active,
.button:active,
.button:insensitive,
.button.default:insensitive,
.spinbutton.vertical .button:active,
.spinbutton.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical .button:active,
.inline-toolbar.toolbar.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical .button.default:insensitive,
.trough,
.trough.highlight,
.titlebar .titlebutton:hover, 
.titlebar .titlebutton:active {
    border-image: -gtk-scaled(url("borders/generic-border-dark.png"),url("borders/generic-border@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

.trough row {
    border-image: -gtk-scaled (url("borders/nohl-generic-border-dark.png"),url("borders/nohl-generic-border@2-dark.png")) 3 / 3px stretch;
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* focused element borders */
.button:focus,
.entry:focus,
GtkComboBox.combobox-entry .entry:focus,
.button.default:active,
.inline-toolbar.toolbar.vertical .button.default:active { 
    border-image: -gtk-scaled(url("borders/generic-border-focused-dark.png"),url("borders/generic-border-focused@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* generic button borders */
.button,
.spinbutton.vertical .button,
.inline-toolbar.toolbar.vertical .button {
    border-image: -gtk-scaled(url("borders/button-border-dark.png"),url("borders/button-border@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* focused button borders */
.button.default { 
    border-image: -gtk-scaled(url("borders/button-border-default-dark.png"),url("borders/button-border-default@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* tooltip elements borders */
.tooltip .entry,
.tooltip .button {
    border-image: -gtk-scaled (url("borders/tooltip-generic-border.svg"),url("borders/tooltip-generic-border@2-dark.png")) 3 / 3px stretch;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* tooltip focused elements borders */
.tooltip .entry:focus {
    border-image: -gtk-scaled (url("borders/tooltip-generic-border-focused.svg"),url("borders/tooltip-generic-border-focused@2-dark.png")) 3 / 3px stretch;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - generic element borders */
.primary-toolbar .entry,
.primary-toolbar GtkComboBox.combobox-entry .entry,
.primary-toolbar GtkComboBox.combobox-entry .button,
.primary-toolbar GtkComboBox,
.primary-toolbar .button,
.primary-toolbar .button.image-button,
.primary-toolbar .button.text-button,
.primary-toolbar .button.raised:active,
.primary-toolbar .raised .button:active,
.primary-toolbar .button:hover,
.primary-toolbar .button.raised:hover,
.primary-toolbar .raised .button:hover,
.primary-toolbar .button.raised:insensitive,
.primary-toolbar .raised .button:insensitive,
.primary-toolbar .button.raised.default:insensitive,
.primary-toolbar .raised .button.default:insensitive,
.inline-toolbar.toolbar .button.default:insensitive,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar .button:insensitive,
.primary-toolbar GtkComboBox .button:active,
.primary-toolbar GtkComboBox .button:insensitive {
    border-image: -gtk-scaled(url("borders/primary-toolbar-generic-border-dark.png"),url("borders/primary-toolbar-generic-border@2-dark.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - focused element borders */
.primary-toolbar GtkComboBox:active,
.primary-toolbar .button:active,
.primary-toolbar .button.image-button:active
.primary-toolbar .entry:focus,
.primary-toolbar .button:focus,
.primary-toolbar GtkComboBox.combobox-entry .entry:focus,
.primary-toolbar .button.raised.default:active,
.primary-toolbar .raised .button.default:active,
.inline-toolbar.toolbar .button.default:active {
    border-image: -gtk-scaled(url("borders/primary-toolbar-generic-border-focused-dark.png"),url("borders/primary-toolbar-generic-border-focused@2-dark.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - generic button borders */
.primary-toolbar .button.raised,
.primary-toolbar .raised .button,
.inline-toolbar.toolbar .button,
.primary-toolbar GtkComboBox .button {
    border-image: -gtk-scaled(url("borders/primary-toolbar-button-border-dark.png"),url("borders/primary-toolbar-button-border@2-dark.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - focused button borders */
.primary-toolbar .button.raised.default,
.primary-toolbar .raised .button.default,
.inline-toolbar.toolbar .button.default {
    border-image: -gtk-scaled(url("borders/primary-toolbar-button-border-default-dark.png"),url("borders/primary-toolbar-button-border-default@2-dark.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* unfocused window: generic element borders */
.button:backdrop,
.header-bar .button:backdrop,
.spinbutton.vertical .button:backdrop,
GtkComboBox.combobox-entry .entry:backdrop,
GtkComboBox.combobox-entry .button:backdrop,
.entry:backdrop,
.trough:backdrop,
.inline-toolbar.toolbar.vertical .button:backdrop,
.inline-toolbar.toolbar.vertical .button:backdrop:insensitive,
.inline-toolbar.toolbar.vertical .button:backdrop:active,
.suggested-action.button:backdrop, 
.toolbar .suggested-action.button:backdrop,
.destructive-action.button:backdrop {
    border-image: -gtk-scaled (url("borders/generic-border-backdrop-dark.png"),url("borders/generic-border-backdrop@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 2px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

.trough row:backdrop {
    border-image: -gtk-scaled (url("borders/nohl-generic-border-backdrop-dark.png"),url("borders/nohl-generic-border-backdrop@2-dark.png")) 3 / 3px stretch;
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* unfocused window: primary toolbar generic element borders */
.primary-toolbar .button:active:backdrop,
.primary-toolbar .button.raised:backdrop,
.primary-toolbar .raised .button:backdrop,
.primary-toolbar GtkComboBox.combobox-entry .entry:backdrop,
.primary-toolbar GtkComboBox.combobox-entry .button:backdrop,
.primary-toolbar GtkComboBox .button:backdrop,
.primary-toolbar .entry:backdrop,
.inline-toolbar.toolbar .button:backdrop,
.inline-toolbar.toolbar .button:backdrop:insensitive,
.inline-toolbar.toolbar .button:backdrop:active {
    border-image: -gtk-scaled (url("borders/primary-toolbar-generic-border-backdrop-dark.png"),url("borders/primary-toolbar-generic-border-backdrop@2-dark.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* pushed colored buttons borders */
.selection-mode.toolbar .suggested-action.button,
.selection-mode.toolbar GtkToolButton.suggested-action .button {
    border-image: -gtk-scaled (url("borders/generic-border-transparent-dark.png"),url("borders/generic-border-transparent@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 4px;
    border-width: 0px 0px 1px 0px;
    border-style: solid;
    border-color: transparent;

}

/* suggested action buttons borders */
.suggested-action.button,
.suggested-action.button:active {
    border-image: -gtk-scaled(url("borders/button-border-suggested-dark.png"),url("borders/button-border-suggested@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* destructive action buttons borders */
.destructive-action.button,
.destructive-action.button:active {
    border-image: -gtk-scaled(url("borders/button-border-destructive-dark.png"),url("borders/button-border-destructive@2-dark.png")) 4 3 4 3 / 4px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}
/* Borders */

/* generic element borders */
.entry,
GtkComboBox.combobox-entry .entry,
GtkComboBox.combobox-entry .button,
.button:active,
.button:insensitive,
.button.default:insensitive,
.spinbutton.vertical .button:active,
.spinbutton.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical .button:active,
.inline-toolbar.toolbar.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical .button.default:insensitive,
.trough,
.trough.highlight,
.titlebar .titlebutton:hover, 
.titlebar .titlebutton:active {
    border-image: -gtk-scaled(url("borders/generic-border-dark.png"),url("borders/generic-border-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

.trough row {
    border-image: -gtk-scaled (url("borders/nohl-generic-border-dark.png"),url("borders/nohl-generic-border-dark@2.png")) 3 / 3px stretch;
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* focused element borders */
.entry:focus,
GtkComboBox.combobox-entry .entry:focus,
.button.default:active,
.inline-toolbar.toolbar.vertical .button.default:active { 
    border-image: -gtk-scaled(url("borders/generic-border-focused-dark.png"),url("borders/generic-border-focused-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* generic button borders */
.button,
.spinbutton.vertical .button,
.inline-toolbar.toolbar.vertical .button {
    border-image: -gtk-scaled(url("borders/button-border-dark.png"),url("borders/button-border-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* focused button borders */
.button.default { 
    border-image: -gtk-scaled(url("borders/button-border-default-dark.png"),url("borders/button-border-default-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* tooltip elements borders */
.tooltip .entry,
.tooltip .button {
    border-image: -gtk-scaled (url("borders/tooltip-generic-border-dark.svg"),url("borders/tooltip-generic-border-dark@2.png")) 3 / 3px stretch;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* tooltip focused elements borders */
.tooltip .entry:focus {
    border-image: -gtk-scaled (url("borders/tooltip-generic-border-focused-dark.svg"),url("borders/tooltip-generic-border-focused-dark@2.png")) 3 / 3px stretch;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - generic element borders */
.primary-toolbar .entry,
.primary-toolbar GtkComboBox.combobox-entry .entry,
.primary-toolbar GtkComboBox.combobox-entry .button,
.primary-toolbar .button:active,
.primary-toolbar .button.raised:active,
.primary-toolbar .raised .button:active,
.primary-toolbar .button.raised:insensitive,
.primary-toolbar .raised .button:insensitive,
.primary-toolbar .button.raised.default:insensitive,
.primary-toolbar .raised .button.default:insensitive,
.inline-toolbar.toolbar .button.default:insensitive,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar .button:insensitive,
.primary-toolbar GtkComboBox .button:active,
.primary-toolbar GtkComboBox .button:insensitive {
    border-image: -gtk-scaled(url("borders/primary-toolbar-generic-border-dark.png"),url("borders/primary-toolbar-generic-border-dark@2.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - focused element borders */
.primary-toolbar .entry:focus,
.primary-toolbar GtkComboBox.combobox-entry .entry:focus,
.primary-toolbar .button.raised.default:active,
.primary-toolbar .raised .button.default:active,
.inline-toolbar.toolbar .button.default:active {
    border-image: -gtk-scaled(url("borders/primary-toolbar-generic-border-focused-dark.png"),url("borders/primary-toolbar-generic-border-focused-dark@2.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - generic button borders */
.primary-toolbar .button.raised,
.primary-toolbar .raised .button,
.inline-toolbar.toolbar .button,
.primary-toolbar GtkComboBox .button {
    border-image: -gtk-scaled(url("borders/primary-toolbar-button-border-dark.png"),url("borders/primary-toolbar-button-border-dark@2.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* primary toolbar - focused button borders */
.primary-toolbar .button.raised.default,
.primary-toolbar .raised .button.default,
.inline-toolbar.toolbar .button.default {
    border-image: -gtk-scaled(url("borders/primary-toolbar-button-border-default-dark.png"),url("borders/primary-toolbar-button-border-default-dark@2.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}


/* unfocused window: generic element borders */
.selection-mode.toolbar .suggested-action.button:backdrop, 
.selection-mode.toolbar GtkToolButton.suggested-action .button:backdrop,
.button:backdrop,
.spinbutton.vertical .button:backdrop,
GtkComboBox.combobox-entry .entry:backdrop,
GtkComboBox.combobox-entry .button:backdrop,
.entry:backdrop,
.trough:backdrop,
.inline-toolbar.toolbar.vertical .button:backdrop,
.inline-toolbar.toolbar.vertical .button:backdrop:insensitive,
.inline-toolbar.toolbar.vertical .button:backdrop:active,
.suggested-action.button:backdrop, 
.toolbar .suggested-action.button:backdrop,
.destructive-action.button:backdrop {
    border-image: -gtk-scaled (url("borders/generic-border-backdrop-dark.png"),url("borders/generic-border-backdrop-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

.trough row:backdrop {
    border-image: -gtk-scaled (url("borders/nohl-generic-border-backdrop-dark.png"),url("borders/nohl-generic-border-backdrop-dark@2.png")) 3 / 3px stretch;
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

/* unfocused window: primary toolbar generic element borders */
.primary-toolbar .button:active:backdrop,
.primary-toolbar .button.raised:backdrop,
.primary-toolbar .raised .button:backdrop,
.primary-toolbar GtkComboBox.combobox-entry .entry:backdrop,
.primary-toolbar GtkComboBox.combobox-entry .button:backdrop,
.primary-toolbar GtkComboBox .button:backdrop,
.primary-toolbar .entry:backdrop,
.inline-toolbar.toolbar .button:backdrop,
.inline-toolbar.toolbar .button:backdrop:insensitive,
.inline-toolbar.toolbar .button:backdrop:active {
    border-image: -gtk-scaled (url("borders/primary-toolbar-generic-border-backdrop-dark.png"),url("borders/primary-toolbar-generic-border-backdrop-dark@2.png")) 4 / 4px stretch;
    border-radius: 3px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

/* pushed colored buttons borders */
.selection-mode.toolbar .suggested-action.button,
.selection-mode.toolbar GtkToolButton.suggested-action .button {
    border-image: -gtk-scaled (url("borders/generic-border-transparent-dark.png"),url("borders/generic-border-transparent-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 4px;
    border-width: 0px 0px 1px 0px;
    border-style: solid;
    border-color: transparent;

}

/* suggested action buttons borders */
.suggested-action.button,
.suggested-action.button:active {
    border-image: -gtk-scaled(url("borders/button-border-suggested-dark.png"),url("borders/button-border-suggested-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

/* destructive action buttons borders */
.destructive-action.button,
.destructive-action.button:active {
    border-image: -gtk-scaled(url("borders/button-border-destructive-dark.png"),url("borders/button-border-destructive-dark@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;
    border-radius: 3px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}
