@define-color nautilus_cluebar_color #729fcf;

@define-color documents_selection_toolbar_a #8e9c80;
@define-color documents_selection_toolbar_b #4f6838;
@define-color documents_selection_toolbar_border #3e7b05;

@define-color documents_selection_button_a #7fc141;
@define-color documents_selection_button_b #47850d;
@define-color documents_selection_button_c #4e9a06;

@define-color documents_emblem_bg #3465a4;
@define-color documents_collection_bg #d3d7cf;

@define-color documents_osd_toolbar_a alpha(#242424, 0.80);
@define-color documents_osd_toolbar_b alpha(#101010, 0.80);
@define-color documents_osd_toolbar_c alpha(#262626, 0.80);

@define-color documents_osd_button_a @theme_base_color;
@define-color documents_osd_button_b #525252;
@define-color documents_osd_button_inset #9f9f9f;

@define-color documents_osd_fg #bebebe;

/****************
 * Applications *
 ****************/
ApDocView, /* Abiword */
EogScrollView, /* Eog */
CheeseThumbView /* Cheese */
{
    background-color: @chrome_bg_color;
    -EogScrollView-shadow-type: none;
}

/* gnome-terminal */
TerminalScreen {
    background-color: @theme_base_color;
    color: @theme_fg_color;
    -TerminalScreen-background-darkness: 0.95;
}

TerminalWindow GtkNotebook.notebook {
    border-bottom-width: 0;
    border-right-width: 0;
    border-left-width: 0;
}

/* nautilus */
.nautilus-canvas-item {
    border-radius: 5px;
}

.nautilus-inactive-pane .nautilus-canvas-item:selected {
    background-color: @theme_unfocused_selected_bg_color;
    color: @theme_unfocused_selected_fg_color;
}

.nautilus-desktop.nautilus-canvas-item {
    color: @theme_bg_color;
    text-shadow: 1 1 black;
}

.nautilus-desktop.nautilus-canvas-item:active {
    color: @theme_text_color;
}

.nautilus-desktop.nautilus-canvas-item:selected {
    color: @theme_selected_fg_color;
}

.nautilus-desktop.nautilus-canvas-item:active,
.nautilus-desktop.nautilus-canvas-item:prelight,
.nautilus-desktop.nautilus-canvas-item:selected {
    text-shadow: none;
}

NautilusTrashBar.info,
NautilusXContentBar.info,
NautilusSearchBar.info,
NautilusQueryEditor.info {
    background-color: @nautilus_cluebar_color;
    color: @theme_base_color;

    border-color: shade(@nautilus_cluebar_color, 0.85);
}

.nautilus-cluebar-label {
    font: bold;
    color: @theme_base_color;
    text-shadow: 0 1 alpha(black, 0.15);
}

.nautilus-cluebar-label:backdrop {
    font: bold;
    color: @theme_unfocused_fg_color;
    text-shadow: none;
}

/* This will make the location entry tall as buttons.
   Buttons are too tall btw, then it's ugly */
/*NautilusLocationEntry.entry {
    -GtkEntry-inner-border: 9;
}*/

NautilusLocationEntry.entry {
    padding-left: 4px;
    padding-right: 4px;
}


NautilusSearchBar .entry,
NautilusSearchBar .entry:focus {
    border-image: none;
    border-color: darker(@nautilus_cluebar_color);
    border-style: solid;
    border-width: 1px;
    padding-left: 4px;
    padding-right: 4px;

    -GtkEntry-inner-border: 3;
}

NautilusWindow .sidebar .frame {
    border-width: 1px 0 0 0;
    border-style: solid;
    border-color: @borders;
    border-radius: 0;
}

NautilusWindow > GtkGrid > .pane-separator {
    border-width: 1px 1px 0 0;
    border-style: solid;
    border-color: @borders;
}

NautilusWindow > GtkGrid > .pane-separator,
NautilusWindow > GtkGrid > .pane-separator:hover {
    border-width: 1px 1px 0 0;
    border-style: solid;
    border-color: @borders;
    background-color: @sidebar_bg;
    color: shade (@theme_bg_color, 0.9);
}

NautilusWindow > GtkGrid > .pane-separator:backdrop,
NautilusWindow > GtkGrid > .pane-separator:hover:backdrop {
    border-width: 1px 1px 0 0;
    border-style: solid;
    border-color: @unfocused_borders;
    background-color: @sidebar_bg_unfocused;
    color: shade (@theme_bg_color, 0.9);
}

NautilusNotebook.notebook {
    border-right-width: 0;
    border-left-width: 0;
    border-bottom-width: 0;
}

/* gedit */

GeditWindow .pane-separator,
GeditWindow .pane-separator:hover {
   border-width: 0 1px 1px 1px;
   border-style: solid;
   border-color: @borders;
   background-color: shade(@theme_bg_color, 0.95);
   color: @borders;
}

GeditPanel .toolbar {
    border-style: none;
    background-color: transparent;
}

GeditWindow .sidebar {
    background-color: @theme_base_color;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: @borders;

}

GeditPanel .notebook {
    padding: 2px;
    border-width: 1px 0;
}

GeditWindow .notebook {
    border-width: 1px 0;
}

GeditPanel .notebook tab,
GeditWindow .notebook tab {
    border-width: 0;
}

/* gnome-documents */
.documents-dropdown,
.documents-dropdown .view {
    background-color: shade (@theme_bg_color, 1.02);
}

.documents-dropdown .frame {
    border-width: 0 1px 1px 1px;
    border-style: solid;
    border-radius: 0 0 5px 5px;
}

.documents-dropdown .radio,
.documents-dropdown .radio:focused,
.documents-dropdown .radio:selected {
    background-image: none;
    background-color: alpha(@theme_base_color, 0.0);
}

.documents-dropdown .radio:active,
.documents-dropdown .radio:active:focused,
.documents-dropdown .radio:active:prelight {
    background-image: url("assets/sidebar-radio-checked.svg");
}

.documents-dropdown .radio:prelight {
    background-image: url("assets/sidebar-radio-prelight.svg");
}

.documents-dropdown .radio:active:selected,
.documents-dropdown .radio:active:selected:focused {
    background-image: url("assets/sidebar-radio-selected.svg");
}

.documents-dropdown .radio:selected:prelight,
.documents-dropdown .radio:selected:focused {
    background-image: url("assets/sidebar-radio-selected-prelight.svg");
}

.documents-load-more.button {
    border-image-width: 0 2 2 2;
    border-width: 0 1px 1px 1px;
}

.documents-scrolledwin.frame {
    border-width: 1px 0;
    border-radius: 0;
}

.documents-main-view.view {
    background-color: #f1f2f1;
}

.documents-selection-mode.toolbar {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(@documents_selection_toolbar_a),
                                    to(@documents_selection_toolbar_b));
    color: @theme_base_color;
    border-width: 1px 0 0 0;
    border-color: @documents_selection_toolbar_border;
    border-style: solid;
}

.documents-selection-mode.toolbar .dim-label {
    color: alpha(@theme_base_color, 0.50);
}

.documents-selection-mode.toolbar .button {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(@documents_selection_button_a),
                                    color-stop(0.83, @documents_selection_button_b),
                                    to(@documents_selection_button_c));

    border-color: @documents_selection_toolbar_border;
    border-image: none;
    border-style: solid;
    border-width: 1px;

    color: @theme_base_color;

    text-shadow: none;
    icon-shadow: none;
}

.documents-selection-mode.toolbar .button:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(shade(@documents_selection_button_a, 1.20)),
                                    color-stop(0.83, shade(@documents_selection_button_b, 1.10)),
                                    to(shade(@documents_selection_button_c, 1.10)));
}

