/* NOTES to contributors:
 * use 4 spaces indents, and keep code ALIGNED and ORDERED */

/* default */
* {
    -GtkPaned-handle-size: 2;
    -GtkScrollbar-has-backward-stepper: false;
    -GtkScrollbar-has-forward-stepper: false;
    -GtkScrolledwindow-scrollbar-spacing: 0;
    -GtkScrolledwindow-scrollbars-within-bevel: 1;
    -GtkTextView-error-underline-color: @error_color;
    -GtkToolbutton-icon-spacing: 6;
    -GtkTreeview-expander-size: 8;

    background-clip: padding-box;

    outline-color: alpha(@theme_selected_bg_color, 0.5);
    outline-style: solid;
    outline-offset: 0;
}

/***************
 * base states *
 ***************/
.background {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}
 
* {
    /* inherit colors from parent */
    color: inherit;
    background-color: inherit;
}

*:selected,
*:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

*:selected:backdrop,
*:selected:focus:backdrop {
    background-color: shade(@theme_bg_color, 0.8);
    border-color: shade(@theme_bg_color, 0.8);
    color: @theme_fg_color;
}

*:disabled,
*:disabled:disabled {
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);

}

/* apply effects to insensitive and prelit images */
*:disabled {
    -gtk-icon-effect: dim;
}

*:hover {
    -gtk-icon-effect: highlight;
}

.gtkstyle-fallback {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}

.gtkstyle-fallback:hover {
    background-color: shade(@theme_bg_color, 1.1);
    color: @theme_fg_color;
}

.gtkstyle-fallback:active {
    background-color: shade(@theme_bg_color, 0.9);
    color: @theme_fg_color;
}

.gtkstyle-fallback:disabled {
    background-color: shade(shade(@theme_bg_color, 0.95), 1.05);
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

.gtkstyle-fallback:selected {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

image,
image:disabled,
label,
label:disabled,
box,
box:disabled,
GtkGrid,
GtkGrid:disabled {
    background-color: transparent;
}

/******************
 * visual effects *
 ******************/
/* transitions */
button {
    transition: border 100ms ease-in-out;
}

entry {
    transition: border 100ms ease-out;
}

entry:focus {
    transition: border 100ms ease-in;
}

entry image left {
    padding-right: 4px;
}

notebook tab label,
notebook .prelight-page,
notebook .prelight-page label,
notebook .active-page,
notebook .active-page label {
    transition: all 200ms ease-in;
}

/* inset shadows */
button:active,
.primary-toolbar button:active,
toolbar button:active,
headerbar button:active,
notebook header {
    box-shadow: inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset -1px 0 alpha(@dark_shadow, 0.07),
                inset 0 -1px alpha(@dark_shadow, 0.05);
}

/* entry {
    box-shadow: inset 1px 0 alpha(@dark_shadow, 0.10),
                inset 0 1px alpha(@dark_shadow, 0.12),
                inset -1px 0 alpha(@dark_shadow, 0.10),
                inset 0 -1px alpha(@dark_shadow, 0.05);
}*/

entry {
    box-shadow: none;
}

/* disable inset shadow */
button:active *:disabled,
.primary-toolbar button:active *:disabled,
toolbar button:active *:disabled,
headerbar button:active *:disabled,
entry:disabled {
    box-shadow: none;
}

/*************
 * assistant *
 *************/
GtkAssistant .sidebar  highlight {
    font-weight: bold;
}

GtkAssistant .sidebar {
    padding: 4px;
    border-width: 0 1px 0 0;
    border-style: solid;
    border-right-color: shade(@theme_bg_color, 0.8);
    border-radius: 0;
    background-color: @theme_bg_color;
    color: mix(@theme_fg_color, @theme_bg_color, 0.1);
}

/****************
 * link buttons *
 ****************/
*:link, button:link, button:visited {
    color: @link_color;
}

*:link:visited, button:visited {
    color: mix(@link_color, @theme_fg_color, 0.2);
}

*:selected *:link:visited, *:selected button:visited:link, *:selected button:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.65);
}

*:link:hover, button:hover:link, button:hover:visited {
    color: shade(mix(@link_color, @theme_fg_color, 0.2), 1.15);
}

*:selected *:link:hover, *:selected button:hover:link, *:selected button:hover:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.75);
}

*:link:active, button:active:link, button:active:visited {
    color: shade(@link_color, 0.85);
}

*:selected *:link:active, *:selected button:active:link, *:selected button:active:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.5);
}

infobar.info *:link, infobar.info button:link, infobar.info button:visited, infobar.question *:link, infobar.question button:link, infobar.question button:visited, infobar.warning *:link, infobar.warning button:link, infobar.warning button:visited, infobar.error *:link, infobar.error button:link, infobar.error button:visited, *:link:selected, button:selected:link, button:selected:visited, headerbar.selection-mode .subtitle:link, .selection-mode.titlebar:not(headerbar) .subtitle:link,
*:selected *:link,
*:selected button:link,
*:selected button:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.5);
}

button:link > label, button:visited > label {
    text-decoration-line: underline;
}

/**********
 * button *
 **********/
button {
    padding: 3px 8px;
    border-width: 1px;
    border-radius: 5px;
    border-style: solid;
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: image(@theme_base_color);
    color: @theme_fg_color;
    box-shadow: 0 1px 2px alpha(@dark_shadow, 0.2);
}

button:hover {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.99);
    background-image: linear-gradient(to bottom,                         
                                      shade(@base_color, 1.02),
                                      @base_color,
                                      shade(@base_color, 0.98)
                                      );
}

button:active {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 1);
    background-image: linear-gradient(to top,                         
                                      shade(@base_color, 0.85),
                                      shade(@base_color, 0.75)
                                      );
}

button:active:hover {
    border-color: shade(@theme_bg_color, 0.7);
}

button:focus,
button:hover:focus,
button:active:focus,
button:active:hover:focus {
    border-color: shade(@theme_bg_color, 0.9);
}


button:checked {
    background-image: linear-gradient(to bottom,
                                      shade(@selected_bg_color, 1.2),
                                      shade(@selected_bg_color, 0.95)
                                      );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.6);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.4);
}

button:checked:backdrop {
    background-image: none;
    box-shadow: 0 0 1px 1px shade(@theme_unfocused_bg_color, 0.9);
    color: @theme_fg_color;
    border-color: shade(@theme_unfocused_bg_color, 0.8);
    background-color: shade(@theme_unfocused_bg_color, 0.85);
}

button:backdrop {
    color: @theme_unfocused_fg_color;
    background-color: @theme_unfocused_bg_color;
    background-image: none;
}

button:disabled {
    /*border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;*/
    color: alpha(@theme_fg_color, 0.7);
}

button:active *:disabled {
    border-color: shade(@theme_bg_color, 0.75);
    background-color: shade(@theme_bg_color, 0.80);
    background-image: none;
}

/* flat button */
button.flat {
    padding: 3px 8px;
    border-width: 1px;
    border-radius: 5px;
    border-style: solid;
    box-shadow: none;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
}

button.flat:hover {
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.1),
                                      shade(shade(@theme_bg_color, 1.02), 1.04)
                                      );
    color: @theme_fg_color;
    box-shadow: 0 1px 2px alpha(@dark_shadow, 0.2);
}

button.flat:active,
button.flat:checked {
    background-image: linear-gradient(to bottom,
                                      shade(@selected_bg_color, 1.2),
                                      shade(@selected_bg_color, 0.95)
                                      );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.6);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.4);
}

/****************
 * cell and row *
 ****************/
.cell {
    border-width: 0;
    border-radius: 0;
}

.cell:selected,
.cell:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

row { padding: 4px;
}


