/*default color scheme */
@define-color toolbar_base #e0e0e0;
@define-color toolbar_final #bcbcbc;
@define-color toolbar_border #ffffff;
@define-color toolbar_bg_color @toolbar_base;
@define-color toolbar_fg_color @fg_color;
@define-color toolbar_textshadow_color @bg_color;
@define-color toolbar_bg_top_color @toolbar_base;
@define-color toolbar_bg_bottom_color @toolbar_final;
@define-color toolbar_border_top_color @toolbar_base;
@define-color toolbar_border_bottom_color @toolbar_border;

/* misc colors used by gtk+
 *
 * Gtk doesn't currently expand color variables for style properties. Thus,
 * gtk-widgets.css uses literal color names, but includes a comment containing
 * the name of the variable. Please remember to change values there as well
 * when changing one of the variables below.
 */
@define-color info_fg_color rgb (181, 171, 156);
@define-color info_bg_color rgb (252, 252, 189);
@define-color warning_fg_color rgb (173, 120, 41);
@define-color warning_bg_color rgb (250, 173, 61);
@define-color question_fg_color rgb (97, 122, 214);
@define-color question_bg_color rgb (138, 173, 212);
@define-color error_fg_color rgb (166, 38, 38);
@define-color error_bg_color rgb (237, 54, 54);
@define-color link_color #148add;
@define-color error_color #cc0000;
@define-color combobox_color #888888;
@define-color progress_color #5591c3;
@define-color scroll_color #B3B3B3;
@define-color sidepane_color #dae0e6;

/* theme common colors */
@define-color button_bg_color shade (@bg_color, 1.02); /*shade (#cdcdcd, 1.08);*/
@define-color notebook_button_bg_color shade (@bg_color, 1.02);
@define-color button_insensitive_bg_color mix (@button_bg_color, @bg_color, 0.6);
@define-color dark_bg_color #e0e0e0;
@define-color dark_fg_color @fg_color;
@define-color transparent rgba (0, 0, 0, 0);

@define-color backdrop_fg_color mix (@bg_color, @fg_color, 0.8);
@define-color backdrop_text_color mix (@base_color, @text_color, 0.8);
@define-color backdrop_dark_fg_color mix (@dark_bg_color, @dark_fg_color, 0.75);
@define-color backdrop_selected_bg_color shade (@bg_color, 0.92);
@define-color backdrop_selected_fg_color @fg_color;

/* strange colors */
@define-color scrollslider_gradient_a #bdbdbd;
@define-color scrollslider_gradient_b #bdbdbd;
@define-color scrollslider_border #bdbdbd;
@define-color trough_bg_color_a #efefef;
@define-color trough_bg_color_b #e0e0e0;
@define-color colorAccent @selected_bg_color;


*:link,
*:visited {
    color: @link_color;
}

/**********
 * states *
 **********/
*:insensitive {
    color: shade (@bg_color, 0.6);
    text-shadow: none;
}

/************
 * toolbars *
 ************/

.menubar.toolbar,
.primary-toolbar,
.primary-toolbar .toolbar,
.primary-toolbar.toolbar {
	-GtkWidget-window-dragging: true;
	background-image: -gtk-gradient (linear, left top, left bottom,
					from (@toolbar_bg_top_color),
					to (@toolbar_bg_bottom_color));
	border-top-color: @toolbar_border_top_color;
	border-bottom-color: @toolbar_border_bottom_color;
	border-style: solid;
	border-width: 1px 0 1px 0;
	padding: 2px;
	color: @toolbar_fg_color;
}



.menubar.toolbar :insensitive,
.primary-toolbar :insensitive {
	color: mix (@toolbar_bg_color, @toolbar_fg_color, 0.35);
}

.menubar.toolbar GtkSeparatorToolItem,
.menubar.toolbar .separator,
.menubar.toolbar .separator:insensitive,
.primary-toolbar GtkSeparatorToolItem,
.primary-toolbar .separator,
.primary-toolbar .separator:insensitive {
	border-color: alpha (shade (@toolbar_bg_color, 0.9), 0.5);
	border-style: solid;
}

/* primary-toolbar */
.primary-toolbar,
.primary-toolbar .toolbar,
.primary-toolbar.toolbar,
.menubar.toolbar,
.header-bar {
    box-shadow: inset 0 0px shade (@dark_bg_color, 0.94);
}


/*************************
 *  header bars		 *
 *************************/

.header-bar {
    padding: 5px;
    border-width: 0 0 1px;
    border-style: solid;
    border-color: shade(@toolbar_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@toolbar_bg_color, 1.00),
                                      shade(@toolbar_bg_color, 0.90)
                                      );
}


/*************************
 * progressbar and scale *
 *************************/

.scale.trough.highlight {
    background-color: #ff0000;
    background-image: none;
    background-clip: content-box;
}