.documents-selection-mode.toolbar .button:active,
.documents-selection-mode.toolbar .button:hover:active {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(@documents_selection_button_b),
                                    to(shade(@documents_selection_button_a, 0.90)));

    border-color: @documents_selection_toolbar_border;
    border-image: none;
    border-style: solid;
    border-width: 1px;
}

.documents-selection-mode.toolbar .button *:hover {
    color: @theme_base_color;
}

.documents-icon-bg {
    background-color: @documents_emblem_bg;
    border-radius: 4px;

    color: @theme_base_color;
}

.documents-collection-icon {
    background-color: @documents_collection_bg;
    border-radius: 8px;
}

.documents-osd {
    background-image: none;
    background-color: transparent;
}

.documents-osd .toolbar {
    padding: 16px;
    border-style: none;
    border-radius: 5px;
    border-width: 0;

    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(@documents_osd_toolbar_a),
                                    color-stop(0.63, @documents_osd_toolbar_b),
                                    to(@documents_osd_toolbar_c));
    color: @documents_osd_fg;

    -GtkToolbar-button-relief: normal;
}

.documents-osd .toolbar .button {
    padding: 4px;

    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(alpha(@documents_osd_button_a, 0.16)),
                                    color-stop(0.68, alpha(@documents_osd_button_b, 0.05)),
                                    to(alpha(@documents_osd_button_a, 0.12)));
    border-width: 1px 0;
    border-style: solid;
    border-image: none;
    border-color: alpha(@documents_osd_button_a, 0.50);
    border-radius: 0;

    color: @documents_osd_fg;

    text-shadow: none;
    icon-shadow: none;
    box-shadow: -1 0 inset @documents_osd_button_inset;
}

