@define-color caja_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 */
{
    background-color: @chrome_bg_color;
    -EogScrollView-shadow-type: none;
}

/* mateTerminal */
MateTerminalScreen {
    background-color: @theme_base_color;
    color: @theme_fg_color;
    -MateTerminalScreen-background-darkness: 0.95;
}

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

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

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

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

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

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

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

CajaTrashBar.info,
CajaXContentBar.info,
CajaSearchBar.info,
CajaQueryEditor.info {
    background-color: @caja_cluebar_color;
    color: @theme_base_color;

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

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

.caja-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 */
/*CajaLocationEntry.entry {
    -GtkEntry-inner-border: 9;
}*/

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


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

    -GtkEntry-inner-border: 3;
}

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

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

CajaWindow > GtkGrid > .pane-separator,
CajaWindow > 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);
}

CajaWindow > GtkGrid > .pane-separator:backdrop,
CajaWindow > 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);
}

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

/* pluma */

PlumaWindow .pane-separator,
PlumaWindow .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;
}

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

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

}

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

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

PlumaPanel .notebook tab,
PlumaWindow .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);
}