.menubar .menuitem .scale.highlight.left,
.scale.highlight.left,
.progressbar,
.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focused {
    border-radius: 8px;
    border-width: 0px;
    background-image: none;
    background-color: @progress_color;
    border-style: solid;
}

/********
 * menu *
 ********/

.menubar {
	padding: 2px;
}

GtkTreeMenu.menu .menuitem:insensitive,
GtkTreeMenu.menu .menuitem *:insensitive,
.toolbar .primary-toolbar .menu .menuitem:insensitive,
.toolbar .primary-toolbar .menu .menuitem *:insensitive,
.toolbar .menubar.toolbar .menu .menuitem:insensitive,
.toolbar .menubar.toolbar .menu .menuitem *:insensitive,
.toolbar .header-bar .menu .menuitem:insensitive,
.toolbar .header-bar .menu .menuitem *:insensitive,
GtkMenuToolButton.menu .menuitem:insensitive,
GtkMenuToolButton.menu .menuitem *:insensitive,
.primary-toolbar .button .menu .menuitem:insensitive,
.primary-toolbar .button .menu .menuitem *:insensitive,
.menubar.toolbar .button .menu .menuitem:insensitive,
.menubar.toolbar .button .menu .menuitem *:insensitive,
.header-bar .button .menu .menuitem:insensitive,
.header-bar .button .menu .menuitem *:insensitive,
.menuitem:insensitive,
.menuitem *:insensitive {
    color: mix (@dark_fg_color, @dark_bg_color, 0.5);
    text-shadow: none;
}

.menuitem .accelerator:insensitive {
    color: alpha (mix (@dark_fg_color, @dark_bg_color, 0.5), 0.5);
    text-shadow: none;
}

/***************
 * menubaritem *
 ***************/

.menubar.menuitem:hover,
.menubar .menuitem:hover {
    border-radius: 4px 4px 0 0;
    border-width: 1px 1px 0 1px;
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@selected_bg_color, 1.20)),
                                     to (shade (@selected_bg_color, 0.80)));

    box-shadow: none;

    color: @selected_fg_color;
    text-shadow: none;
}

.menubar.menuitem:hover,
.menubar .menuitem:hover {
    border-color: #9CB8B8;
}

/* Nautilus mods */

/* sidebar */
NautilusWindow .sidebar,
NautilusWindow .sidebar .view {
    background-color: @sidepane_color;
}

/************************************************************
 *					 GTK3 CSD support 						*
 ************************************************************/

.titlebar {
    border-radius: 6px 6px 0 0;
    background-image: linear-gradient(to bottom,
                                      shade(@bg_color, 1.07),
                                      shade(@bg_color, 0.88)
                                      );

    color: @fg_color;
}

.tiled .titlebar {
    border-radius: 0;
}

.maximized .titlebar {
    border-radius: 0;
}

.titlebar.default-decoration {
    border: none;
    box-shadow: none;
}

.titlebar .title {
    font: bold;
    color: mix(@fg_color, @bg_color, 0.3);
    text-shadow: 0 1px shade(@bg_color, 1.1);
}

.titlebar:backdrop {
    background-image: linear-gradient(to bottom,
                                      shade(@bg_color, 1.12),
                                      shade(@bg_color, 0.98)
                                      );
}

.titlebar .title:backdrop {
    color: mix(@fg_color, @bg_color, 0.6);
    text-shadow: 0 1px shade(@bg_color, 1.05);
}

.titlebar .button:backdrop {
    color: mix(@fg_color, @bg_color, 0.6);
}

.titlebar .titlebutton {
    padding: 4px;
    border-style: none;
    background: none;
    color: mix(@fg_color, @bg_color, 0.3);
    icon-shadow: 0 1px shade(@bg_color, 1.1);
    box-shadow: none;
}

.titlebar .titlebutton:hover,
.titlebar .titlebutton:hover:focus {
    background: none;
    color: @fg_color;
    box-shadow: none;
}

.titlebar .titlebutton:active,
.titlebar .titlebutton:checked,
.titlebar .titlebutton:active:hover,
.titlebar .titlebutton:checked:hover {
    background: none;
    color: @selected_bg_color;
    box-shadow: none;
}

.titlebar .titlebutton:backdrop {
    background-image: none;
    color: mix(@fg_color, @bg_color, 0.6);
    icon-shadow: 0 1px shade(@bg_color, 1.05);
}

.window-frame,
.window-frame:backdrop {
    border-style: none;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 6px 22px alpha(black, 0.47),
                0 0 0 1px alpha(black, 0.3);

    /* this is used for the resize cursor area */
    margin: 10px;
}

.window-frame.tiled {
    border-radius: 0;
}

.window-frame.csd.popup {
    border-style: none;
    border-radius: 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.window-frame.csd.tooltip {
    border-radius: 4px;
    box-shadow: none;
}

.window-frame.solid-csd {
    border: solid 1px shade(@bg_color, 0.5);
    border-radius: 0;
    margin: 2px;
    background-color: @bg_color;
    box-shadow: none;
}
