@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;
}

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

.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: 4;
    padding-right: 4;
}


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

    -GtkEntry-inner-border: 3;
}

/*NautilusSearchBar .entry.image {
    color: @nautilus_cluebar_color;
}*/


/*NautilusPlacesSidebar .cell:selected { FUNGE, ci vuole una border image qui
    border-radius: 0 100 100 0;
    box-shadow: 0 1 inset alpha(black, 0.2), 0 -1 inset alpha(white, 0.5);
}*/

/*#nautilus-search-button *:active,
#nautilus-search-button *:active:prelight {
    color: darker (@nautilus_cluebar_color);
}*/


/* FIXME - will be `.floating-bar` in gtk-widgets.css for the next release*/
NautilusFloatingBar {
    background-color: @info_bg_color;
    border-color: darker(@info_bg_color);

    border-radius: 0;
    border-width: 1;
    border-style: solid;
}

NautilusFloatingBar:backdrop {
    background-color: @theme_unfocused_base_color;
    border-color: shade(@theme_unfocused_base_color, 0.9);
}

NautilusFloatingBar .button {
    background-color: alpha (@theme_base_color, 0.0);
    background-image: none;

    border-style: none;
    border-image: none;

    -GtkButton-image-spacing: 0;
    -GtkButton-inner-border: 0;
}

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

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

NautilusWindow > GtkGrid > .pane-separator,
NautilusWindow > GtkGrid > .pane-separator:hover {
    border-width: 1 1 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: 1 1 0 0;
    border-style: solid;
    border-color: @unfocused_borders;
    background-color: @sidebar_bg_unfocused;
    color: shade (@theme_bg_color, 0.9);
}

/* gedit */

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

GeditPanel {
    background-color: red;
}

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

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

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

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

GeditStatusbar {
    padding: 1 0 0 0;
    border-width: 1 0 0 0;
    border-style: solid;
    border-color: @borders;
}

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

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

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

.documents-scrolledwin.frame {
    border-width: 1 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: 1 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: 1;

    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: 1;
}

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

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

    color: @theme_base_color;
}

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

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

.documents-osd .toolbar {
    padding: 16;
    border-style: none;
    border-radius: 5;
    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: 4;

    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: 1 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: 4 0 0 4;
    border-left-width: 1;
    box-shadow: -1 0 inset @documents_osd_button_inset;
}

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

.documents-osd .toolbar .button:only-child {
    border-width: 1;
    border-radius: 4;
    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: 4;
    border-width: 0;

    margin: 2;
    padding: 4;
}

.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: 1 0 2 1;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    padding-left: 4;
    padding-right: 4;
}

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: 1 1 2 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    padding-left: 4;
    padding-right: 2;
}

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: 0 1 inset @entry_inset, 0 2 inset alpha(@entry_inset, 0.4), 1 0 inset @inset_dark_color;
}

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: 0 1 inset @entry_inset, 0 2 inset alpha(@entry_inset, 0.4), 1 0 inset @inset_dark_color;
}

EphyToolbar .location-entry .button:hover,
EphyToolbar .location-entry .button:focus,
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: @theme_unfocused_base_color;
    box-shadow: none;
    border-image: url("borders/generic-border-unfocused.svg") 3 3 4 3 / 3 3 4 0 stretch;
    border-radius: 3;
    border-width: 1 1 2 0;
}

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

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

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

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