.documents-osd .toolbar .button,
.documents-osd .toolbar .button:prelight,
.documents-osd .toolbar .button:active {
    background-color: transparent;
}

.documents-osd .toolbar .button:nth-child(first) {
    border-radius: 4px 0 0 4px;
    border-left-width: 1px;
    box-shadow: -1 0 inset @documents_osd_button_inset;
}

.documents-osd .toolbar .button:nth-child(last) {
    box-shadow: none;
    border-radius: 0 4px 4px 0;
    border-right-width: 1px;
}

.documents-osd .toolbar .button:only-child {
    border-width: 1px;
    border-radius: 4px;
    border-style: solid;
}

.documents-osd .toolbar .separator {
    color: @documents_osd_button_inset;
}

.documents-osd .toolbar .button:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(alpha(@documents_osd_button_a, 0.28)),
                                    color-stop(0.68, alpha(@documents_osd_button_b, 0.14)),
                                    to(alpha(@documents_osd_button_a, 0.14)));
}

.documents-osd .toolbar .button *:hover {
    color: shade(@documents_osd_fg, 1.20);
}

.documents-osd .toolbar .button:active,
.documents-osd .toolbar .button:active:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(alpha(@documents_osd_button_b, 0.18)),
                                    color-stop(0.68, alpha(@documents_osd_button_a, 0.23)),
                                    to(alpha(@documents_osd_button_b, 0.17)));
}

.documents-osd .toolbar .button.favorite,
.documents-osd .toolbar .button.favorite *:hover {
    color: shade(@theme_selected_bg_color, 1.20);
}

.documents-entry-tag {
    background-color: @documents_emblem_bg;
    color: @theme_base_color;

    border-radius: 4px;
    border-width: 0;

    margin: 2px;
    padding: 4px;
}

.documents-entry-tag:hover {
    background-color: shade(@documents_emblem_bg, 1.10);
    color: @theme_base_color;
}

.documents-entry-tag.button,
.documents-entry-tag.button:hover,
.documents-entry-tag.button:active,
.documents-entry-tag.button:active:hover {
    background-color: transparent;
    background-image: none;
    border-image: none;
    border-width: 0;
}

.documents-entry-tag.button:hover {
    color: shade(@documents_emblem_bg, 2.10);
}

/* epiphany */

/* EphyToolbar.toolbar {
    border-bottom: 1 solid @borders;
}

EphyToolbar.toolbar:backdrop {
    border-bottom: 1 solid @unfocused_borders;
}
*/

EphyToolbar .entry,
EphyToolbar .entry:focus,
EphyToolbar .entry:backdrop {
    border-image-width: 3 0 4 3;
    border-width: 1px 0 2px 1px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    padding-left: 4px;
    padding-right: 4px;
}

EphyToolbar .entry:focus {
    box-shadow: 1 2 inset alpha(@theme_selected_bg_color, 0.1),
                1 1 inset alpha(@theme_selected_bg_color, 0.1),
                0 -1 inset alpha(@theme_selected_bg_color, 0.2);
}

EphyToolbar .location-entry .button {
    color: @internal_element_color;
    -GtkButton-child-displacement-y: 0;
}

EphyToolbar .location-entry .button:last-child {
    border-image: url("borders/generic-border.svg") 3 3 4 3 / 3 3 4 0 stretch;
    border-width: 1px 1px 2px 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    padding-left: 4px;
    padding-right: 2px;
}

EphyToolbar .location-entry .button,
EphyToolbar .location-entry .button:hover,
EphyToolbar .location-entry .button:focus {
    icon-shadow: none;
    background-image: -gtk-gradient(linear,
                                    left top, left bottom,
                                    from(@entry_background_a),
                                    to(@entry_background_b));
    box-shadow: 1 0 inset @inset_dark_color,
                0 1 inset @entry_inset,
                0 2 inset alpha(@entry_inset, 0.4);
}