row:selected,
row:selected:hover,
row:selected:focus {
    border-width: 1px 0;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

/*******************
 * check and radio *
 *******************/
check,
radio,
check:disabled,
radio:disabled {
    border-style: none;
    background-color: transparent;
    padding: 4px;
}

checkbutton:hover,
checkbutton:active:hover,
checkbutton:selected,
checkbutton:selected:focus {
    background-color: transparent;
}

/*****************
 * treeview header *
 *****************/
treeview header button,
treeview header button:active {
    border-width: 0 1px 1px 0;
    border-radius: 0;
    box-shadow: none;
}

treeview header button,
treeview header button:active,
treeview header button:focus,
treeview header button:active:focus {
    border-color: shade(@theme_base_color, 0.9);
    border-bottom-color: shade(@theme_base_color, 0.9);
    background-color: shade(@theme_base_color, 0.97);
    background-image: none;
    box-shadow: none;
}

treeview header button:hover,
treeview header button:active:hover,
treeview header button:hover:focus,
treeview header button:active:hover:focus {
    border-color: shade(@theme_base_color, 0.9);
    border-bottom-color: shade(@theme_base_color, 0.9);
    background-color: shade(@theme_base_color, 0.99);
    background-image: none;
    box-shadow: none;
}

treeview header:last-child button {
    border-width: 0 0 1px 0;
}

/****************
 * content view *
 ****************/
.content-view.view {
    background-color: @theme_base_color;
}

.content-view.view :hover {
    background-color: alpha(@theme_selected_bg_color, 0.6);
}

.content-view.view :selected,
.content-view.view :active {
    background-color: @theme_selected_bg_color;
}

.content-view.view :disabled {
    background-color: shade(@theme_base_color, 0.9);
}

view.content-view {
    -view-icon-size: 40;
}

view.content-view check {
    background-color: transparent;
}

view.content-view check:active {
    background-color: transparent;
}

.content-view.view check,
.content-view.view check:active {
    background-color: transparent;
}

view.content-view check:hover,
view.content-view check:disabled,
view.content-view check:selected {
    background-color: transparent;
}

/****************
 * drawing area *
 ****************/
GtkDrawingArea {
    background-color: @theme_base_color;
}

GtkDrawingArea:disabled {
    background-color: shade(@theme_base_color, 0.9);
}

/***********
 * gtkhtml *
 ***********/
GtkHTML {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

/***********
* calendar *
************/
calendar {
    padding: 4px;
}

calendar:indeterminate {
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

calendar view,
calendar header,
calendar button,
calendar button:hover,
calendar button:disabled {
    border-width: 0;
    background-color: transparent;
    background-image: none;
}

highlight,
calendar highlight {
    border-width: 0;
    background-color: transparent;
    color: @theme_selected_bg_color;
}

/******************
 * combobox entry *
 ******************/
.primary-toolbar combobox entry,
.primary-toolbar combobox entry:active,
.primary-toolbar combobox entry:focus,
.primary-toolbar combobox entry:disabled,
 combobox entry,
 combobox entry:active,
 combobox entry:focus,
 combobox entry:disabled {
    border-width: 1px 0 1px 1px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.primary-toolbar combobox entry button,
.primary-toolbar combobox entry button:hover,
.primary-toolbar combobox entry button:active,
.primary-toolbar combobox entry button:disabled,
 combobox button,
 combobox button:hover,
 combobox button:active,
 combobox button:disabled {
    margin-bottom: 1px;
    border-width: 1px 1px 1px 1px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/*********
 * entry *
 *********/
entry {
    padding: 7px 4px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.95);
    border-radius: 4px;
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_text_color;
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.8);
}

entry:active,
entry:focus {
    border-color: shade(@theme_bg_color, 0.95);
    box-shadow: inset 0 0 1px 3px shade(@theme_selected_bg_color, 1.5);
}

entry:selected,
entry:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
    box-shadow: inset 0 0 1px 3px shade(@theme_selected_bg_color, 1.15);
}

entry:disabled:backdrop,
entry:disabled {
    background-color: shade(@theme_bg_color, 0.95);
    background-image: none;
    color: mix(@theme_text_color, @theme_base_color, 0.5);
}

entry:backdrop {
    color: @theme_unfocused_fg_color;
    background-color: shade(@theme_bg_color, 1.05);
}

entry progress {
    border-width: 0;
    border-radius: 6px;
    box-shadow: none;
    background-color: @theme_bg_color;
    background-image: none;
    color: @theme_fg_color;
}

/* tweak to prevent double shadow in gedit search box */
entry entry {
    background-color: transparent;
    box-shadow: none;
    border: none;
}

/* nemo icon view entry */
.nemo-window .nemo-window-pane widget.entry {
    border: 1px solid;
    border-radius: 3px;
    color: @theme_fg_color;
    border-color: @theme_selected_bg_color;
    background-color: @theme_base_color;
}

  
.nemo-window .nemo-window-pane widget.entry:selected:focus, .nemo-window .nemo-window-pane widget.entry:selected {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/************
 * expander *
 ************/
expander arrow {
    min-width: 16px;
    min-height: 16px;
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
}

expander arrow:dir(rtl) {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl");
}

expander arrow:checked {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

expander {
    color: alpha(currentColor, 0.7);
}

expander:hover {
    color: alpha(currentColor, 0.8);
}

expander:checked {
    color: alpha(currentColor, 0.9);
}

/**************
 * list boxes *
 **************/
list {
    background-color: shade(@theme_bg_color, 0.97);
    color: @theme_fg_color;
}

list-row:hover {
    background-color: shade(@theme_bg_color, 1.02);
}

list-row:selected {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/*********
 * frame *
 *********/
frame > border {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
    box-shadow: none;
}

frame.flat > border,
frame > border.flat,
statusbar frame > border {
    border: none;
}

/*******************
 * scrolled window *
 *******************/
scrolledwindow frame {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
}

/* avoid double borders when a viewport is
 * packed into a scrolledwindow */
scrolledwindow viewport frame {
    border-style: none;
}

/************
 * iconview *
 ************/
view.view.cell:selected,
view.view.cell:selected:focus {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 0px;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

.content-view.view.rubberband,
view rubberband,
rubberband,
.view.rubberband,
view rubberband,
rubberband,
.rubberband,
view rubberband,
rubberband {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 0;
    background-color: alpha(@theme_selected_bg_color, 0.3);
}

/***********
 * infobar *
 ***********/
infobar {
    border-width: 0;
    border-style: none;
}

.info {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@info_bg_color, 0.8);
    background-color: @info_bg_color;
    background-image: none;
    color: @info_fg_color;
}

.info button {
    border-top-color: shade(@info_bg_color, 0.8);
    border-right-color: shade(@info_bg_color, 0.72);
    border-left-color: shade(@info_bg_color, 0.72);
    border-bottom-color: shade(@info_bg_color, 0.7);
    background-color: shade(@info_bg_color, 1.08);
    color: @info_fg_color;
}

.info button:hover {
    border-top-color: shade(@info_bg_color, 0.85);
    border-right-color: shade(@info_bg_color, 0.78);
    border-left-color: shade(@info_bg_color, 0.78);
    border-bottom-color: shade(@info_bg_color, 0.7);
    background-color: shade(@info_bg_color, 1.10);
}

.info button:active {
    border-color: shade(@info_bg_color, 0.6);
    background-color: shade(@info_bg_color, 0.95);
}

.info button:active:hover {
    border-top-color: shade(@info_bg_color, 0.85);
    border-right-color: shade(@info_bg_color, 0.78);
    border-left-color: shade(@info_bg_color, 0.78);
    border-bottom-color: shade(@info_bg_color, 0.7);
}

.info button.close {
    color: @info_fg_color;
}

.info button.close:hover {
    background-color: alpha(white, 0.2);
}

.info button.close:active {
    color: @info_fg_color;
    background-color: alpha(black, 0.1);
}

.warning {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@warning_bg_color, 0.8);
    background-color: @warning_bg_color;
    background-image: none;
    color: @warning_fg_color;
}

.warning button {
    border-top-color: shade(@warning_bg_color, 0.8);
    border-right-color: shade(@warning_bg_color, 0.72);
    border-left-color: shade(@warning_bg_color, 0.72);
    border-bottom-color: shade(@warning_bg_color, 0.7);
    background-color: shade(@warning_bg_color, 1.08);
    color: @warning_fg_color;
}

.warning button:hover {
    border-top-color: shade(@warning_bg_color, 0.85);
    border-right-color: shade(@warning_bg_color, 0.78);
    border-left-color: shade(@warning_bg_color, 0.78);
    border-bottom-color: shade(@warning_bg_color, 0.7);
    background-color: shade(@warning_bg_color, 1.10);
}

.warning button:active {
    border-color: shade(@warning_bg_color, 0.6);
    background-color: shade(@warning_bg_color, 0.95);
}

.warning button:active:hover {
    border-top-color: shade(@warning_bg_color, 0.85);
    border-right-color: shade(@warning_bg_color, 0.78);
    border-left-color: shade(@warning_bg_color, 0.78);
    border-bottom-color: shade(@warning_bg_color, 0.7);
}

.warning button.close {
    color: @warning_fg_color;
}

.warning button.close:hover {
    background-color: alpha(white, 0.2);
}

.warning button.close:active {
    color: @warning_fg_color;
    background-color: alpha(black, 0.1);
}

.question {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@question_bg_color, 0.8);
    background-color: @question_bg_color;
    background-image: none;
    color: @question_fg_color;
}

.question button {
    border-top-color: shade(@question_bg_color, 0.8);
    border-right-color: shade(@question_bg_color, 0.72);
    border-left-color: shade(@question_bg_color, 0.72);
    border-bottom-color: shade(@question_bg_color, 0.7);
    background-color: shade(@question_bg_color, 1.08);
    color: @question_fg_color;
}

.question button:hover {
    border-top-color: shade(@question_bg_color, 0.85);
    border-right-color: shade(@question_bg_color, 0.78);
    border-left-color: shade(@question_bg_color, 0.78);
    border-bottom-color: shade(@question_bg_color, 0.7);
    background-color: shade(@question_bg_color, 1.10);
}

.question button:active {
    border-color: shade(@question_bg_color, 0.6);
    background-color: shade(@question_bg_color, 0.95);
}

.question button:active:hover {
    border-top-color: shade(@question_bg_color, 0.85);
    border-right-color: shade(@question_bg_color, 0.78);
    border-left-color: shade(@question_bg_color, 0.78);
    border-bottom-color: shade(@question_bg_color, 0.7);
}

.question button.close {
    color: @question_fg_color;
}

.question button.close:hover {
    background-color: alpha(white, 0.2);
}

.question button.close:active {
    color: @question_fg_color;
    background-color: alpha(black, 0.1);
}

.error {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@error_bg_color, 0.8);
    background-color: @error_bg_color;
    background-image: none;
    color: @error_fg_color;
}

.error button {
    border-top-color: shade(@error_bg_color, 0.8);
    border-right-color: shade(@error_bg_color, 0.72);
    border-left-color: shade(@error_bg_color, 0.72);
    border-bottom-color: shade(@error_bg_color, 0.7);
    background-color: shade(@error_bg_color, 1.08);
    color: @error_fg_color;
}

.error button:hover {
    border-top-color: shade(@error_bg_color, 0.85);
    border-right-color: shade(@error_bg_color, 0.78);
    border-left-color: shade(@error_bg_color, 0.78);
    border-bottom-color: shade(@error_bg_color, 0.7);
    background-color: shade(@error_bg_color, 1.10);
}

.error button:active {
    border-color: shade(@error_bg_color, 0.6);
    background-color: shade(@error_bg_color, 0.95);
}

.error button:active:hover {
    border-top-color: shade(@error_bg_color, 0.85);
    border-right-color: shade(@error_bg_color, 0.78);
    border-left-color: shade(@error_bg_color, 0.78);
    border-bottom-color: shade(@error_bg_color, 0.7);
}

.error button.close {
    color: @error_fg_color;
}

.error button.close:hover {
    background-color: alpha(white, 0.2);
}

.error button.close:active {
    color: @error_fg_color;
    background-color: alpha(black, 0.1);
}

/*******************
 * symbolic images *
 *******************/
 image {
    color: alpha(currentColor, 0.5);
}

 image:hover {
    color: alpha(currentColor, 0.9);
}

 image:selected,
 image:selected:hover {
    color: @theme_selected_fg_color;
}

view image,
view image:hover {
    color: alpha(currentColor, 0.9);
}

view image:selected,
view image:selected:hover {
    color: @theme_selected_fg_color;
}

/*****************
 * miscellaneous *
 *****************/
.floating-bar {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 4px;
    background-color: @theme_bg_color;
    background-image: none;
    color: @theme_fg_color;
}

.floating-bar top {
    border-top-width: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.floating-bar right {
    border-right-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.floating-bar bottom {
    border-bottom-width: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.floating-bar left {
    border-left-width: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.floating-bar button {
    border-style: none;
    background-color: transparent;
    background-image: none;
}

view label:disabled,
label:disabled {
    color: alpha(currentColor, 0.5);
}

.dnd {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
}

grip {
    background-color: transparent;
}

arrow,
combobox arrow {
    color: alpha(currentColor, 0.7);
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
    min-height: 16px;
    min-width: 16px;
}

/********
 * menu *
 ********/
treemenu menu,
toolbutton menu,
combobox menu {
    background-color: @menu_bg_color;
}

.primary-toolbar menu,
.primary-toolbar button menu,
toolbar menu,
toolbar .primary-toolbar menu,
headerbar menu,
headerbar .primary-toolbar menu,
menu {
    padding: 0;
    border-radius: 0;
    border-style: none;
    background-color: @menu_bg_color;
    color: @menu_fg_color;
}

/* Hover-effect on play-button in ubuntu soundmenu */
menu:selected {
    background-color: @selected_bg_color;
}

menu button:hover,
menu button:active,
menu button:active *:disabled,
menu button:disabled,
menu button {
    border-width: 0;
    background-color: transparent;
    background-image: none;
}

.context-menu {
    font: initial;
}

/* ubuntu software center menu */
#toolbar-popup {
    background-color: @menu_bg_color;
    color: @menu_fg_color;
}

/***********
 * menubar *
 ***********/
menubar {
    -GtkWidget-window-dragging: true;

    border-style: none;
    background-color: @menubar_bg_color;
    background-image: none;
    color: @menubar_fg_color;
}

menubar:backdrop {
    background-image: none;
    color: @theme_unfocused_fg_color;
    background-color: @theme_unfocused_bg_color;
}

/***************
 * menubaritem *
 ***************/
menubar menuitem,
menubar > menuitem {
    padding: 3px 5px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    color: @menubar_fg_color;
}

menubar menuitem:hover,
menubar > menuitem:hover {
    border-color: mix(@menubar_bg_color, @menubar_fg_color, 0.21);
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

menubar > menuitem *:hover {
    color: shade(@menubar_fg_color, 1.08);
}

menubar menuitem:backdrop,
menubar > menuitem:backdrop {
    color: @theme_unfocused_fg_color;
}

/************
 * menuitem *
 ************/
treemenu menuitem,
treemenu > menuitem {
    padding: 0;
    border-width: 0;
}

menuitem,
menu > menuitem {
    padding: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 0;
    background-color: @menu_bg_color;
    background-image: none;
    color: @menu_fg_color;
}

menu menuitem:hover,
menu menuitem:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
    background-image: none;
}

menu menuitem:active,
menu menuitem *:active,
menu menuitem:hover,
menu menuitem *:hover {
    color: @theme_selected_fg_color;
}

menu menuitem:disabled,
menu menuitem *:disabled {
    color: mix(@menu_fg_color, @menu_bg_color, 0.5);
}

/* menu arrow */
menu menuitem arrow,
.menu menuitem arrow {
    min-height: 16px;
    min-width: 16px;
}

menu menuitem arrow:dir(ltr),
.menu menuitem arrow:dir(ltr) {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
    margin-left: 10px;
}

menu menuitem arrow:dir(rtl),
.menu menuitem arrow:dir(rtl) {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl");
    margin-right: 10px;
}

menuitem check,
menuitem radio,
menuitem check:hover,
menuitem radio:hover,
menuitem check:disabled,
menuitem radio:disabled {
    border-style: none;
    min-width: 16px;
    min-height: 16px;
    background-color: transparent;
    background-image: none;
}

menuitem check:active,
menuitem radio:active {
    border-style: none;
    background-color: transparent;
}

menuitem calendar:indeterminate {
    color: mix(@menu_fg_color, @menu_bg_color, 0.5);
}

menuitem calendar button {
    border-style: none;
    background-color: transparent;
    background-image: none;
}

menuitem entry {
    border-color: shade(@menu_bg_color, 0.7);
    background-color: @menu_bg_color;
    background-image: none;
    color: @menu_fg_color;
}

menuitem entry:active,
menuitem entry:focus {
    border-color: shade(@menu_bg_color, 0.7);
}

menuitem accelerator {
    color: alpha(@menu_fg_color, 0.6);
}

menuitem accelerator:hover {
    color: alpha(@theme_selected_fg_color, 0.8);
}

menuitem accelerator:disabled {
    color: alpha(mix(@menu_fg_color, @menu_bg_color, 0.5), 0.6);
}

GtkModelMenuItem box image {
    padding-right: 4px;
}

/************
 * popovers *
 ************/
popover {
    margin: 10px;
    padding: 2px;
    border-radius: 4px;
    border-color: shade(@theme_bg_color, 0.85);
    border-width: 1px;
    border-style: solid;
    background-clip: border-box;
    background-color: @theme_bg_color;
    color: @theme_fg_color;
    box-shadow: 0 2px 3px alpha(black, 0.5);
}

popover.osd {
    box-shadow: 0 2px 7px 3px alpha(black, 0.5);
}

popover >  list,
popover > view,
popover > toolbar {
    background-color: transparent;
}

popover.osd > toolbar button {
    border-radius: 0;
    border-width: 0;
    background-image: none;
    background-color: transparent;
}

popover separator {
    border: 0;
    background-color: transparent;
    color: alpha(currentColor, 0.5);
    font-size: 80%;
    font-weight: bold;
}

modelbutton.flat,
modelbutton.flat:active,
modelbutton.flat:disabled,
modelbutton.flat:active:disabled {
    padding: 6px 8px;
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    border-style: none;
    box-shadow: none;
    color: @theme_fg_color;
}

modelbutton:hover,
modelbutton:selected,
modelbutton:active:hover {
    border-width: 0;
    border-color: transparent;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

modelbutton.flat arrow.left {
    -gtk-icon-source: -gtk-icontheme("pan-start-symbolic");
}

modelbutton.flat arrow.right {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
}

popover.background,
.csd popover.background {
    box-shadow: 0 0 2px 0px gray;
    border: 1px solid @borders;
}

popover.background:backdrop {
    background-color: @theme_bg_color;
    box-shadow: none;
}

/************
 * notebook *
 ************/
notebook {
    padding: 0;
    border-width: 0;
    border-style: solid;
    border-color: shade(@theme_base_color, 0.7);
    border-radius: 0;
    background-color: @theme_base_color;
    background-image: none;
    background-clip: border-box;
}

notebook frame {
    border-width: 0;
}

notebook > header {
    border-width: 0;
    box-shadow: none;
    background-color: shade(@theme_base_color, 0.6);
}

notebook > header .frame {
    border-color: transparent;
}

notebook view {
    border-width: 0;
    background-color: @theme_base_color;
    color: @theme_text_color;
}

notebook tab {
    padding: 4px 20px;
    border: 1px solid shade(@theme_bg_color, 0.65);
    background-image: linear-gradient(to bottom, shade(@theme_bg_color, 0.73), shade(@theme_bg_color, 0.7));
}

notebook tab:checked {
    background-image: linear-gradient(to bottom, shade(@theme_bg_color, 0.95), shade(@theme_bg_color, 0.9));
    border-color: shade(@theme_bg_color, 0.75);
}

notebook tab:backdrop {
    color: @theme_unfocused_fg_color;
    background-image: none;
    background-color: shade(@theme_unfocused_bg_color, 0.85);
    border-color: shade(@theme_unfocused_bg_color, 0.8);
}

notebook tab:checked:backdrop {
    color: @theme_unfocused_fg_color;
    background-image: none;
    background-color: shade(@theme_unfocused_bg_color, 0.95);
    border-color: shade(@theme_unfocused_bg_color, 0.9);
}

notebook tab label {
    /*color: mix(@theme_text_color, @theme_base_color, 0.3);*/
}

notebook .active-page,
notebook tab .active-page label {
    color: @theme_text_color;
}

/* close button styling */
notebook tab button,
notebook tab button:hover,
notebook tab button:active,
notebook tab button:backdrop {
/*    padding: 1px;
    border-width: 1px;
    border-radius: 0px;
    border-style: solid;
    border-color: transparent;
    background-image: none;
    background-color: transparent;
    color: mix(@theme_text_color, @theme_base_color, 0.5);
}

notebook tab button:hover {
    color: @theme_text_color;
    border-color: shade(@theme_base_color, 0.8);
}

notebook tab button:active,
notebook tab button:active:hover {
    border-color: shade(@theme_base_color, 0.7);
    background-color: shade(@theme_base_color, 0.95);
} */
    border-color: transparent;
    box-shadow: none;
    background-color: transparent;
}

notebook > header.top > tabs > arrow.up,
notebook > header.bottom > tabs > arrow.up {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
}

notebook > header.top > tabs > arrow.up:last-child,
notebook > header.bottom > tabs > arrow.up:last-child {
    margin-left: 2px;
}

notebook > header.top > tabs > arrow.down,
notebook > header.bottom > tabs > arrow.down {
    -gtk-icon-source: -gtk-icontheme("pan-start-symbolic");
}

notebook > header.top > tabs > arrow.down:first-child,
notebook > header.bottom > tabs > arrow.down:first-child {
    margin-right: 2px;
}

notebook > header.left > tabs > arrow.up,
notebook > header.right > tabs > arrow.up {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

notebook > header.left > tabs > arrow.up:last-child,
notebook > header.right > tabs > arrow.up:last-child {
    margin-top: 2px;
}

notebook > header.left > tabs > arrow.down,
notebook > header.right > tabs > arrow.down {
    -gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
}

notebook > header.left > tabs > arrow.down:first-child,
notebook > header.right > tabs > arrow.down:first-child {
    margin-bottom: 2px;
}

notebook > header > tabs > arrow {
    color: @theme_fg_color;
}

notebook > header > tabs > arrow:hover {
    color: shade(@theme_fg_color, 1.2);
}

notebook > header > tabs > arrow:active {
    color: shade(@theme_fg_color, 0.8);
}

notebook > header > tabs > arrow:disabled {
    color: shade(@theme_bg_color, 0.6);
}

/******************
 * pane separator *
 ******************/
paned > separator {
    background-color: shade(@theme_bg_color, 0.95);
    background-image: image(shade(@theme_bg_color, 0.95));
    color: transparent;
    border-style: none;
}

  paned .sidebar.left, paned .sidebar.right, paned .sidebar.left:dir(rtl), paned .sidebar:dir(rtl), paned .sidebar:dir(ltr), paned .sidebar {
    border-style: none;
}


/**************
 * over under *
 **************/

/* these elements MUST be hidden, otherwise scrolling pages will have
 * missing chunks */

overshoot.top {
  background-image: -gtk-gradient(radial, center top, 0, center top, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
  background-size: 100% 60%;
  background-repeat: no-repeat;
  background-position: center top;
  background-color: transparent;
  border: none;
  box-shadow: none;
}

overshoot.bottom {
  background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
  background-size: 100% 60%;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-color: transparent;
  border: none;
  box-shadow: none;
}

overshoot.left {
  background-image: -gtk-gradient(radial, left center, 0, left center, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
  background-size: 60% 100%;
  background-repeat: no-repeat;
  background-position: left center;
  background-color: transparent;
  border: none;
  box-shadow: none;
}

overshoot.right {
  background-image: -gtk-gradient(radial, right center, 0, right center, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
  background-size: 60% 100%;
  background-repeat: no-repeat;
  background-position: right center;
  background-color: transparent;
  border: none;
  box-shadow: none;
}


undershoot.top {
  background-color: transparent;
  background-image: linear-gradient(to left, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
  padding-top: 1px;
  background-size: 10px 1px;
  background-repeat: repeat-x;
  background-origin: content-box;
  background-position: center top;
}

undershoot.bottom {
  background-color: transparent;
  background-image: linear-gradient(to left, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
  padding-bottom: 1px;
  background-size: 10px 1px;
  background-repeat: repeat-x;
  background-origin: content-box;
  background-position: center bottom;
}

undershoot.left {
  background-color: transparent;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
  padding-left: 1px;
  background-size: 1px 10px;
  background-repeat: repeat-y;
  background-origin: content-box;
  background-position: left center;
}

undershoot.right {
  background-color: transparent;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
  padding-right: 1px;
  background-size: 1px 10px;
  background-repeat: repeat-y;
  background-origin: content-box;
  background-position: right center;
}


.overlay-bar {
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  padding: 3px 6px;
  margin: 3px;
}

  .overlay-bar label {
    color: @tooltip_fg_color;
}


/*************************
 * progressbar and scale *
 *************************/
progressbar {
    padding: 0;
    border-width: 0px;
    border-radius: 8px;
    background-color: transparent;
}

progressbar progress,
treeview.view.progressbar,
treeview.view.progressbar:focus {
    border: none;
    border-radius: 8px;
    color: @theme_selected_fg_color;
    background-color: @theme_selected_bg_color;
}

row:selected progressbar progress,
treeview.view.progressbar:selected,
treeview.view.progressbar:selected:focus,
treeview.view.progressbar:focus:selected,
treeview.view.progressbar:focus:selected:focus {
    color: @theme_selected_fg_color;
    background-color: @theme_selected_fg_color;
}

progressbar progress:backdrop {
    background-image: image(shade(@theme_unfocused_bg_color, 0.85));
}

progressbar trough,
treeview.view.trough,
row:selected progressbar trough {
    border: none;
    border-radius: 8px;
    color: @theme_fg_color;
    background-color: shade(@theme_bg_color, 0.9);
}

treeview.view.trough:selected,
treeview.view.trough:selected:focus {
    color: @theme_fg_color;
    background-color: shade(@theme_bg_color, 0.85);
}

progressbar trough:backdrop {
    background-color: shade(@theme_unfocused_bg_color, 0.95);
}

/* level bars as used for password quality or remaining power */
levelbar trough {
    padding: 1px;
    border-radius: 4px;
}

levelbar block {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
}

levelbar.indicator-continuous block {
    padding: 1px;
    border-radius: 4px;
}

levelbar.indicator-discrete block.horizontal {
    margin: 0 1px;
}

levelbar.indicator-discrete block.vertical {
    margin: 1px 0;
}

/* discrete indicator border rounding,
   uncomment when :nth-child will be working
   on the widget

levelbar.indicator-discrete block.horizontal:first-child {
    border-radius: 2px 0 0 2px;
}

levelbar.indicator-discrete block.horizontal:last-child {
    border-radius: 0 2px 2px 0;
}

levelbar.indicator-discrete block.vertical:first-child {
    border-radius: 2px 2px 0 0;
}

levelbar.indicator-discrete block.vertical:last-child {
    border-radius: 0 0 2px 2px;
}
*/

levelbar block.high {
    border-color: shade(@success_color, 0.85);
    background-image: linear-gradient(to bottom,
                                      shade(@success_color, 1.2),
                                      @success_color 75%,
                                      shade(@success_color, 0.95)
                                      );
}

levelbar block.low {
    border-color: shade(@warning_color, 0.80);
    background-image: linear-gradient(to bottom,
                                      shade(@warning_color, 1.3),
                                      @warning_color 75%,
                                      shade(@warning_color, 0.9)
                                      );
}

levelbar block.empty {
    border-color: alpha(@theme_fg_color, 0.1);
    background-color: transparent;
    background-image: none;
}

/* Gtk Scale & slider */

scale {
    -GtkRange-slider-width: 16;
    -GtkRange-trough-border: 1;
    -GtkScale-slider-length: 16;
    padding: 0;
    border-width: 1px;
    border-radius: 4px;
}

scale slider {
    border-radius: 8px;
    border: 1px solid shade(@theme_bg_color, 0.95);
    background-color: shade(@theme_bg_color, 1.08);
    background-image: none;
    box-shadow: 0 1px rgba(0, 0, 0, 0.1);

    /* widget sizing */
    min-height: 16px;
    min-width: 16px;
    margin: -7px;
}

scale slider:hover {
    border-color: shade(@theme_bg_color, 0.92);
}

scale slider:disabled {
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;
    border-color: shade(@theme_bg_color, 0.85);
}

scale slider.fine-tune:active,
scale slider.fine-tune:active:hover,
scale slider.fine-tune.horizontal:active,
scale slider.fine-tune.horizontal:active:hover {
      background-size: 50%;
      background-repeat: no-repeat;
      background-position: center;
}

scale.mark {
    border-color: shade(@theme_bg_color, 0.85);
}

scale trough {
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 4px;
    background-color: shade(@theme_bg_color, 1.08);
    background-image: none;
}

/* scale trough margin */
scale trough {
    margin: 11px 8px;
}

scale trough.vertical {
    margin: 8px 11px;
}

/*
menuitem scale highlight left,
scale highlight left {
    border-color: @theme_selected_bg_color;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

menuitem scale highlight left:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-color: shade(@theme_selected_bg_color, 0.8);
} */

scale highlight {
    border-radius: 4px;
    border-color: @theme_selected_bg_color;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

scale trough:disabled,
scale highlight left:disabled {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;
}

/*************
 * scrollbar *
 *************/
scrollbar {
  background-color: shade(@theme_bg_color, 0.9);
  transition: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

scrollbar trough {
  border-radius: 0;
}

  scrollbar.top {
    border-bottom: 1px solid transparent;
}

  scrollbar.bottom {
    border-top: 1px solid transparent;
}

  scrollbar.left {
    border-right: 1px solid transparent;
}

  scrollbar.right {
    border-left: 1px solid transparent;
}

  scrollbar:backdrop {
    background-color: shade(@theme_bg_color, 0.9);
    border-color: shade(@borders, 0.95);
    transition: 200ms ease-out;
}

  scrollbar slider {
    min-width: 8px;
    min-height: 8px;
    margin: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background-clip: padding-box;
    background-color: shade(@theme_bg_color, 0.6);
}

    scrollbar slider:hover {
      background-color: shade(@theme_bg_color, 0.6);
}

    scrollbar slider:hover:active {
      background-color: shade(@theme_bg_color, 0.55);
}

    scrollbar slider:backdrop {
      background-color: shade(@theme_bg_color, 0.55);
}

    scrollbar slider:disabled {
      background-color: transparent;
}

  scrollbar.fine-tune slider {
    min-width: 8px;
    min-height: 8px;
}

  scrollbar.fine-tune.horizontal slider {
    border-width: 2px;
}

  scrollbar.fine-tune.vertical slider {
    border-width: 2px;
}

  scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
    border-color: shade(@theme_bg_color, 0.85);
    opacity: 1;
    margin: 0;
    background-color: shade(@theme_bg_color, 0.9);
}

    scrollbar.overlay-indicator:not(.dragging):not(.hovering) slider {
      margin: 0;
      min-width: 8px;
      min-height: 8px;
      background-color: shade(@theme_bg_color, 0.6);
      border: 2px solid transparent;
}

    scrollbar.overlay-indicator:not(.dragging):not(.hovering) button {
      min-width: 12px;
      min-height: 12px;
      background-color: transparent;
      background-clip: padding-box;
      border-radius: 0;
      border: none /*1px solid shade(@theme_bg_color, 0.8)*/;
      -gtk-icon-source: none;
}

    scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal slider {
      margin: 0 2px;
      min-width: 40px;
}

    scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal button {
      margin: 1px 2px;
      min-width: 5px;
}

    scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical slider {
      margin: 2px 0;
      min-height: 40px;
}

    scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical button {
      margin: 2px 1px;
      min-height: 5px;
}

  scrollbar.overlay-indicator.dragging, scrollbar.overlay-indicator.hovering {
    opacity: 1;
}

  scrollbar.horizontal slider {
    min-width: 40px;
}

  scrollbar.vertical slider {
    min-height: 40px;
}

  scrollbar button {
    padding: 0;
    min-width: 12px;
    min-height: 12px;
    border-style: none;
    border-radius: 0;
    transition-property: min-height, min-width, color;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    -gtk-icon-shadow: none;
    color: #787c7d;
}

    scrollbar button:hover {
      border-color: transparent;
      background-color: transparent;
      background-image: none;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0);
      text-shadow: none;
      -gtk-icon-shadow: none;
      color: #535859;
}

    scrollbar button:active, scrollbar button:checked {
      border-color: transparent;
      background-color: transparent;
      background-image: none;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0);
      text-shadow: none;
      -gtk-icon-shadow: none;
      color: @borders;
}

    scrollbar button:disabled {
      border-color: transparent;
      background-color: transparent;
      background-image: none;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0);
      text-shadow: none;
      -gtk-icon-shadow: none;
      color: rgba(120, 124, 125, 0.2);
}

    scrollbar button:backdrop {
      border-color: transparent;
      background-color: transparent;
      background-image: none;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0);
      text-shadow: none;
      -gtk-icon-shadow: none;
      color: #c3c4c4;
}

      scrollbar button:backdrop:disabled {
        border-color: transparent;
        background-color: transparent;
        background-image: none;
        box-shadow: inset 0 1px rgba(255, 255, 255, 0);
        text-shadow: none;
        -gtk-icon-shadow: none;
        color: rgba(195, 196, 196, 0.2);
}

  scrollbar.vertical button.down {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

  scrollbar.vertical button.up {
    -gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
}

  scrollbar.horizontal button.down {
    -gtk-icon-source: -gtk-icontheme("pan-right-symbolic");
}

  scrollbar.horizontal button.up {
    -gtk-icon-source: -gtk-icontheme("pan-left-symbolic");
}


treeview ~ scrollbar.vertical {
  border-top: 1px solid @borders;
  margin-top: -1px;
}


/*************
 * separator *
 *************/
.sidebar view separator,
view separator,
.separator,
separator {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

button > separator,
button separator {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

button > separator:disabled,
button separator:disabled {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

.primary-toolbar GtkSeparatorToolItem,
.primary-toolbar separator,
.primary-toolbar separator:disabled,
toolbar GtkSeparatorToolItem,
toolbar separator,
toolbar separator:disabled {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

headerbar GtkSeparatorToolItem,
headerbar separator,
headerbar separator:disabled,
.titlebar GtkSeparatorToolItem,
.titlebar separator,
.titlebar separator:disabled {
    -GtkWidget-window-dragging: true;

    min-width: 1px;
    min-height: 1px;
    margin-bottom: 4px;
    margin-top: 4px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: linear-gradient(to bottom, shade(@borders, 0.8), shade(@borders, 0.7));
    background-size: 1px 1px;
}

.primary-toolbar button separator,
.primary-toolbar > button separator,
toolbar button separator,
toolbar button > separator {
    border-color: shade(@toolbar_bg_color, 0.95);
}

headerbar button separator,
headerbar button > separator,
.titlebar button separator,
.titlebar button > separator {
    border-color: shade(@titlebar_bg_color, 0.95);
}

.primary-toolbar button separator:disabled,
.primary-toolbar > button separator:disabled,
toolbar button separator:disabled,
toolbar button > separator:disabled {
    border-color: shade(@toolbar_bg_color, 0.85);
}

headerbar button separator:disabled,
headerbar button > separator:disabled,
.titlebar button separator:disabled,
.titlebar button > separator:disabled {
    border-color: shade(@titlebar_bg_color, 0.85);
}

menuitem separator {
    border-width: 1px;
    border-style: none;
    color: shade(@menu_bg_color, 0.98);
}

combobox separator {
    border-style: none;
}

/***********
 * sidebar *
 ***********/
.sidebar,
.sidebar view,
.sidebar > view,
.sidebar scrolledwindow {
    background-color: @theme_bg_color;
    color: mix(@theme_fg_color, @theme_bg_color, 0.1);
}

.sidebar row:selected,
.sidebar row:selected:hover,
.sidebar row:selected:focus,
.sidebar view row:selected,
.sidebar view row:selected:hover,
.sidebar view row:selected:focus {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.85);
    background-image: none;
    color: @theme_fg_color;
}

.sidebar row:hover,
.sidebar view row:hover {
    border-color: shade(@theme_bg_color, 0.95);
    background-color: shade(@theme_bg_color, 0.95);
    background-image: none;
    color: @theme_fg_color;
}

.sidebar row:selected:hover,
.sidebar view row:selected:hover {
    border-color: shade(@theme_bg_color, 0.9);
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;
    color: @theme_fg_color;
}

.sidebar frame {
    border-width: 0;
}

/* nemo sidebar padding */
NemoWindow .sidebar .cell {
    padding: 2px 2px; 
}

/*filechooser placessidebar.sidebar,
.nautilus-window placessidebar.sidebar {
  background-color: @theme_bg_color;
}


filechooser placessidebar.sidebar:backdrop,
.nautilus-window placessidebar.sidebar:backdrop {
    background-color: @theme_fg_color;
}
*/

.nemo-window .sidebar {
  background-color: @theme_bg_color;
}

.nemo-window .sidebar .view, .nemo-window .sidebar iconview, .nemo-window .sidebar row {
  background-color: transparent;
}

.nemo-window .sidebar .view.cell:selected, .nemo-window .sidebar iconview.cell:selected, .nemo-window .sidebar row.cell:selected {
  border-color: shade(@theme_bg_color, 0.85);
  background-color: shade(@theme_bg_color, 0.85);
  background-image: none;
  color: @theme_fg_color;
}

/* .nemo-window .sidebar .view.expander, .nemo-window .sidebar iconview.expander, .nemo-window .sidebar row.expander {
  color: #787e8a;
}
 */
/* .nemo-window .sidebar .view.expander:hover, .nemo-window .sidebar iconview.expander:hover, .nemo-window .sidebar row.expander:hover {
  color: #BAC3CF;
}
 */
.nemo-window .sidebar separator {
  background-color: transparent;
}


/* Sidebar spacing for 3.20 */
placessidebar > viewport.frame {
    border-style: none;
}

placessidebar row {
    min-height: 36px;
    padding: 0px;
}

placessidebar row > revealer {
    padding: 0 14px;
}

placessidebar row image.sidebar-icon {
    opacity: 0.7;
}

placessidebar row image.sidebar-icon:dir(ltr) {
    padding-right: 8px;
}

placessidebar row image.sidebar-icon:dir(rtl) {
    padding-left: 8px;
}

placessidebar row label.sidebar-label:dir(ltr) {
    padding-right: 2px;
}

placessidebar row label.sidebar-label:dir(rtl) {
    padding-left: 2px;
}

button.sidebar-button {
    min-height: 26px;
    min-width: 26px;
    margin-top: 3px;
    margin-bottom: 3px;
    padding: 0;
    border-radius: 100%;
    -gtk-outline-radius: 100%;
}


/**************
 * spinbutton *
 **************/

spinbutton {
    color: mix(@theme_text_color, @theme_base_color, 0.4);
    padding: 2px 4px;
    border-width: 0;
    border-radius: 0;
    border-style: none;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
}

spinbutton:disabled {
    color: mix(@theme_text_color, @theme_base_color, 0.7);
}

/* HORIZONTAL */
spinbutton.horizontal entry {
    border-bottom-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: 7px 15px;
}

spinbutton.horizontal button.down {
    border-radius: 0;
    border-right-width: 0;
    border-left-width: 0;
    box-shadow: none;
    margin-right: 0;
}

spinbutton.horizontal button.up {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 0;
    box-shadow: none;
}

spinbutton.vertical entry {
    border-radius: 0;
    box-shadow: none;
}

spinbutton.vertical button.up {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-width: 0;
    box-shadow: none;
}

spinbutton.vertical button.down {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top-width: 0;
    box-shadow: none;
}

/***********
 * spinner *
 ***********/
@keyframes spin {
  to {
    -gtk-icon-transform: rotate(1turn);
}
 }
spinner {
  background: none;
  opacity: 0;
  -gtk-icon-source: -gtk-icontheme("process-working-symbolic");
}

  spinner:checked {
    opacity: 1;
    animation: spin 1s linear infinite;
}

    spinner:checked:disabled {
      opacity: 0.5;
}


/*************
 * statusbar *
 *************/
statusbar {
    padding: 4px;
    color: @theme_fg_color;
}

statusbar > frame {
    border-width: 0;
}

/**********
 * switch *
 **********/
switch {
    font-weight: bold;
    font-size: 0;
    outline-offset: -4px;
    margin: 4px;
    border: 1px solid @borders;
    border-radius: 16px;
/*  box-shadow: inset 0 -1px alpha(#4c4c4c, 0.1),
              inset 0 2px alpha(#4c4c4c, 0.1),
              inset 0 1px alpha(#4c4c4c, 0.1), 0 
              -1px rgba(0, 0, 0, 0.1); */
    background-color: @borders;
}

switch:checked {
    border-color: #4ed464;
    background-color: #4ed464;
    text-shadow: 0 0 rgba(24, 68, 114, 0), 0 0 0 rgba(255, 255, 255, 0);
}

switch:disabled {
    border-color: shade(@theme_base_color, 0.85);
    background-color: shade(@theme_base_color, 0.85);
    text-shadow: none;
}

switch:backdrop {
    box-shadow: none;
    color: transparent;
    border-color: shade(@borders, 0.95);
    background-color: shade(@borders, 0.95);
    transition: 200ms ease-out;
}

switch:backdrop:checked {
    color: transparent;
    border-color: shade(#4ed464, 0.8);
    background-color: shade(#4ed464, 0.8);
}

    /*    switch:backdrop:disabled {
    color: transparent;
    border-color: shade(@borders, 1.3);
    background-color: shade(@borders, 1.3);
}
 */
switch slider {
    min-width: 20px;
    min-height: 20px;
    border: 1px solid;
    border-radius: 20px;
    transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: @theme_fg_color;
    outline-color: rgba(46, 52, 54, 0.3);
    border-color: @theme_base_color;
    background-image: image(@theme_base_color);
/*    box-shadow: inset 0 1px @theme_bg_color,
                inset 0 -2px shade(@theme_bg_color, 0.95),
                inset 0 -1px shade(@theme_bg_color, 0.85),
                0 1px rgba(0, 0, 0, 0.1);
}
 */
    box-shadow: 0 2px 2px 1px rgba(0,0,0,0.09);
}

/*  switch:hover slider {
outline-color: rgba(46, 52, 54, 0.3);
border-color: @borders;
background-image: image(@theme_bg_color);
box-shadow: inset 0 0 @theme_bg_color,
            inset 0 0 #f4f4f4,
            inset 0 0 #cfcfcd,
            0 1px rgba(0, 0, 0, 0.1);
}
 */
switch:disabled slider {
    border-color: shade(@borders, 1.065);
    background-color: shade(@borders, 1.065);
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
}

/* switch:disabled slider label, switch:disabled slider {} */    
switch:backdrop slider {
    transition: 200ms ease-out;
    border-color: shade(@theme_unfocused_bg_color, 1.2);
    background-color: shade(@theme_unfocused_bg_color, 1.2);
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
}

/* switch:backdrop slider label, switch:backdrop slider { } */
/* switch:backdrop:checked slider {} */
/*  switch:backdrop:disabled slider {
    border-color: shade(@borders, 0.95);
    background-color: shade(@theme_bg_color, 0.85);
    background-image: none;
    border-color: @theme_bg_color;
    background-color: transparent;
    background-image: image(@theme_bg_color);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
}
 */
/* switch:backdrop:disabled slider label, switch:backdrop:disabled slider { } */
row:selected switch {
    box-shadow: none;
    border-color: shade(@theme_selected_bg_color, 0.6);
}

row:selected switch:backdrop {
    border-color: shade(@theme_selected_bg_color, 0.6);
}

row:selected switch.slider:dir(rtl) {
    border-left-color: @borders;
}

row:selected switch.slider:dir(ltr) {
    border-right-color: @borders;
}

row:selected switch.slider:checked, row:selected switch.slider {
    border-color: shade(@theme_selected_bg_color, 0.6);
}


/************
 * textview *
 ************/
Gtktextview {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

/* Firefox adress bar */
label.separator {
  color: @theme_fg_color;
}

  label.separator:backdrop {
    color: shade(@theme_fg_color, 0.9);
}

label selection {
  background-color: @theme_selected_bg_color;
  color: @theme_selected_fg_color;
}

label:backdrop {
  color: alpha(@theme_fg_color, 0.5);
}


/* Textview selection background */
.view:selected:focus, iconview:selected:focus, .view:selected, iconview:selected,
.view text:selected:focus,
iconview text:selected:focus,
textview text:selected:focus,
.view text:selected,
iconview text:selected,
textview text:selected, .view text selection:focus, iconview text selection:focus, .view text selection, iconview text selection,
textview text selection:focus,
textview text selection, flowbox flowboxchild:selected, spinbutton:not(.vertical) selection:focus, spinbutton:not(.vertical) selection,
entry selection:focus,
entry selection, modelbutton.flat:selected, popover.background checkbutton:selected,
popover.background radiobutton:selected,
.menuitem.button.flat:selected, treeview.view:selected:focus, treeview.view:selected, row:selected, calendar:selected {
  background-color: @theme_selected_bg_color;
  color: @theme_selected_fg_color;
}


/*****************
 * color chooser *
 *****************/
colorswatch,
colorswatch:selected {
    border-width: 1px;
    border-style: solid;
    border-color: alpha(black, 0.1);
    border-radius: 1px;
    background-color: transparent;
    background-clip: border-box;
}

colorswatch:hover,
colorswatch:selected:hover {
    border-color: alpha(black, 0.3);
}

colorswatch.color-dark:hover {
}

colorswatch.color-light:hover {
}

colorswatch.color-light:selected:hover,
colorswatch.color-dark:selected:hover {
    background-image: none;
}

colorswatch left,
colorswatch:first-child {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

colorswatch right,
colorswatch:last-child {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}

colorswatch:only-child {
    border-radius: 4px;
}

colorswatch top {
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
}

colorswatch bottom {
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
}

colorchooser #add-color-button {
    background-clip: padding-box;
    border-color: alpha(black, 0.1);
    background-color: shade(@theme_bg_color, 0.95);
    color: @theme_fg_color;
}

colorchooser #add-color-button:hover {
    border-color: alpha(black, 0.3);
    background-color: shade(@theme_bg_color, 0.90);
    color: @theme_fg_color;
}
/*
.color-active-badge,
.color-active-badge:selected {
    border-width: 1px;
    border-style: solid;
    border-width: 2px;
    background-color: transparent;
}

.color-active-badge.color-light,
.color-active-badge.color-light:hover {
    border-color: alpha(black, 0.3);
    color: alpha(black, 0.3);
}

.color-active-badge.color-dark,
.color-active-badge.color-dark:hover {
    border-color: alpha(white, 0.3);
    color: alpha(white, 0.3);
}

GtkColorEditor colorswatch {
    border-radius: 4px;
}

GtkColorEditor colorswatch.color-dark:hover,
GtkColorEditor colorswatch.color-light:hover {
    background-image: none;
    border-color: alpha(black, 0.3);
}
*/

button.color {
    padding: 2px;
}

/************
 * Pathbars *
 ************/
.path-bar button.text-button, .path-bar button.image-button, .path-bar button {
  padding-left: 4px;
  padding-right: 4px;
}

.path-bar button.text-button.image-button label {
  padding-left: 0;
  padding-right: 0;
}

.path-bar button.text-button.image-button label:last-child, .path-bar button label:last-child {
  padding-right: 8px;
}

.path-bar button.text-button.image-button label:first-child, .path-bar button label:first-child {
  padding-left: 8px;
}

.path-bar button image {
  padding-left: 4px;
  padding-right: 4px;
}

.path-bar button.slider-button {
  padding-left: 0;
  padding-right: 0;
}

.path-bar button.slider-button:dir(ltr) {
  border-right-width: 0;
}

  
/**************
 * headerbar *
 **************/
headerbar {
    padding: 4px 8px;
    border-width: 0;
    border-style: solid;
    border-color: shade(@titlebar_bg_color, 0.7);
    border-bottom-width: 1px;
    background-color: transparent;
    background-image: none;
    color: @titlebar_fg_color;
}

headerbar:backdrop {
    background-color: @theme_unfocused_bg_color;
    background-image: none;
    color: @theme_unfocused_fg_color;
}

headerbar button.image-button {
    padding: 6px;
}
/* pantheon photos label fix */
headerbar .title {
    font-weight: bold;
    padding: 0 12px;
}

headerbar .subtitle {
    font-size: smaller;
    padding: 0 12px;
}

headerbar combobox,
headerbar button { 
    padding: 4px 8px;
    border-width: 1px;
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: image(@theme_base_color);
    background-color: transparent;
    color: @titlebar_fg_color;
    box-shadow: none;
}

headerbar button:hover {
}

headerbar button:active {
    border-color: shade(@titlebar_bg_color, 0.8);
    background-color: shade(@titlebar_bg_color, 0.95);
    background-image: none;
}

/* workaround for adresstabs in Nautilus*/
statusbar button:checked,
headerbar button:checked,
headerbar button:checked:active,
headerbar button:checked:hover {
    background-image: image(shade(@theme_bg_color, 0.5));
    border-color: shade(@theme_bg_color, 0.5);
    color:@theme_selected_fg_color;
}

headerbar button:active:hover {
    border-color: shade(@titlebar_bg_color, 0.7);
}

headerbar button:focus,
headerbar button:hover:focus,
headerbar button:active:focus,
headerbar button:active:hover:focus {
    border-color: shade(@titlebar_bg_color, 0.7);
}

/* bug in disabled headerbar buttons */
headerbar button:disabled {
/*    border-color: shade(@titlebar_bg_color, 0.85);
    background-color: shade(@titlebar_bg_color, 0.9);
    background-image: none;*/
    color: alpha(@theme_fg_color, 0.7);
}

headerbar button:active *:disabled {
/*    border-color: shade(@titlebar_bg_color, 0.9);
    background-color: shade(@titlebar_bg_color, 0.80);
    background-image: none;*/
    color: alpha(@theme_fg_color, 0.7);
}

headerbar combobox:backdrop,
headerbar button:backdrop { 
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: image(shade(shade(@theme_bg_color, 0.91), 1.1));
    color: @theme_unfocused_fg_color;
}

statusbar button:checked:backdrop,
headerbar button:checked:backdrop,
headerbar button:checked:active:backdrop,
headerbar button:checked:hover:backdrop {
    background-image: none;
    background-color: shade(@theme_unfocused_bg_color, 0.8);
    border-color: shade(@theme_unfocused_bg_color, 0.75);
    color: shade(@theme_unfocused_fg_color, 0.8);
}

headerbar entry {
    border-color: shade(@titlebar_bg_color, 0.95);
/*    background: alpha(@base_color, 0.4);*/
}

headerbar entry:active,
headerbar entry:focus {
    border-color: shade(@titlebar_bg_color, 0.7);
    background: @theme_base_color;
}

headerbar entry:selected {
    background-color: @theme_selected_bg_color;
}

/***********
 * toolbar *
 ***********/
toolbar {
    padding: 4px;
    border-style: none;
    background-color: @toolbar_bg_color;
    background-image: none;
    color: @toolbar_fg_color;
}

toolbar:backdrop {
    background-image: none;
    color: @theme_unfocused_fg_color;
    background-color: @theme_unfocused_bg_color;
}

toolbar button {
    padding: 2px 2px;
}

toolbar button.text-button {
    padding: 2px 4px;
}

toolbar button .image-button {
    padding: 4px 3px 3px 4px;
}

toolbar:disabled {
    background-color: shade(@toolbar_bg_color, 0.9);
    color: mix(@toolbar_fg_color, @toolbar_bg_color, 0.5);
}

/* menubar toolbars */
toolbar menubar {
    -GtkToolbar-button-relief: normal;
}

/*******************
 * primary-toolbar *
 *******************/
.primary-toolbar,
.primary-toolbar toolbar,
.primary-toolbar > toolbar {
    -GtkWidget-window-dragging: true;

    padding: 4px;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@toolbar_bg_color, 0.8);
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                                      @titlebar_bg_color,
                                      shade(@titlebar_bg_color, 0.96),
                                      shade(@titlebar_bg_color, 0.92)
                                      );
    color: @toolbar_fg_color;
}

.primary-toolbar:backdrop,
.primary-toolbar toolbar:backdrop,
.primary-toolbar toolbar:backdrop {
    color: @theme_unfocused_fg_color;
    background-image: none;
    background-color: @theme_unfocused_bg_color;
}

/* primary toolbar button */
.primary-toolbar combobox,
.primary-toolbar button {
    padding: 4px 8px;
    border-width: 1px;
    border-color: transparent;
    border-radius: 4px;
    background-color: shade(@theme_base_color, 1.0);
    background-image: none;
    box-shadow: none;
    color: @toolbar_fg_color;
}

.primary-toolbar .raised button,
.primary-toolbar .raised button,
toolbar combobox,
toolbar button {
    padding: 2px 10px;
    border-width: 1px;
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: image(shade(shade(@theme_bg_color, 0.95), 1.1));
    color: @toolbar_fg_color;
}

.primary-toolbar .raised button:backdrop,
.primary-toolbar .raised button:backdrop,
toolbar combobox:backdrop,
toolbar button:backdrop {
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: image(shade(shade(@theme_bg_color, 0.91), 1.1));
    color: @theme_unfocused_fg_color;
}

.primary-toolbar .raised button:checked:backdrop,
.primary-toolbar .raised button:checked:backdrop,
toolbar combobox:checked:backdrop,
toolbar button:checked:backdrop {
    background-image: none;
    background-color: shade(@theme_unfocused_bg_color, 0.8);
    border-color: shade(@theme_unfocused_bg_color, 0.75);
    color: shade(@theme_unfocused_fg_color, 0.9);
}

.primary-toolbar button:hover,
.primary-toolbar button:checked,
toolbar button:hover {
}

.primary-toolbar button:active,
toolbar button:active {
    border-color: transparent;
    background-color: shade(@toolbar_bg_color, 0.95);
    background-image: none;
}

.primary-toolbar button:active:hover,
toolbar button:active:hover {
    border-color: transparent;
}

.primary-toolbar button:focus,
.primary-toolbar button:hover:focus,
.primary-toolbar button:active:focus,
.primary-toolbar button:active:hover:focus,
toolbar button:focus,
toolbar button:hover:focus,
toolbar button:active:focus,
toolbar button:active:hover:focus {
    border-color: shade(@toolbar_bg_color, 0.7);
}

.primary-toolbar button:disabled,
toolbar button:disabled {
    /*border-color: shade(@theme_base_color, 0.7);
    background-color: shade(@theme_base_color, 0.8);
    background-image: none;*/
    color: alpha(@theme_fg_color, 0.7);
}

.primary-toolbar button:active *:disabled,
toolbar button:active *:disabled {
    /*border-color: transparent;
    background-color: shade(@toolbar_bg_color, 0.80);
    background-image: none;*/
    color: alpha(@theme_fg_color, 0.7);
}

.primary-toolbar entry,
toolbar entry {
    border-color: shade(@toolbar_bg_color, 0.95);
}

.primary-toolbar entry:active,
.primary-toolbar entry:focus,
toolbar entry:active,
toolbar entry:focus {
    border-color: transparent;
    box-shadow: inset 0 0 2px 1px shade(@theme_selected_bg_color, 1.15);
}

.primary-toolbar entry:backdrop,
toolbar entry:backdrop {
    background-color: shade(@theme_base_color, 0.98);
    border-color: shade(@toolbar_bg_color, 0.95);
}

/* inline-toolbar */
.inline-toolbar toolbar {
    -GtkToolbar-button-relief: normal;

    padding: 1px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
    background-color: @theme_bg_color;
    background-image: none;
}

.inline-toolbar toolbar:last-child {
    border-width: 0 1px 1px 1px;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
}

.inline-toolbar toolbar button {
    padding: 1px;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
    background-color: shade(@theme_bg_color, 1.08);
    background-image: none;
    color: @theme_fg_color;
}

.inline-toolbar toolbar button:hover {
    border-color: shade(@theme_bg_color, 0.7);
    background-color: shade(@theme_bg_color, 1.10);
    background-image: none;
}

.inline-toolbar toolbar button:active {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.95);
    background-image: none;
}

.inline-toolbar toolbar button:active:hover {
    border-color: shade(@theme_bg_color, 0.7);
}

.inline-toolbar toolbar button:focus,
.inline-toolbar toolbar button:hover:focus,
.inline-toolbar toolbar button:active:focus,
.inline-toolbar toolbar button:active:hover:focus {
    border-color: shade(@theme_bg_color, 0.7);
}

.inline-toolbar toolbar button:disabled,
.inline-toolbar toolbar toolbutton button:disabled {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;
}

.inline-toolbar toolbar button:active *:disabled
.inline-toolbar toolbar toolbutton button:active *:disabled {
    border-color: shade(@theme_bg_color, 0.75);
    background-color: shade(@theme_bg_color, 0.80);
    background-image: none;
}

/******************
 * linked buttons *
 *****************/
/* set up shadows for visual separation */
.linked button,
.inline-toolbar toolbar button,
.inline-toolbar toolbar toolbutton button,
.inline-toolbar toolbar toolbutton > button {
    box-shadow: inset -1px 0 shade(@theme_bg_color, 0.9);
}

.linked button:active,
.inline-toolbar toolbar button:active,
.inline-toolbar toolbar toolbutton button:active,
.inline-toolbar toolbar toolbutton > button:active {
    box-shadow: inset -1px 0 shade(@theme_bg_color, 0.9),
                inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset 0 -1px alpha(@dark_shadow, 0.05);
}

.linked button:disabled,
.inline-toolbar toolbar button:disabled,
.inline-toolbar toolbar toolbutton button:disabled,
.inline-toolbar toolbar toolbutton > button:disabled {
    box-shadow: inset -1px 0 shade(@theme_bg_color, 0.9);
}

/* remove box shadow from last-child and only-child */
.linked button:last-child,
.linked button:only-child,
.linked button:disabled:last-child,
.linked button:disabled:only-child,
.linked button:active *:disabled:last-child,
.linked button:active *:disabled:only-child,
.inline-toolbar toolbar button:last-child,
.inline-toolbar toolbar button:only-child,
.inline-toolbar toolbar button:disabled:last-child,
.inline-toolbar toolbar button:disabled:only-child,
.inline-toolbar toolbar button:active *:disabled:last-child,
.inline-toolbar toolbar button:active *:disabled:only-child,
.inline-toolbar toolbar toolbutton:last-child > button,
.inline-toolbar toolbar toolbutton:only-child > button,
.inline-toolbar toolbar toolbutton:last-child > button:disabled,
.inline-toolbar toolbar toolbutton:only-child > button:disabled,
.inline-toolbar toolbar toolbutton:last-child > button:active *:disabled,
.inline-toolbar toolbar toolbutton:only-child > button:active *:disabled {
    box-shadow: none;
}

/* add back the inset shadow effect */
.linked button:active:last-child,
.linked button:active:only-child,
.inline-toolbar toolbar button:active:last-child,
.inline-toolbar toolbar button:active:only-child,
.inline-toolbar toolbar toolbutton:last-child > button:active,
.inline-toolbar toolbar toolbutton:only-child > button:active {
    box-shadow: inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset -1px 0 alpha(@dark_shadow, 0.07);
}

/* middle button */
.linked entry,
.linked button,
.linked button:active,
.linked button:active:hover,
.linked button:disabled,
.inline-toolbar toolbar button,
.inline-toolbar toolbar button:active,
.inline-toolbar toolbar button:disabled,
.inline-toolbar toolbar toolbutton button,
.inline-toolbar toolbar toolbutton button:active,
.inline-toolbar toolbar toolbutton button:disabled {
    border-width: 1px;
    border-radius: 0;
    border-right-width: 0;
    border-left-width: 0;
}

/*leftmost button */
.linked entry:first-child,
.linked button:first-child,
.linked button:active:first-child,
.linked button:active:hover:first-child,
.linked button:disabled:first-child,
.inline-toolbar toolbar button:first-child,
.inline-toolbar toolbar button:active:first-child,
.inline-toolbar toolbar button:disabled:first-child,
.inline-toolbar toolbar toolbutton:first-child button,
.inline-toolbar toolbar toolbutton:first-child button:active,
.inline-toolbar toolbar toolbutton:first-child button:disabled {
    border-width: 1px;
    border-radius: 4px;
    border-right-width: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* rightmost button */
.linked entry:last-child,
.linked button:last-child,
.linked button:active:last-child,
.linked button:active:hover:last-child,
.linked button:disabled:last-child,
.inline-toolbar toolbar button:last-child,
.inline-toolbar toolbar button:active:last-child,
.inline-toolbar toolbar button:disabled:last-child,
.inline-toolbar toolbar toolbutton:last-child button,
.inline-toolbar toolbar toolbutton:last-child button:active,
.inline-toolbar toolbar toolbutton:last-child button:disabled {
    border-width: 1px;
    border-radius: 4px;
    border-left-width: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* linked single button */
.linked entry:only-child,
.linked button:only-child,
.linked button:active:only-child,
.linked button:active:hover:only-child,
.linked button:disabled:only-child,
.inline-toolbar toolbar button:only-child,
.inline-toolbar toolbar button:active:only-child,
.inline-toolbar toolbar button:disabled:only-child,
.inline-toolbar toolbar toolbutton:only-child button,
.inline-toolbar toolbar toolbutton:only-child button:active,
.inline-toolbar toolbar toolbutton:only-child button:disabled {
    border-width: 1px;
    border-radius: 4px;
}

/* linked button shadows (vertical) */
.linked.vertical button,
.inline-toolbar toolbar.vertical button,
.inline-toolbar toolbar.vertical toolbutton > button {
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.9);
}

.linked.vertical button:active,
.inline-toolbar toolbar.vertical button:active,
.inline-toolbar toolbar.vertical toolbutton > button:active {
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.9),
                inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset -1px 0 alpha(@dark_shadow, 0.07);
}

.linked.vertical button:disabled,
.inline-toolbar toolbar.vertical button:disabled,
.inline-toolbar toolbar.vertical toolbutton > button:disabled {
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.85);
}

/* remove box shadow from last-child and only-child */
.linked.vertical button:last-child,
.linked.vertical button:only-child,
.linked.vertical button:disabled:last-child,
.linked.vertical button:disabled:only-child,
.linked.vertical button:active *:disabled:last-child,
.linked.vertical button:active *:disabled:only-child,
.inline-toolbar toolbar.vertical button:last-child,
.inline-toolbar toolbar.vertical button:only-child,
.inline-toolbar toolbar.vertical button:disabled:last-child,
.inline-toolbar toolbar.vertical button:disabled:only-child,
.inline-toolbar toolbar.vertical button:active *:disabled:last-child,
.inline-toolbar toolbar.vertical button:active *:disabled:only-child,
.inline-toolbar toolbar.vertical toolbutton:last-child > button,
.inline-toolbar toolbar.vertical toolbutton:only-child > button,
.inline-toolbar toolbar.vertical toolbutton:last-child > button:disabled,
.inline-toolbar toolbar.vertical toolbutton:only-child > button:disabled,
.inline-toolbar toolbar.vertical toolbutton:last-child > button:active *:disabled,
.inline-toolbar toolbar.vertical toolbutton:only-child > button:active *:disabled {
    box-shadow: none;
}

/* add back the inset shadow effect */
.linked.vertical button:active:last-child,
.linked.vertical button:active:only-child,
.inline-toolbar toolbar.vertical button:active:last-child,
.inline-toolbar toolbar.vertical button:active:only-child,
.inline-toolbar toolbar.vertical toolbutton:last-child > button:active,
.inline-toolbar toolbar.vertical toolbutton:only-child > button:active {
    box-shadow: inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset -1px 0 alpha(@dark_shadow, 0.07);
}

/* middle button (vertical) */
.linked.vertical entry,
.linked.vertical button,
.linked.vertical button:active,
.linked.vertical button:active:hover,
.linked.vertical button:disabled {
    border-width: 1px;
    border-radius: 0;
    border-top-width: 0;
    border-bottom-width: 0;
}

/* top button (vertical) */
.linked.vertical entry:first-child,
.linked.vertical button:first-child,
.linked.vertical button:active:first-child,
.linked.vertical button:active:hover:first-child,
.linked.vertical button:disabled:first-child {
    border-width: 1px;
    border-radius: 4px;
    border-bottom-width: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

/* bottom button (vertical) */
.linked.vertical entry:last-child,
.linked.vertical button:last-child,
.linked.vertical button:active:last-child,
.linked.vertical button:active:hover:last-child,
.linked.vertical button:disabled:last-child {
    border-width: 1px;
    border-radius: 4px;
    border-top-width: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* linked single button (vertical) */
.linked.vertical entry:only-child,
.linked.vertical button:only-child,
.linked.vertical button:active:only-child,
.linked.vertical button:active:hover:only-child,
.linked.vertical button:disabled:only-child {
    border-width: 1px;
    border-radius: 4px;
}

/* linked toolbar buttons */
.primary-toolbar button.raised.linked,
.primary-toolbar .raised.linked button,
toolbar button.raised.linked,
toolbar .raised.linked button,
toolbar .linked button {
    box-shadow: inset -1px 0 shade(@toolbar_bg_color, 0.98),
                inset 0 -1px shade(@theme_bg_color, 0.8);
}

.primary-toolbar button.raised.linked:active,
.primary-toolbar .raised.linked button:active,
toolbar button.raised.linked:active,
toolbar .raised.linked button:active,
toolbar .linked button:active {
    box-shadow: inset -1px 0 shade(@toolbar_bg_color, 0.9),
                inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset 0 -1px alpha(@dark_shadow, 0.05);
}

.primary-toolbar button.raised.linked:disabled,
.primary-toolbar .raised.linked button:disabled,
toolbar button.raised.linked:disabled,
toolbar .raised.linked button:disabled,
toolbar .linked button:disabled {
    box-shadow: none;
}

/* remove box shadow from last-child and only-child */
.primary-toolbar button.raised.linked:last-child,
.primary-toolbar button.raised.linked:only-child,
.primary-toolbar button:disabled.raised.linked:last-child,
.primary-toolbar button:disabled.raised.linked:only-child,
.primary-toolbar button:active *:disabled.raised.linked:last-child,
.primary-toolbar button:active *:disabled.raised.linked:only-child,
.primary-toolbar .raised.linked button:last-child,
.primary-toolbar .raised.linked button:only-child,
.primary-toolbar .raised.linked button:disabled:last-child,
.primary-toolbar .raised.linked button:disabled:only-child,
.primary-toolbar .raised.linked button:active *:disabled:last-child,
.primary-toolbar .raised.linked button:active *:disabled:only-child,
toolbar button.raised.linked:last-child,
toolbar button.raised.linked:only-child,
toolbar button:disabled.raised.linked:last-child,
toolbar button:disabled.raised.linked:only-child,
toolbar button:active *:disabled.raised.linked:last-child,
toolbar button:active *:disabled.raised.linked:only-child,
toolbar .raised.linked button:last-child,
toolbar .raised.linked button:only-child,
toolbar .raised.linked button:disabled:last-child,
toolbar .raised.linked button:disabled:only-child,
toolbar .raised.linked button:active *:disabled:last-child,
toolbar .raised.linked button:active *:disabled:only-child,
toolbar .linked button:last-child,
toolbar .linked button:only-child,
toolbar .linked button:disabled:last-child,
toolbar .linked button:disabled:only-child,
toolbar .linked button:active *:disabled:last-child,
toolbar .linked button:active *:disabled:only-child {
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.9);
    border-radius: 4px;
}

/* add back the inset shadow effect */
.primary-toolbar button:active.raised.linked:last-child,
.primary-toolbar button:active.raised.linked:only-child,
.primary-toolbar .raised.linked button:active:last-child,
.primary-toolbar .raised.linked button:active:only-child,
toolbar button:active.raised.linked:last-child,
toolbar button:active.raised.linked:only-child,
toolbar .raised.linked button:active:last-child,
toolbar .raised.linked button:active:only-child,
toolbar .linked button:active:last-child,
toolbar .linked button:active:only-child {
    box-shadow: inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset -1px 0 alpha(@dark_shadow, 0.07);
}

/* middle button */
.primary-toolbar button.raised.linked,
.primary-toolbar button.raised.linked:active,
.primary-toolbar button.raised.linked:disabled,
.primary-toolbar .raised.linked button,
.primary-toolbar .raised.linked button:active,
.primary-toolbar .raised.linked button:disabled,
toolbar button.raised.linked,
toolbar button.raised.linked:active,
toolbar button.raised.linked:disabled,
toolbar .raised.linked button,
toolbar .raised.linked button:active,
toolbar .raised.linked button:disabled,
toolbar .linked button,
toolbar .linked button:active,
toolbar .linked button:disabled {
    border-width: 1px;
    border-radius: 0px;
    border-right-width: 0;
    border-left-width: 0;
}

/* leftmost button */
.primary-toolbar button.raised.linked:first-child,
.primary-toolbar button.raised.linked:active:first-child,
.primary-toolbar button.raised.linked:disabled:first-child,
.primary-toolbar .raised.linked button:first-child,
.primary-toolbar .raised.linked button:active:first-child,
.primary-toolbar .raised.linked button:disabled:first-child,
toolbar button.raised.linked:first-child,
toolbar button.raised.linked:active:first-child,
toolbar button.raised.linked:disabled:first-child,
toolbar .raised.linked button:first-child,
toolbar .raised.linked button:active:first-child,
toolbar .raised.linked button:disabled:first-child,
toolbar .linked button:first-child,
toolbar .linked button:active:first-child {
    border-width: 1px;
    border-radius: 4px;
    border-right-width: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* rightmost button */
.primary-toolbar button.raised.linked:last-child,
.primary-toolbar button.raised.linked:active:last-child,
.primary-toolbar button.raised.linked:disabled:last-child,
.primary-toolbar .raised.linked button:last-child,
.primary-toolbar .raised.linked button:active:last-child,
.primary-toolbar .raised.linked button:disabled:last-child,
toolbar button.raised.linked:last-child,
toolbar button.raised.linked:active:last-child,
toolbar button.raised.linked:disabled:last-child,
toolbar .raised.linked button:last-child,
toolbar .raised.linked button:active:last-child,
toolbar .raised.linked button:disabled:last-child,
toolbar .linked button:last-child,
toolbar .linked button:active:last-child,
toolbar .linked button:disabled:last-child {
    border-width: 1px;
    border-radius: 4px;
    border-left-width: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* linked single button */
.primary-toolbar button.raised.linked:only-child,
.primary-toolbar button.raised.linked:active:only-child,
.primary-toolbar button.raised.linked:disabled:only-child,
.primary-toolbar .raised.linked button:only-child,
.primary-toolbar .raised.linked button:active:only-child,
.primary-toolbar .raised.linked button:disabled:only-child,
toolbar button.raised.linked:only-child,
toolbar button.raised.linked:active:only-child,
toolbar button.raised.linked:disabled:only-child,
toolbar .raised.linked button:only-child,
toolbar .raised.linked button:active:only-child,
toolbar .raised.linked button:disabled:only-child,
toolbar .linked button:only-child,
toolbar .linked button:active:only-child,
toolbar .linked button:disabled:only-child {
    border-width: 1px;
    border-radius: 4px;
}

/* linked titlebar buttons */
headerbar button.raised.linked,
headerbar .raised.linked button,
headerbar .linked button {
    box-shadow: inset -1px 0 shade(@titlebar_bg_color, 0.9);
}

headerbar button.raised.linked:active,
headerbar .raised.linked button:active,
headerbar .linked button:active {
    box-shadow: inset -1px 0 shade(@titlebar_bg_color, 0.9),
                inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset 0 -1px alpha(@dark_shadow, 0.05);
}

headerbar button.raised.linked:disabled,
headerbar .raised.linked button:disabled,
headerbar .linked button:disabled {
    box-shadow: inset -1px 0 shade(@titlebar_bg_color, 0.85);
}

/* remove box shadow from last-child and only-child */
headerbar button.raised.linked:last-child,
headerbar button.raised.linked:only-child,
headerbar button:disabled.raised.linked:last-child,
headerbar button:disabled.raised.linked:only-child,
headerbar button:active *:disabled.raised.linked:last-child,
headerbar button:active *:disabled.raised.linked:only-child,
headerbar .raised.linked button:last-child,
headerbar .raised.linked button:only-child,
headerbar .raised.linked button:disabled:last-child,
headerbar .raised.linked button:disabled:only-child,
headerbar .raised.linked button:active *:disabled:last-child,
headerbar .raised.linked button:active *:disabled:only-child,
headerbar .linked button:last-child,
headerbar .linked button:only-child,
headerbar .linked button:disabled:last-child,
headerbar .linked button:disabled:only-child,
headerbar .linked button:active *:disabled:last-child,
headerbar .linked button:active *:disabled:only-child {
    box-shadow: none;
}

/* add back the inset shadow effect */
headerbar button:active.raised.linked:last-child,
headerbar button:active.raised.linked:only-child,
headerbar .raised.linked button:active:last-child,
headerbar .raised.linked button:active:only-child,
headerbar .linked button:active:last-child,
headerbar .linked button:active:only-child {
    box-shadow: inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset -1px 0 alpha(@dark_shadow, 0.07);
}

/* middle button */
headerbar button.raised.linked,
headerbar button.raised.linked:active,
headerbar button.raised.linked:disabled,
headerbar .raised.linked button,
headerbar .raised.linked button:active,
headerbar .raised.linked button:disabled,
headerbar .linked button,
headerbar .linked button:active,
headerbar .linked button:disabled {
    border-width: 1px;
    border-radius: 0;
    border-right-width: 0;
    border-left-width: 0;
}

/* leftmost button */
headerbar button.raised.linked:first-child,
headerbar button.raised.linked:active:first-child,
headerbar button.raised.linked:disabled:first-child,
headerbar .raised.linked button:first-child,
headerbar .raised.linked button:active:first-child,
headerbar .raised.linked button:disabled:first-child,
headerbar .linked button:first-child,
headerbar .linked button:active:first-child,
headerbar .linked button:disabled:first-child {
    border-width: 1px;
    border-radius: 4px;
    border-right-width: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* rightmost button */
headerbar button.raised.linked:last-child,
headerbar button.raised.linked:active:last-child,
headerbar button.raised.linked:disabled:last-child,
headerbar .raised.linked button:last-child,
headerbar .raised.linked button:active:last-child,
headerbar .raised.linked button:disabled:last-child,
headerbar .linked button:last-child,
headerbar .linked button:active:last-child,
headerbar .linked button:disabled:last-child {
    border-width: 1px;
    border-radius: 4px;
    border-left-width: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* linked single button */
headerbar button.raised.linked:only-child,
headerbar button.raised.linked:active:only-child,
headerbar button.raised.linked:disabled:only-child,
headerbar .raised.linked button:only-child,
headerbar .raised.linked button:active:only-child,
headerbar .raised.linked button:disabled:only-child,
headerbar .linked button:only-child,
headerbar .linked button:active:only-child,
headerbar .linked button:disabled:only-child {
    border-width: 1px;
    border-radius: 4px;
}

/***********
 * tooltip *
 ***********/
tooltip {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_tooltip_bg_color, 0.8);
    border-radius: 4px;
    background-color: @theme_tooltip_bg_color;
    background-image: none;
    color: @theme_tooltip_fg_color;
}

tooltip * {
    background-color: transparent;
    border-radius: 4px;
}

tooltip.csd decoration {
    border-radius: 4px;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.1);
}


/************
 * treeview *
 ************/
treeview {
    -treeview-vertical-separator: 0;
}

treeview.dnd {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_selected_bg_color;
    border-radius: 0;
}

treeview entry {
    padding: 0 6px;
    border-radius: 0;
    background-color: @theme_base_color;
    background-image: none;
}

/************
 * viewport *
 ************/
GtkViewport frame {
    border-width: 0;
}

.view {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

.view:disabled,
.view:disabled:disabled {
    background-color: shade(@theme_base_color, 0.9);
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

.view:selected,
.view:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/* backdrop state */
.view:selected:backdrop, iconview:selected:backdrop, .view:selected:backdrop, iconview:selected:backdrop {
    background-color: shade(@theme_bg_color, 0.8);
}

/**************
 * action-bar *
 **************/
.action-bar {
    padding: 4px;
    border-width: 1px 0 0 0;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    background-color: @theme_bg_color;
    background-image: none;
    color: @theme_fg_color;
}

.action-bar button.text-button {
    padding: 4px;
}

.action-bar button .image-button {
    padding: 6px;
}

.action-bar .title {
    font-weight: bold;
    padding: 0 12px;
}

.action-bar .subtitle {
    font-size: smaller;
    padding: 0 12px;
}

/***************
 * search bars *
 ***************/
.search-bar {
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.98);
}

.search-bar button.close-button {
    padding: 4px;
}

/********************
 * various choosers *
 ********************/
fontbutton separator,
filechooser button separator {
    /* always disable separators */
    -GtkWidget-horizontal-separator: 0;
    -GtkWidget-vertical-separator: 0;
}

fontbutton label:last-child {
    color: alpha(currentColor, 0.7);
}

filechooser button image:last-child {
    color: alpha(currentColor, 0.7);
}

/*********************
 * app notifications *
 *********************/
.app-notification {
    border-style: solid;
    border-color: shade(@theme_base_color, 0.8);
    border-width: 0 1px 1px 1px;
    border-radius: 0 0 2px 2px;
    padding: 8px;
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_text_color;
}

/*******
 * osd *
 *******/
.background.osd {
    color: @osd_fg;
    background-color: @osd_bg;
}

GtkOverlay.osd {
    background-color: transparent;
}

.osd frame {
    background-clip: border-box;
    background-origin: border-box;
}

.app-notification border {
    border: none;
}

.osd button,
.osd button {
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@osd_bg, 0.8);
    border-radius: 4px;
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
    color: @osd_fg;
}

.osd button:hover,
.osd button:hover,
.osd button:hover {
    border-color: shade(@osd_bg, 0.7);
    background-color: shade(@osd_bg, 1.10);
    background-image: none;
}

.osd button:active,
.osd button:active,
.osd GtkMenuButton button:active {
    border-color: shade(@osd_bg, 0.8);
    background-color: shade(@osd_bg, 0.95);
    background-image: none;
}

.osd button:active:hover,
.osd button:active:hover,
.osd GtkMenuButton button:active:hover {
    border-color: shade(@osd_bg, 0.7);
}

.osd button:disabled,
.osd button:disabled {
    border-color: shade(@osd_bg, 0.85);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd button:active *:disabled,
.osd button:active *:disabled {
    background-color: shade(@osd_bg, 0.80);
    background-image: none;
}

.osd toolbar {
    -GtkToolbar-button-relief: normal;

    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    border-color: shade(@osd_bg, 0.8);
    background-color: @osd_bg;
    background-image: none;
    color: @osd_fg;
}

.osd toolbar button {
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@osd_bg, 0.8);
    border-radius: 4px;
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
    color: @osd_fg;
}

.osd toolbar button:hover {
    border-color: shade(@osd_bg, 0.7);
    background-color: shade(@osd_bg, 1.10);
    background-image: none;
}

.osd toolbar button:active {
    border-color: shade(@osd_bg, 0.8);
    background-color: shade(@osd_bg, 0.95);
    background-image: none;
}

.osd toolbar button:active:hover {
    border-color: shade(@osd_bg, 0.7);
}

.osd toolbar button:focus,
.osd toolbar button:hover:focus,
.osd toolbar button:active:focus,
.osd toolbar button:active:hover:focus {
    border-color: shade(@osd_bg, 0.7);
}

.osd toolbar button:disabled {
    border-color: shade(@osd_bg, 0.85);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd toolbar button:active *:disabled {
    border-color: shade(@osd_bg, 0.75);
    background-color: shade(@osd_bg, 0.80);
    background-image: none;
}

.osd toolbar button:first-child {
    border-radius: 4px 0 0 2px;
    border-width: 1px 0 1px 1px;
    box-shadow: inset -1px 0 shade(@osd_bg, 0.9);
}

.osd toolbar button:last-child {
    box-shadow: none;
    border-radius: 0 2px 2px 0;
    border-width: 1px 1px 1px 0;
}

.osd toolbar button:only-child,
.osd toolbar toolbutton button,
.osd toolbar toolbutton:only-child button,
.osd toolbar toolbutton:last-child button,
.osd toolbar toolbutton:first-child button {
    border-width: 1px;
    border-radius: 4px;
    border-style: solid;
}

.osd toolbar separator {
    color: shade(@osd_bg, 0.9);
}

/* used by gnome-settings-daemon's media-keys OSD */
.osd trough {
    background-color: shade(@osd_bg, 0.8);
}

.osdprogress {
    background-color: @osd_fg;
}

.osd scale slider {
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
    /* we will draw the border using box shadow for now */
    box-shadow: inset 1px 0 shade(@osd_bg, 0.8),
                inset 0 1px shade(@osd_bg, 0.8),
                inset -1px 0 shade(@osd_bg, 0.8),
                inset 0 -1px shade(@osd_bg, 0.8);
}

.osd scale slider:hover {
    box-shadow: inset 1px 0 shade(@osd_bg, 0.7),
                inset 0 1px shade(@osd_bg, 0.7),
                inset -1px 0 shade(@osd_bg, 0.7),
                inset 0 -1px shade(@osd_bg, 0.7);
}

.osd scale slider:disabled {
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
    box-shadow: inset 1px 0 shade(@osd_bg, 0.85),
                inset 0 1px shade(@osd_bg, 0.85),
                inset -1px 0 shade(@osd_bg, 0.85),
                inset 0 -1px shade(@osd_bg, 0.85);
}

.osd scale trough {
    border-color: shade(@osd_bg, 0.8);
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
}

.osd scale trough highlight {
    border-color: @theme_selected_bg_color;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

.osd scale trough:disabled,
.osd scale trough highlight:disabled {
    border-color: shade(@osd_bg, 0.85);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd progressbar,
progressbar.osd {
    -progressbar-xspacing: 0;
    -progressbar-yspacing: 2px;
    -progressbar-min-horizontal-bar-height: 2px;

    padding: 0;
}

.osd progressbar trough,
progressbar.osd trough {
    padding: 0;
    border-style: none;
    border-radius: 0;
    background-image: none;
    background-color: transparent;
}

.osd progressbarprogress,
progressbar.osdprogress {
    border-style: none;
    border-radius: 0;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

.osd view,
.osd.view {
    background-color: @osd_base;
}

.osd .scrollbar trough {
    background-color: @osd_bg;
}

.osd .scrollbar slider {
    border-width: 0px;
    border-color: mix(shade(@osd_base, 0.87), @osd_fg, 0.21);
    border-radius: 6px;
    background-color: mix(@osd_base, @osd_fg, 0.21);
}

.osd .scrollbar slider:hover {
    border-color: mix(shade(@osd_base, 0.87), @osd_fg, 0.31);
    background-color: mix(@osd_base, @osd_fg, 0.31);
}

.osd .scrollbar slider:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
}

.osd view.cell:selected,
.osd view.cell:selected:focus {
    background-color: transparent;
    border-style: solid;
    border-radius: 4px;
    border-width: 3px;
    border-color: @osd_fg;
    outline-color: transparent;
}

/* used by Documents */
.osd .page-thumbnail {
    border-style: solid;
    border-width: 1px;
    border-color: shade(@osd_bg, 0.9);
    /* when there's no pixbuf yet */
    background-color: @osd_bg;
}

/******************************
 * destructive action buttons *
 ******************************/
.destructive-action button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@error_color, 0.8);
    border-radius: 4px;
    background-color: @error_color;
    background-image: none;
    color: mix(@theme_selected_fg_color, @error_color, 0.1);
}

.destructive-action button:hover {
    border-color: shade(@error_color, 0.7);
    background-color: shade(@error_color, 1.12);
    background-image: none;
}

.destructive-action button:active {
    border-color: shade(@error_color, 0.8);
    background-color: shade(@error_color, 0.87);
    background-image: none;
}

.destructive-action button:hover:active {
    border-color: shade(@error_color, 0.7);
}

/******************************
 * suggested action buttons *
 ******************************/
.suggested-action button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 4px;
    background-color: shade(@theme_selected_bg_color, 1.18);
    background-image: none;
    color: mix(@theme_selected_fg_color, @theme_selected_bg_color, 0.1);
}

.suggested-action button:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-color: shade(@theme_selected_bg_color, 1.20);
    background-image: none;
}

.suggested-action button:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: shade(@theme_selected_bg_color, 1.05);
    background-image: none;
}

.suggested-action button:hover:active {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

/******************
 * selection mode *
 ******************/
.selection-mode headerbar,
.selection-mode toolbar {
    border-style: solid;
    border-color: @theme_selected_bg_color;
    background-color: shade(@theme_selected_bg_color, 1.6);
    background-image: none;
    color: @theme_selected_bg_color;
}

.selection-mode headerbar {
    border-top-color: shade(@theme_selected_bg_color, 1.6);
    border-bottom-color: @theme_selected_bg_color;
}

.selection-mode toolbar {
    padding: 4px;
}

/* regular button */
.selection-mode headerbar button,
.selection-mode toolbar button,
.selection-mode toolbar toolbutton button {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_selected_bg_color;
    border-radius: 4px;
    background-color: shade(@theme_selected_bg_color, 1.68);
    background-image: none;
    color: shade(@theme_selected_bg_color, 0.8);
}

.selection-mode headerbar button:hover,
.selection-mode toolbar button:hover,
.selection-mode toolbar toolbutton button:hover {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: shade(@theme_selected_bg_color, 1.70);
    background-image: none;
}

.selection-mode headerbar button:active,
.selection-mode toolbar button:active,
.selection-mode toolbar toolbutton button:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: shade(@theme_selected_bg_color, 1.55);
    background-image: none;
}

.selection-mode headerbar button:hover:active,
.selection-mode toolbar button:hover:active,
.selection-mode toolbar toolbutton button:hover:active {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

/* suggested button */
.selection-mode headerbar .suggested-action button,
.selection-mode toolbar .suggested-action button,
.selection-mode toolbar toolbutton.suggested-action button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 4px;
    background-color: shade(@theme_selected_bg_color, 1.18);
    background-image: none;
    color: mix(@theme_selected_fg_color, @theme_selected_bg_color, 0.1);
}

.selection-mode headerbar .suggested-action button:hover,
.selection-mode toolbar .suggested-action button:hover,
.selection-mode toolbar toolbutton.suggested-action button:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-color: shade(@theme_selected_bg_color, 1.20);
    background-image: none;
}

.selection-mode headerbar .suggested-action button:active,
.selection-mode toolbar .suggested-action button:active,
.selection-mode toolbar toolbutton.suggested-action:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: shade(@theme_selected_bg_color, 1.05);
    background-image: none;
}

.selection-mode headerbar .suggested-action button:hover:active,
.selection-mode toolbar .suggested-action button:hover:active,
.selection-mode toolbar toolbutton.suggested-action button:hover:active {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

/* menu button */
.selection-mode headerbar .selection-menu button,
.selection-mode toolbar .selection-menu button {
    border-style: none;
    background-color: transparent;
    background-image: none;
    color: shade(@theme_selected_bg_color, 0.8);
}

.selection-mode toolbar .dim-label,
.selection-mode toolbar .selection-menu button .dim-label {
    color: shade(@theme_selected_bg_color, 0.7);
}

.selection-mode headerbar .selection-menu button:hover,
.selection-mode toolbar .dim-label:hover,
.selection-mode toolbar .selection-menu button:hover,
.selection-mode toolbar .selection-menu button .dim-label:hover {
    color: shade(@theme_selected_bg_color, 0.7);
}

.selection-mode headerbar .selection-menu button:active,
.selection-mode toolbar .selection-menu button:active {
    color: shade(@theme_selected_bg_color, 0.8);
    box-shadow: none;
}

/*************************
 * touch text selections *
 *************************/
GtkBubbleWindow {
    border-radius: 4px;
    background-clip: border-box;
}

GtkBubbleWindow.osd.background {
    background-color: @osd_bg;
}

GtkBubbleWindow toolbar {
    background-color: transparent;
}

/******************
 * Stack switcher *
 ******************/
.stack-switcher button {
    min-height: 20px;
    min-width: 80px;
}

.stack-switcher button:checked,
.stack-switcher button:checked:hover {
    background-image: linear-gradient(to bottom,
                                      shade(@selected_bg_color, 1.2),
                                      shade(@selected_bg_color, 0.95)
                                      );
    color: @theme_selected_fg_color;
}

/*******
 * CSD *
 *******/
decoration {
    border-radius: 4px 4px 0 0;
    border-width: 0px;
    box-shadow: 0 3px 9px 1px rgba(0,0,0,0.3), 0 0 0 1px rgba(0, 0, 0, 0.23);
    margin: 10px;
}

decoration:backdrop {
    box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.18);
    transition: 200ms ease-out;
}

.maximized headerbar,
.maximized headerbar:backdrop,
.tiled .titlebar:not(headerbar),
.tiled .titlebar:backdrop:not(headerbar),
.maximized .titlebar:not(headerbar),
.maximized .titlebar:backdrop:not(headerbar) {
    border-radius: 0;
}

.popup decoration {
    box-shadow: none;
}

.ssd decoration {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.23);
}

.csd.popup decoration {
    border-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13);
}

/*tooltip.csd decoration {
    border-radius: 0;
    box-shadow: none;
}
 */
messagedialog.csd decoration {
    border-radius: 0;
    background-color: @theme_bg_color;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13);
}

.solid-csd decoration {
    margin: 0;
    padding: 4px;
    background-color: @bg_color;
    border: solid 1px shade(@bg_color, 0.8);
    border-radius: 0;
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.3), inset 0 1px rgba(20, 20, 20, 0.8);
}

.solid-csd decoration:backdrop {
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.3), inset 0 1px rgba(20, 20, 20, 0.8);
}

/* titlebutton */
.titlebar .titlebutton {
    padding: 1px;
    border-style: none;
    background: none;
    color: @theme_fg_color;
    -gtk-icon-shadow: none;
}

.titlebar .titlebutton:hover,
.titlebar .titlebutton:hover:focus {
    background: none;
    color: @theme_fg_color;
}

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

.titlebar .titlebutton:backdrop {
    background-image: none;
    color: @theme_unfocused_fg_color;
    -gtk-icon-shadow: none;
}

/* decoration for windows */
.titlebar,
.titlebar:not(headerbar) {
    border-radius: 4px 4px 0 0;
    background-color: transparent;
    background-image: linear-gradient(to bottom, shade(@titlebar_bg_color, 1.1), shade(@titlebar_bg_color, 0.85));
    color: mix(@titlebar_fg_color, @titlebar_bg_color, 0.1);
    text-shadow: none;
}

.titlebar:backdrop,
.titlebar:not(headerbar):backdrop {
    background-image: none;
    background-color: @theme_unfocused_bg_color;
    color: @theme_unfocused_fg_color;
    text-shadow: none;
}
    
/* CSD */
headerbar.default-decoration,
.csd headerbar.default-decoration, 
.default-decoration.titlebar:not(headerbar),
.csd .default-decoration.titlebar:not(headerbar) {
    min-height: 28px;
    padding: 0 3px;
    background-color: @toolbar_bg_color;
    background-image: image(@toolbar_bg_color);
    border-bottom-width: 0;
}

headerbar.default-decoration:backdrop,
.csd headerbar.default-decoration:backdrop,
.default-decoration.titlebar:backdrop:not(headerbar),
.csd .default-decoration.titlebar:backdrop:not(headerbar) {
    background-color: @theme_unfocused_bg_color;
    background-image: image(@theme_unfocused_bg_color);
}