EphyToolbar .location-entry .button:active,
EphyToolbar .location-entry .button:active:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from(shade(@entry_background_a, 0.9)),
                                    to(@entry_background_b));
    box-shadow: 1 0 inset @inset_dark_color,
                0 1 inset @entry_inset,
                0 2 inset alpha(@entry_inset, 0.4);
}

EphyToolbar .location-entry .button:hover,
EphyToolbar .location-entry .button:focus,
EphyToolbar .location-entry .button:active,
EphyToolbar .location-entry .button *:active {
    color: @theme_text_color;
}

EphyToolbar .location-entry .button:backdrop,
EphyToolbar .location-entry .button:hover:backdrop {
    background-image: none;
    background-color: mix (@base_color, @bg_color, 0.4);
    border-radius: 3px;
    border-width: 1px 1px 2px 0;
}

EphyNotebook.notebook {
    border-width: 1px 0 1px 0;
}

EphyNotebook.notebook tab {
    border-width: 0;
}

EphyToolbar.toolbar .button {
    padding-left: 4px;
    padding-right: 4px;
}

#ephy-page-menu-button.active-menu {
    background-image: none;
    background-color: @bg_color;

    border-image: none;
    border-color: @bg_color;
    border-radius: 4px 4px 0 0;
}

/* Gnome Contacts */

/* Line at top in contacts pane, similar to .documents-scrolledwin.frame */
.contacts-content.frame {
 border-width: 1px 0 0 0;
 border-radius: 0;
}

/* Background color in contacts pane, similar to .documents-main-view.view */
.contacts-main-view.view {
 background-color: #f1f2f1;
}

.contacts-suggestion {
 background-color: #434343;
 color: #ffffff;
 border-radius: 4px;
}

/* Border on the right in the left menu toolbar */
.contacts-left-toolbar.toolbar.menubar {
 border-width: 0 1px 0 0;
 border-style: solid;
 border-color: @borders;
}

/* Sidebar with line at top and the left */
ContactsWindow .sidebar.frame {
 border-width: 1px 1px 0 0;
 border-style: solid;
 border-color: @borders;
 border-image: none;
 border-radius: 0;
 padding: 0;
}

.contacts-avatar-frame.frame {
 border-width: 1px 1px 0 1px;
 border-style: solid;
 border-color: @borders;
 border-image: none;
 border-radius: 0;
 padding: 0;
}

/* Primary toolbar with no line at top to avoid conflicts with frame border */
ContactsWindow .primary-toolbar.toolbar {
 border-width: 0 0 1px 0;
}

ContactsWindow .sidebar .view {
 background-color: #ebebeb;
}
ContactsWindow .sidebar .view:selected,
ContactsWindow .sidebar .view:selected:focus {
 background-color: @selected_bg_color;
}

.contacts-button:active {
 border-color: #000000;
 border-image: none;
}

.contacts-entry {
 box-shadow: none;
 border-image: none;
 border-width: 1px;
 border-radius: 4px;
 border-style: solid;
 border-color: #bbbeb7;
 background-image: none;
 background-color: #ffffff;
}

.contacts-entry:selected,
.contacts-entry:selected:focus {
 background-color: @selected_bg_color;
 color: @selected_fg_color;
}

.contacts-entry.contacts-postal-entry {
 border-radius: 0 0 0 0;
 border-width: 1px 1px 0 1px;
}

.contacts-entry.contacts-postal-entry:nth-child(first) {
 border-radius: 4px 4px 0 0;
}

.contacts-entry.contacts-postal-entry:nth-child(last) {
 border-radius: 0 0 4px 4px;
 border-width: 1px;
}

.button.contacts-square {
 padding: 0px;
}

.contacts-combo .button {
 border-image: none;
 border-width: 1px;
 border-style: solid;
 border-color: #bbbeb7;
 background-image: none;
 background-color: #ffffff;
}

.contacts-notification {
 border-style: solid;
 border-color: #949486;
 border-width: 0 1px 1px 1px;
 border-radius: 0 0 5px 5px;
 padding: 8px;
 background-color: #d8d8d8;
 background-image: -gtk-gradient (linear, left top, left bottom,
                                  from (rgba (0, 0, 0, 0.15)),
                                  color-stop (0.15, rgba (0, 0, 0, 0.04)),
                                  to (rgba (0, 0, 0, 0.0)));
}

/* Gucharmap */
GucharmapChartable:active,
GucharmapChartable:focus,
GucharmapChartable:selected {
 background-color: @theme_selected_bg_color;
 color: @theme_selected_fg_color;
}
