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

/* default */
* {
    engine: none;
    background-clip: padding-box;
    -GtkArrow-arrow-scaling: 0.55;
    -GtkButton-child-displacement-x: 0;
    -GtkButton-child-displacement-y: 0;
    -GtkButton-default-border: 0;
    -GtkButton-image-spacing: 0;
    -GtkButton-inner-border: 1;
    -GtkButton-interior-focus: true;
    -GtkCheckButton-indicator-size: 16;
    -GtkCheckMenuItem-indicator-size: 12;
    -GtkExpander-expander-size: 8;
    -GtkHTML-link-color: @link_color;
    -GtkIMHtml-hyperlink-color: @link_color;
    -GtkMenu-horizontal-padding: 0;
    -GtkMenu-vertical-padding: 0;
    -GtkNotebook-initial-gap: 0;
    -GtkPaned-handle-size: 7;
    -GtkProgressBar-min-horizontal-bar-height: 5;
    -GtkProgressBar-min-vertical-bar-width: 5;
    -GtkRange-slider-width: 9;
    -GtkRange-stepper-spacing: 0;
    -GtkRange-trough-border: 0;
    -GtkRange-trough-under-steppers: 1;
    -GtkScrollbar-has-backward-stepper: false;
    -GtkScrollbar-has-forward-stepper: false;
    -GtkScrollbar-min-slider-length: 30;
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 0;
    -GtkStatusbar-shadow-type: none;
    -GtkTextView-error-underline-color: @error_color;
    -GtkToolButton-icon-spacing: 6;
    -GtkToolItemGroup-expander-size: 8;
    -GtkTreeView-expander-size: 8;
    -GtkWidget-focus-line-width: 1;
    -GtkWidget-focus-padding: 2;
    -GtkWidget-link-color: @link_color;
    -GtkWidget-visited-link-color: @link_color;
    -GtkWindow-resize-grip-height: 0;
    -GtkWindow-resize-grip-width: 0;
    -WnckTasklist-fade-overlay-rect: 0;
    outline-color: alpha(@theme_selected_bg_color, 0.5);
    outline-style: solid;
    outline-offset: 0;
}

/********************************
 * fix gedit dark tab on ubuntu *
 ********************************/
GtkWindow {
    color: @fg_color;
    background-color: @bg_color;
}
GtkPaned {
    background-color: @bg_color;
}
GtkEventBox {
    background-color: @bg_color;
}

/***************
 * base states *
 ***************/
.background {
    background-color: @theme_bg_color;
    color: @text_color;
}

.background.client-decorated {
    background-color: transparent;
}

.background.window-content {
    background-color: @theme_bg_color;
}

GtkClutterOffscreen {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}

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

*:active {
    background-color: shade(@theme_bg_color, 0.95);
}

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

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

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

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

.gtkstyle-fallback:prelight {
    background-color: @theme_selected_bg_color;
    color: @theme_base_color;
}

.gtkstyle-fallback:active {
    background-color: @theme_selected_bg_color;
    color: @theme_base_color;
}

.gtkstyle-fallback:insensitive {
    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_base_color;
}


/******************
 * visual effects *
 ******************/
/* transitions */
.button {
    transition: background-color, color 100ms ease-in-out;
    font-weight: normal;
}

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

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



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

GtkAssistant .sidebar {
    padding: 4px;
    border-width: 0 1px 0 0;
    border-style: solid;
    border-image: linear-gradient(to top,
		transparent,
                transparent 5%,
		shade(@theme_bg_color, 0.95) 5%,
		shade(@theme_bg_color, 0.95) 95%,
                transparent 95%,
		transparent) 0 1 0 0/ 0 1px 0 0;
    border-radius: 0;
    background-color: @theme_bg_color;
    color: mix(@theme_fg_color, @theme_bg_color, 0.1);
}

/**********
 * button *
 **********/
.button {
    -GtkWidget-focus-padding: 1;
    -GtkWidget-focus-line-width: 0;
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 3px;
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_text_color;
}

.button:hover {
    color: shade(@theme_selected_bg_color, 0.8);
}

.button:active,
.button:active:focus {
    color: shade(@tooltip_fg_color, 1.0);
    background-color: shade(@theme_selected_bg_color, 1.0);
    box-shadow: none;
}
.button:checked,
.button:checked:focus {
    color: shade(@tooltip_fg_color, 1.0);
    background-color: shade(@theme_selected_bg_color, 1.0);
    box-shadow: none;
}
.button:active:hover,
.button:active:hover:focus {
    color: shade(@tooltip_fg_color, 1.0);
    background-color: shade(@theme_selected_bg_color, 1.0);
}
.button:checked:hover,
.button:checked:hover:focus,
.button:selected {
    color: shade(@tooltip_fg_color, 1.0);
    background-color: shade(@theme_selected_bg_color, 1.0);
}
.button:insensitive {
    background-color: shade(@theme_bg_color, 1.00);
    background-image: none;
    color: mix(@theme_text_color, @theme_base_color, 0.7);
}
.button *:insensitive {
    color: mix(@theme_text_color, @theme_base_color, 0.7);
}

.button:active:insensitive {

}
.image-button {
    background-color: @theme_bg_color;
}
.image-button:active,
.image-button:focus:active {
    background-color: @theme_selected_bg_color;
}
.image-button:checked,
.image-button:focus:checked {
    background-color: @theme_selected_bg_color;
}
/* default button */
.button.default,
.button.default:focus {
    border-color: transparent;
    background-color: @theme_selected_bg_color;
    color: @base_color;
}

.button.default:hover {
    border-color: transparent;
    background-color: shade(@theme_selected_bg_color, 1.05);
    color: shade(@base_color, 0.95);
}

.button.default:active,
.button.default:hover:active {
    border-color: transparent;
    background-color: mix(@button_default_active_color, white, 0.083);
    color: shade(@tooltip_fg_color, 1.0);
}
.button.default:checked,
.button.default:hover:checked {
    border-color: transparent;
    background-color: mix(@button_default_active_color, white, 0.083);
    color: shade(@tooltip_fg_color, 1.0);
}
.button.default *:insensitive {
    color: shade(@entry_border_color, 0.9);
}
.button.flat,
.button.flat:insensitive {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
}
GtkLinkButton.button {
    color: shade(@selected_bg_color, 0.9);
}
GtkLinkButton.button:focus,
GtkLinkButton.button:hover,
GtkLinkButton.button:active,
GtkLinkButton.button:focus:active,
GtkLinkButton.button:focus:hover {
    background-color: transparent;
    box-shadow: none;
    color: shade(@selected_bg_color, 1.0);
}
GtkLinkButton.button:checked,
GtkLinkButton.button:focus:checked {
    background-color: transparent;
    box-shadow: none;
    color: shade(@selected_bg_color, 1.0);
}
.notebook GtkLinkButton.button:focus,
.notebook GtkLinkButton.button:hover,
.notebook GtkLinkButton.button:active,
.notebook GtkLinkButton.button:focus:active,
.notebook GtkLinkButton.button:focus:hover {
    background-color: @base_color;
    color: shade(@selected_bg_color, 1.0);
}
.notebook GtkLinkButton.button:checked,
.notebook GtkLinkButton.button:focus:checked {
    background-color: @base_color;
    color: shade(@selected_bg_color, 1.0);
}
.primary-toolbar .button:active,
.header-bar .button:active,
.toolbar .button:active,
.floating-bar .button:active {
    background-color: @theme_selected_bg_color;
}
.primary-toolbar .button:checked,
.header-bar .button:checked,
.toolbar .button:checked,
.floating-bar .button:checked {
    background-color: @theme_selected_bg_color;
}
/****************
 * cell and row *
 ****************/
.cell {
    border-width: 0;
    border-radius: 5px;
}

.cell:selected,
.cell:selected:focus {
    background-color: shade(@theme_selected_bg_color,0.9);
    color: @base_color;
}

row:selected,
row:selected:hover,
row:selected:focus {
    border-width: 0;
    border-style: none;
    border-radius: 0;
    background-color: shade(@theme_selected_bg_color,0.9);
    background-image: none;
    color: @base_color;

    -GtkWidget-focus-padding: 1;
    -GtkWidget-focus-line-width: 0;
}

/*******************
 * check and radio *
 *******************/
.check,
.radio,
.check:insensitive,
.radio:insensitive {
    border-style: none;

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

/*****************
 * column-header *
 *****************/
column-header.button,
column-header.button:active,
column-header .button,
column-header .button:active {
    border-width: 0 1px 1px 0;
    border-radius: 0;
    border-image: linear-gradient(to top,
		shade(@theme_bg_color, 0.95) 1px,
		transparent 1px,
                transparent 15%,
		shade(@theme_bg_color, 0.95) 15%,
		shade(@theme_bg_color, 0.95) 85%,
                transparent 85%,
		transparent) 0 1 1 0/ 0 1px 1px 0;
    padding: 5px;
}
column-header.button:checked,
column-header .button:checked {
    border-width: 0 1px 1px 0;
    border-radius: 0;
    border-image: linear-gradient(to top,
		shade(@theme_bg_color, 0.95) 1px,
		transparent 1px,
                transparent 15%,
		shade(@theme_bg_color, 0.95) 15%,
		shade(@theme_bg_color, 0.95) 85%,
                transparent 85%,
		transparent) 0 1 1 0/ 0 1px 1px 0;
}

column-header:last-child.button,
column-header:last-child .button {
    border-image: linear-gradient(to top,
		shade(@theme_bg_color, 0.95) 1px,
		transparent 1px,
		transparent) 0 1 1 0/ 0 1px 1px 0;
}
column-header.button,
column-header .button,
column-header.button:focus,
column-header .button:focus {
    color: shade(@theme_text_color, 1.1);
}
column-header.button:active,
column-header .button:active,
column-header.button:checked,
column-header .button:checked,
column-header.button:hover,
column-header .button:hover,
column-header.button:hover:focus,
column-header .button:hover:focus,
column-header.button:active:hover:focus,
column-header .button:active:hover:focus,
column-header.button:selected,
column-header .button:selected,
column-header.button:selected:hover,
column-header .button:selected:hover,
column-header.button:active:hover,
column-header .button:active:hover,
column-header.button:checked:hover,
column-header .button:checked:hover,
column-header.button:checked:focus,
column-header .button:checked:focus,
column-header.button:active:focus,
column-header .button:active:focus,
column-header.button:checked:hover:focus,
column-header .button:checked:hover:focus {
    color: @theme_selected_bg_color;
    background-color: inherit;
    background-image: none;
}

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

.content-view.view:prelight {
    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:insensitive {
    background-color: @entry_border_color;
}

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

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

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

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

GtkIconView.content-view.check:prelight,
GtkIconView.content-view.check:insensitive,
GtkIconView.content-view.check:selected {
    background-color: transparent;
}

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

GtkDrawingArea:insensitive {
    background-color: @entry_border_color;
}

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

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

GtkCalendar:inconsistent {
    color: mix(@theme_fg_color, @theme_bg_color, 0.3);
}

GtkCalendar.view,
GtkCalendar.header,
GtkCalendar.button,
GtkCalendar.button:insensitive {
    color: @text_color;
    text-shadow: none;
    icon-shadow: none;
    border-width: 0;
    background-color: transparent;
    background-image: none;
    
}
GtkCalendar.button:hover {
    color: @theme_selected_bg_color;
    text-shadow: none;
    icon-shadow: none;
    border-width: 0;
    background-image: none;
}
.highlight,
GtkCalendar.highlight {
    border-width: 0;
    background-color: transparent;
    color: @theme_selected_bg_color;
}

/************
 * combobox *
 ************/
GtkComboBox .button:hover,
GtkComboBox .row:hover,
GtkComboBox .cell:hover{
    color: @theme_selected_bg_color;
}
.primary-toolbar GtkComboBox.combobox-entry .entry,
.primary-toolbar GtkComboBox.combobox-entry .entry:active,
.primary-toolbar GtkComboBox.combobox-entry .entry:insensitive,
GtkComboBox.combobox-entry .entry,
GtkComboBox.combobox-entry .entry:active,
GtkComboBox.combobox-entry .entry:insensitive {
    border-radius: 2px;
    border-width: 3px 0 3px 3px;
    border-color: transparent;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.primary-toolbar GtkComboBox.combobox-entry .button,
.primary-toolbar GtkComboBox.combobox-entry .button:hover,
.primary-toolbar GtkComboBox.combobox-entry .button:active,
.primary-toolbar GtkComboBox.combobox-entry .button:insensitive,
GtkComboBox.combobox-entry .button,
GtkComboBox.combobox-entry .button:hover,
GtkComboBox.combobox-entry .button:active,
GtkComboBox.combobox-entry .button:insensitive {
    border-style: solid;
    border-color: transparent;
    border-radius: 2px;
    border-width: 3px 3px 3px 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    background-color: @theme_base_color;
    background-image: none;
}
.primary-toolbar GtkComboBox.combobox-entry:hover,
.primary-toolbar GtkComboBox.combobox-entry:active,
.primary-toolbar GtkComboBox.combobox-entry .button:active,
.primary-toolbar GtkComboBox.combobox-entry .button:hover,
GtkComboBox.combobox-entry:active,
GtkComboBox.combobox-entry:hover,
GtkComboBox.combobox-entry .button:hover,
GtkComboBox.combobox-entry .button:active {
    color: @theme_selected_bg_color;
}
.primary-toolbar GtkComboBox.combobox-entry:checked,
.primary-toolbar GtkComboBox.combobox-entry .button:checked,
GtkComboBox.combobox-entry:checked,
GtkComboBox.combobox-entry .button:checked {
    color: @theme_selected_bg_color;
}
.primary-toolbar GtkComboBox.combobox-entry .entry:focus,
GtkComboBox.combobox-entry .entry:focus,
.primary-toolbar GtkComboBox.combobox-entry .button:focus,
GtkComboBox.combobox-entry .button:focus {
}

.primary-toolbar GtkComboBox.combobox-entry .button:insensitive,
GtkComboBox.combobox-entry .button:insensitive {
    background-color: shade(@theme_bg_color, 0.95);
    color: mix(@theme_text_color, @theme_base_color, 0.5);
}

.primary-toolbar GtkComboBox.combobox-entry .entry:active,
GtkComboBox.combobox-entry .entry:active {
    border-width: 3px 0 0 3px;  
}
.primary-toolbar GtkComboBox.combobox-entry .button:active,
GtkComboBox.combobox-entry .button:active {
    border-width: 3px 3px 0 0;
    box-shadow: none;
}

GtkComboBox.combobox-entry .arrow,
.primary-toolbar GtkComboBox.combobox-entry .arrow {
    color: shade(@theme_text_color, 1.2);
}
GtkComboBox .arrow:insensitive,
.primary-toolbar GtkComboBox .arrow:insensitive {
    color: alpha(@theme_fg_color, 0.5);
}
GtkComboBox .arrow,
.primary-toolbar GtkComboBox .arrow {
    color: shade(@theme_selected_fg_color, 0.8);
}
GtkComboBox .arrow:focus,
GtkComboBox .arrow:hover,
.primary-toolbar GtkComboBox .arrow:focus,
.primary-toolbar GtkComboBox .arrow:hover {
    color: shade(@theme_selected_fg_color, 1.0);
}

GtkComboBox .button {
    padding: 4px;
}

/*********
 * entry *
 *********/
.entry {
    padding: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 2px;
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_text_color;
    margin: 0;
}
.entry .button {
    border-width: 1px 1px 1px 0;
    margin: 0;
}
.entry:active,
.entry:focus {
    border-color: @theme_selected_bg_color;
}

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

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

.entry.progressbar {
    border-width: 0;
    border-radius: 2px;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

/************
 * expander *
 ************/
.expander {
    color: alpha(@theme_fg_color, 0.7);
}

.expander:hover {
    color: alpha(@theme_fg_color, 0.9);
}

/*********
 * frame *
 *********/

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

/*******************
 * scrolled window *
 *******************/
GtkScrolledWindow.frame {
    border-width: 4px 1px 1px 1px;
    border-style: solid;
    border-color: @theme_selected_bg_color;
    border-bottom-color: @frame_border_color;
    border-right-color: @frame_border_color;
    border-left-color: @frame_border_color;
    border-radius: 2px;
}
GtkScrolledWindow.frame:insensitive {
    border-top-color: @bg_color;
}
/* avoid double borders when a viewport is 
 * packed into a GtkScrolledWindow */
GtkScrolledWindow GtkViewport.frame {
    border-style: none;
}


/************
 * iconview *
 ************/
GtkIconView.view.cell:selected,
GtkIconView.view.cell:selected:focus {
    border-width: 3px;
    border-style: solid;
    border-color: @theme_selected_bg_color;
    border-radius: 5px;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

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

/*********
 * image *
 *********/
GtkImage,
GtkImage:active,
GtkImage:insensitive {
    background-color: transparent;
}

/*********
 * label *
 *********/
GtkLabel,
GtkLabel:active,
GtkLabel:insensitive {
    background-color: transparent;
}

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

.info {
    border-width: 0;
    border-style: none;
    background-color: @info_bg_color;
    background-image: none;
    color: @info_fg_color;
}

.warning {
    border-width: 0;
    border-style: none;
    background-color: @warning_bg_color;
    background-image: none;
    color: @warning_fg_color;
}

.question {
    border-width: 0;
    border-style: none;
    background-color: @question_bg_color;
    background-image: none;
    color: @question_fg_color;
}

.error {
    border-width: 0;
    border-style: none;
    background-color: @error_bg_color;
    background-image: none;
    color: @error_fg_color;
}
.warning .button,
.question .button,
.info .button,
.error .button,
.warning .button.close,
.question .button.close,
.info .button.close,
.error .button.close {
    text-shadow: none;
    icon-shadow: none;
    padding: 6px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 5px;
    background-color: @button_info_color;
    background-image: none;
    color: @theme_selected_fg_color;
}
.warning .button.default,
.question .button.default,
.info .button.default,
.error .button.default {
    text-shadow: none;
    icon-shadow: none;
}
.warning .button:hover,
.question .button:hover,
.info .button:hover,
.error .button:hover,
.warning .button.close:hover,
.question .button.close:hover,
.info .button.close:hover,
.error .button.close:hover {
    text-shadow: none;
    icon-shadow: none;
    background-color: shade(@button_info_color, 1.06);
    background-image: none;
}
.warning .button:active,
.question .button:active,
.info .button:active,
.error .button:active,
.warning .button.close:active,
.question .button.close:active,
.info .button.close:active,
.error .button.close:active {
    background-color: shade(@button_info_color, 0.925);
    background-image: none;
    color: shade(@theme_selected_fg_color, 0.95);
}
.warning .button:insensitive,
.question .button:insensitive,
.info .button:insensitive,
.error .button:insensitive {
    background-color: shade(@button_info_color, 1.0);
}
.warning .button *:insensitive,
.question .button *:insensitive,
.info .button *:insensitive,
.error .button *:insensitive {
    color: shade(@entry_border_color, 0.8);
}
/*******************
 * symbolic images *
 *******************/
.image,
.view.image {
    color: alpha(@theme_fg_color, 0.5);
}

.image:hover,
.view.image:hover {
    color: @theme_fg_color;
}

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

/*****************
 * miscellaneous *
 *****************/
.floating-bar {
    border-width: 3px;
    border-style: solid;
    border-radius: 5px;
    border-color: @entry_border_color;
    background-color: @entry_border_color;
    background-image: none;
    color: @text_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,
.floating-bar .button:focus {
    -GtkButton-image-spacing: 0;
    -GtkButton-inner-border: 0;
    text-shadow: none;
    icon-shadow: none;
    border-style: none;
    background-color: transparent;
    background-image: none;
}

.view.dim-label,
.dim-label {
    color: alpha(currentColor, 0.6);
}

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

.grip {
    background-color: transparent;
}

.arrow {
    color: alpha(@theme_fg_color, 0.7);
}

/********
 * menu *
 ********/
GtkComboBox .menu {
    border-width: 0;
    background-color: @theme_base_color;
}
GtkMenuToolButton.menu {
    background-color: @theme_base_color;
}
*.menuitem* {
    font-weight: normal;
    text-shadow: none;
    icon-shadow: none;
}
.primary-toolbar .menu,
.primary-toolbar .button .menu,
.toolbar .menu,
.toolbar .primary-toolbar .menu,
.header-bar .menu,
.header-bar .primary-toolbar .menu,
.menubar .menu,
.menu {
    text-shadow: none;
    icon-shadow: none;
    padding: 0;
    border-radius: 0;
    border-width: 0 1px 1px 1px;
    border-style: solid;
    background-color: @theme_base_color;
    border-color: @entry_border_color;
}
.menu {
    border-width: 1px;
}
.menu:selected {
    background-color: @selected_bg_color;
}
.menu.button:hover,
.menu.button:checked,
.menu.button:checked:insensitive,
.menu.button:insensitive,
.menu.button {
}
.menu.button:insensitive {
    color: @base_color;
}
GtkComboBox .menu.button:hover,
GtkComboBox .menu.button:active,
GtkComboBox .menu.button:insensitive,
GtkComboBox .menu.button {
}
GtkComboBox .menu.button:insensitive {
    color: @base_color;
}
.context-menu {
    font: initial;
}

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

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

    border-style: none;
    background-color: @theme_bg_color;
    background-image: none;
    color: @theme_fg_color;
}

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

.menubar.menuitem,
.menubar .menuitem {
    padding: 3px 5px;
    border-width: 2px 0 0 0;
    border-style: solid;
    border-color: transparent;
    border-radius: 2px 2px 0 0;
    background-color: transparent;
    background-image: none;
    color: @text_color2;
}

.menubar.menuitem:hover,
.menubar .menuitem:hover,
.menubar .menuitem *:hover {
    border-width: 2px 0 0 0;
    border-style: solid;
    border-top-color: @theme_selected_bg_color;
    background-image: none;
    background-color: @theme_base_color;
    color: @theme_text_color;
}
/************
 * menuitem *
 ************/
GtkTreeMenu .menuitem {
    padding: 0;
    border-width: 0;
}

.menuitem,
.menu .menuitem {
    padding: 4px;
    border-width: 0;
    border-style: none;
    border-radius: 0;
    background-color: transparent;
    background-image: none;
    color: @theme_text_color;
    -GtkMenuItem-arrow-scaling: 0.52;
}

GtkComboBox .menu .menuitem {
    background-color: @theme_base_color;
    background-image: none;
}

GtkComboBox .menu .menuitem:active,
GtkComboBox .menu .menuitem:hover,
GtkComboBox .menu .menuitem:selected,
GtkComboBox .menu .menuitem:active:hover {
    background-color: mix(@button_default_active_color, white, 0.07);
    color: @tooltip_fg_color;
}
GtkComboBox .menu .menuitem:checked,
GtkComboBox .menu .menuitem:checked:hover {
    background-color: mix(@button_default_active_color, white, 0.07);
    color: @tooltip_fg_color;
}
GtkComboBox .menu .menuitem:insensitive,
GtkComboBox .menu .menuitem *:insensitive {
    color: mix(@theme_text_color, @theme_base_color, 0.6);
}

GtkComboBox .button:insensitive {
    background-color: @theme_base_color;
    color: @theme_base_color;
}

.menu .menuitem:active,
.menu .menuitem:hover {
    background-color: @theme_selected_bg_color;
    background-image: none;
}

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

.menu .menuitem:insensitive,
.menu .menuitem *:insensitive {
    color: mix(@theme_text_color, @theme_base_color, 0.6);
}

.menuitem.check,
.menuitem.radio,
.menuitem.check:hover,
.menuitem.radio:hover,
.menuitem.check:insensitive,
.menuitem.radio:insensitive {
    border-style: none;
    background-color: transparent;
    background-image: none;
}

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

.menuitem.arrow {
    color: alpha(@theme_text_color, 0.6);
}

.menuitem GtkCalendar:inconsistent {
    color: mix(@theme_text_color, @theme_base_color, 0.4);
}

.menuitem GtkCalendar.button {
    text-shadow: none;
    icon-shadow: none;
    border-style: none;
    background-color: transparent;
    background-image: none;
}

.menuitem .entry {

}

.menuitem .entry:active,
.menuitem .entry:focus {

}

.menuitem .accelerator {
    color: @theme_text_color;
}

.menuitem .accelerator:hover {
    color: @theme_selected_fg_color;
}

.menuitem .accelerator:insensitive {
    color: mix(@theme_text_color, @theme_base_color, 0.55);
}

GtkModelMenuItem GtkBox GtkImage {
    padding-right: 4px;
}

/************
 * notebook *
 ************/
.notebook {
    padding: 0;
    border-width: 1px;
    border-style: solid;
    background-color: @theme_base_color;
    border-color: @entry_border_color;
    border-radius: 3px;
    background-image: none;
    background-clip: border-box;
}

.notebook GtkViewport {
    background-color: @theme_base_color;
    color: @theme_text_color;
}
.notebook GtkFrame {
    margin: 10px 10px 10px 0;
    padding: 10px 10px 10px 0;
}
.notebook.header {
    background-color: @theme_bg_color;
}
.notebook tab {
    padding: 5px;
    border-style: solid;
    border-radius: 3px;
    border-color: @entry_border_color;
    background-color: @tab_color;
    background-image: none;
}

.notebook tab:active,
.notebook tab:hover,
.notebook tab:active:hover {
    border-color: @entry_border_color;
    background-color: @theme_base_color;
    background-image: none;
}
.notebook tab GtkLabel {
    color: alpha(@text_color, 0.7);;
}
.notebook tab .prelight-page GtkLabel,
.notebook tab GtkLabel.prelight-page {
    color: @text_color;
}
.notebook tab .active-page GtkLabel,
.notebook tab GtkLabel.active-page {
    color: @text_color;
}
.notebook tab.top {
    border-width: 1px 1px 0 1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.notebook tab.top:active {
    border-width: 3px 1px 0 1px;
    border-top-color: @theme_selected_bg_color;
}
.notebook tab.top:active {
    border-width: 3px 1px 0 1px;
    border-top-color: @theme_selected_bg_color;
}

.notebook tab.right {
    border-width: 1px 1px 1px 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.notebook tab.right:active {
    border-width: 1px 3px 1px 0;
    border-right-color: @theme_selected_bg_color;
}

.notebook tab.bottom {
    border-width: 0 1px 1px 1px;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.notebook tab.bottom:active {
    border-width: 0 1px 3px 1px;
    border-bottom-color: @theme_selected_bg_color;
}

.notebook tab.left {
    border-width: 1px 0 1px 1px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.notebook tab.left:active {
    border-width: 1px 0 1px 3px;
    border-left-color: @theme_selected_bg_color;
}
.notebook tab .button {
    text-shadow: none;
    icon-shadow: none;
    background-color: transparent;
    color: @theme_text_color;
    box-shadow: none;
    border: none;
}

.notebook tab .button:active,
.notebook tab .button:active,
.notebook tab .button:checked,
.notebook tab .button:checked,
.notebook tab .button:hover,
.notebook tab .button:hover,
.notebook tab .button:hover:focus,
.notebook tab .button:hover:focus,
.notebook tab .button:active:hover:focus,
.notebook tab .button:active:hover:focus,
.notebook tab .button:selected,
.notebook tab .button:selected,
.notebook tab .button:selected:hover,
.notebook tab .button:selected:hover,
.notebook tab .button:active:hover,
.notebook tab .button:active:hover,
.notebook tab .button:checked:hover,
.notebook tab .button:checked:hover,
.notebook tab .button:checked:focus,
.notebook tab .button:checked:focus,
.notebook tab .button:active:focus,
.notebook tab .button:active:focus,
.notebook tab .button:checked:hover:focus,
.notebook tab .button:checked:hover:focus {
    color: shade(@close_color, 1.0);
    box-shadow: none;
    background-color: transparent;
}
.notebook .button {
    border: 1px solid shade(@bg_color, 1.0);
}
.notebook .button:hover {
    color: shade(@theme_selected_bg_color, 0.8);
}
.notebook .entry .button:hover {
    box-shadow: none;
    color: shade(@theme_selected_bg_color, 0.8);
}
.notebook .button:insensitive {
    box-shadow: none;
    border: none;
}
.notebook column-header,
.notebook column-header .button {
        box-shadow: none;
        border-width: 1px;
        border-image: linear-gradient(to top,
		shade(@theme_bg_color, 0.95) 1px,
		transparent 1px,
                transparent 15%,
		shade(@theme_bg_color, 0.95) 15%,
		shade(@theme_bg_color, 0.95) 85%,
                transparent 85%,
		transparent) 0 1 1 0/ 0 1px 1px 0;
    }
.notebook column-header:hover,
.notebook column-header .button:hover {
    box-shadow: none;
}
/******************
 * pane separator *
 ******************/
.pane-separator {
    background-color: transparent;
    color: transparent;
}

/*************************
 * progressbar and scale *
 *************************/
GtkProgressBar {
    -GtkProgressBar-min-horizontal-bar-height: 8;
    -GtkProgressBar-min-vertical-bar-width: 8;
    padding: 0;
    border-width: 0;
    border-radius: 3px;
}

.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focus {
    border-width: 0 0 4px 0;
    border-style: solid;
    border-color: @theme_selected_bg_color;
    background-image: none;
    border-radius: 0px;
}
.progressbar row:selected,
.progressbar row:selected:focus {

    border-color: @button_normal_color;
}

.progressbar,
.progressbar.vertical {
    border-width: 0;
    border-style: none;
    background-color: @green_widget;
    background-image: none;
}


.trough row,
.trough row:hover,
.trough row:selected,
.trough row:selected:focus {
    border-width: 0 0 4px 0;
    border-style: solid;
    border-color: @entry_border_color;
    background-image: none;
    border-radius: 0px;
}
.trough row:selected,
.trough row:selected:focus {
    border-color: @entry_border_color;

}
.trough,
.trough.vertical {
    background-color: @theme_base_color;
    background-image: none;
}

/* level bars as used for password quality or remaining power */
GtkLevelBar {
    -GtkLevelBar-min-block-width: 34;
    -GtkLevelBar-min-block-height: 2;
}

GtkLevelBar.vertical {
    -GtkLevelBar-min-block-width: 2;
    -GtkLevelBar-min-block-height: 34;
}
.level-bar {
}
.level-bar.trough {
    padding: 0;
    border-radius: 2px;
}

.level-bar.fill-block {
    border-width: 0;
    border-style: none;
    background-color: @theme_selected_bg_color;
}

.level-bar.indicator-continuous.fill-block {
    padding: 1px;
    border-radius: 2px;
}

.level-bar.indicator-discrete.fill-block.horizontal {
    margin: 0 1px;
}

.level-bar.indicator-discrete.fill-block.vertical {
    margin: 1px 0;
}

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

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

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

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

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

.level-bar.fill-block.level-high {
    background-image: linear-gradient(to bottom,
                                      shade(@success_color, 1.2),
                                      @success_color 75%,
                                      shade(@success_color, 0.95)
                                      );
}

.level-bar.fill-block.level-low {
    background-image: linear-gradient(to bottom,
                                      shade(@warning_color, 1.3),
                                      @warning_color 75%,
                                      shade(@warning_color, 0.9)
                                      );
}

.level-bar.fill-block.empty-fill-block {
    background-color: @entry_border_color;
    background-image: none;
}

.scale,
GtkScale {
    padding: 0;
    border-width: 0;
    border-radius: 3px;
    -GtkRange-slider-width: 20;
    -GtkRange-trough-border: 0;
    -GtkScale-slider-length: 20;
}

.scale.slider {
    border-radius: 11px;
    background-color: @selected_bg_color;
    background-image: none;
    border: 3px solid transparent;
}

.scale.slider:hover {
    padding: 1px;
    border: 2px solid transparent;
    background-color: shade(@selected_bg_color, 0.9)
}
.scale.slider:active,
.scale.slider:active:hover{
    padding: 1px;
    box-shadow: none;
    border-color: shade(@selected_bg_color, 0.9);
    background-color: shade(@selected_bg_color, 0.9)
}
.scale.slider:insensitive {
    background-color: shade(@bg_color, 0.90);
    background-image: none;
}

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

GtkScale.mark {
    color: mix(@text_color, @bg_color, 0.3);
}

.scale.trough {
    margin: 7px 0;
    border-radius: 2px;
    background-color: shade(@entry_border_color, 0.85);
    background-image: none;
}

.scale.trough.vertical {
    margin: 0 7px;
    border-radius: 3px;
    background-color: shade(@entry_border_color, 0.85);
    background-image: none;
}

.menuitem .scale.highlight.top,
.scale.highlight.top,
.menuitem .scale.highlight.bottom,
.scale.highlight.bottom,
.menuitem .scale.highlight.left,
.scale.highlight.left,
.menuitem .scale.highlight.right,
.scale.highlight.right {
    background-color: shade(@theme_selected_bg_color, 1.2);
    background-image: none;
}

.scale.trough:insensitive {
    background-color: shade(@bg_color, 0.96);
}

.menuitem .scale.highlight.top:insensitive,
.scale.highlight.top:insensitive,
.menuitem .scale.highlight.bottom:insensitive,
.scale.highlight.bottom:insensitive,
.menuitem .scale.highlight.left:insensitive,
.scale.highlight.left:insensitive,
.menuitem .scale.highlight.right:insensitive,
.scale.highlight.right:insensitive {
    background-color: shade(@bg_color, 0.9);
    background-image: none;
}

.menu .menuitem .scale.slider {
    background-color: shade(@green_widget,0.8);
    border: 2px solid transparent;
}
.menu .menuitem .scale.slider:hover {
    padding: 1px;
    border: 1px solid transparent;
    background-color: shade(@green_widget,0.8);
}
.menu .menuitem .scale.slider:active,
.menu .menuitem .scale.slider:active:hover{
    padding: 1px;
    box-shadow: none;
    border-color: shade(@green_widget,0.8);
    background-color: shade(@green_widget,0.8);
}
.menu .menuitem .scale.slider:insensitive {
    background-color: #f7f7f7;
    background-image: none;
}
.menu .menuitem .scale.highlight.top,
.menu .menuitem .scale.highlight.bottom,
.menu .menuitem .scale.highlight.left,
.menu .menuitem .scale.highlight.right {
    background-color: shade(@green_widget, 1.0);
    background-image: none;
}
.menu .menuitem .scale.trough {
    margin: 7px 0;
    border-radius: 2px;
    background-color: shade(@entry_border_color, 1.0);
    background-image: none;
}
/************
 * popovers *
 ************/
GtkPopover {
    margin: 10px;
    padding: 2px;
    border-radius: 2px;
    border-color: shade(@theme_bg_color, 0.8);
    border-width: 1px;
    border-style: solid;
    background-clip: border-box;
    background-color: @theme_base_color;
    color: @text_color;
    box-shadow: 0 2px 3px alpha(black, 0.5);
}

GtkPopover.background {
    background-image: none;
    background-color: @theme_base_color;
}

GtkPopover:backdrop {
    box-shadow: none;
}

GtkPopover.osd {
    box-shadow: 0 2px 7px 3px alpha(black, 0.5);
    background-color: @theme_base_color;
}

GtkPopover > .list,
GtkPopover > .view,
GtkPopover > .toolbar {
    background-image: none;
    background-color: transparent;
}

GtkPopover .list-row {
    color: @text_color;
}

GtkPopover .list-row:hover {
    background-image: none;
    background-color: @theme_selected_bg_color;
    color: @theme_selected_bg_color;
}

GtkPopover .frame {
    border: 1px solid mix(@menu_bg_color, @menu_fg_color, 0.12);
    border-radius: 2px;
}

GtkPopover .entry {
    border-color: mix(@menu_bg_color, @menu_fg_color, 0.12);
    background-color: @menu_bg_color;
    background-image: none;
    color: @text_color;
}

GtkPopover .entry:hover,
GtkPopover .entry:focus,
GtkPopover .entry:active  {
    border-color: mix(@menu_bg_color, @menu_fg_color, 0.21);
}

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

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

.menuitem.button {
    color: @theme_fg_color;
}

.menuitem.button,
.menuitem.button:active,
.menuitem.button:checked,
.menuitem.button:insensitive,
.menuitem.button:active:insensitive,
.menuitem.button:checked:insensitive {
    background-color: transparent;
    background-image: none;
    border: none;
    box-shadow: none;
    color: @text_color;
}

.menuitem.button:active:hover,
.menuitem.button:checked:hover,
.menuitem.button:hover,
.menuitem.button:selected {
    border: none;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @base_color;
}

GtkModelButton.button {
    color: @menu_fg_color;
}


GtkModelButton.button:focus,
GtkModelButton.button:active:focus,
GtkModelButton.button:checked:focus,
GtkModelButton.button:active,
GtkModelButton.button:checked,
GtkModelButton.button:insensitive:insensitive,
GtkModelButton.button:active:insensitive,
GtkModelButton.button:checked:insensitive,
GtkModelButton.button {
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    border-image: none;
    border-style: none;
    box-shadow: none;
}

GtkModelButton.button:backdrop,
GtkModelButton.button:hover:backdrop,
GtkModelButton.button:insensitive:backdrop,
GtkModelButton.button:active:insensitive:backdrop,
GtkModelButton.button:active:backdrop,
GtkModelButton.button:active:hover:backdrop,
GtkModelButton.button:active:selected:backdrop,
GtkModelButton.button:checked:insensitive:backdrop,
GtkModelButton.button:checked:backdrop,
GtkModelButton.button:checked:hover:backdrop,
GtkModelButton.button:checked:selected:backdrop {
    text-shadow: none;
    icon-shadow: none;
    color: @theme_selected_fg_color;
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    border-image: none;
    border-style: none;
    box-shadow: none;
}

GtkModelButton.button:active:hover,
GtkModelButton.button:checked:hover,
GtkModelButton.button:hover,
GtkModelButton.button:selected {
    background-image: none;
    background-color: @theme_selected_bg_color;
    color: @theme_base_color;
    text-shadow: none;
    border-width: 0;
    border-color: transparent;
    border-radius: 2px;
}

/*************
 * scrollbar *
 *************/
.scrollbar {
    border-width: 0;
    border-style: none;
    border-radius: 1px;
    padding: 0;
    background-color: @theme_selected_bg_color;
}

.scrollbars-junction,
.scrollbars-junction.frame,
.scrollbar.trough {
    border-width: 0;
    border-radius: 0;
    background-color: transparent;
    background-image: none;
}

.scrollbar.button,
.scrollbar.button:active,
.scrollbar.button:active:hover {
    text-shadow: none;
    icon-shadow: none;
    border-width: 0;
    border-radius: 1px;
    background-color: transparent;
    background-image: none;
    color: shade(@theme_bg_color, 0.6);
}

.scrollbar.slider {
    border-color: transparent;
    border-style: solid;
    border-radius: 1px;
    background-color: alpha(@text_color2, 0.29);
}
.scrollbar.slider.vertical {
    border-width: 0 1px 0 1px; 
}
.scrollbar.slider.horizontal {
    border-width: 1px 0 1px 0; 
}
.scrollbar.slider:hover,
.scrollbar.slider.vertical:hover {
    background-color: alpha(@text_color2, 0.33);
    border-width: 0;
}
.scrollbar.slider:active,
.scrollbar.slider.vertical:active {
    background-color: alpha(@text_color2, 0.4);
    border-width: 0;
}
.scrollbar.slider:insensitive,
.scrollbar.slider.vertical:insensitive {
    background-color: alpha(@text_color2, 0.1);
}
.scrollbar.trough,
.scrollbar.trough.vertical {
    border-width: 0;
    border-radius: 0;
    background-color: @base_color;
}
.scrollbar.trough:insensitive,
.scrollbar.trough.vertical:insensitive {
    background-color: @bg_color;
}
.scrollbar.slider.fine-tune:prelight:active {
      background-size: 50%;
      background-repeat: no-repeat;
      background-position: center;
}

/* overlay scrollbar */
OsThumb {
    background-color: @theme_bg_color;
    color: shade(@theme_bg_color, 0.6);
}

OsThumb:selected,
OsScrollbar:selected {
    background-color: @theme_selected_bg_color;
}

OsThumb:active,
OsScrollbar:active {
    background-color: @theme_selected_bg_color;
}

OsThumb:insensitive,
OsScrollbar:insensitive {
    background-color: shade(@theme_bg_color, 0.9);
}

/*************
 * separator *
 *************/
.sidebar.separator,
.sidebar.view.separator,
.sidebar .view.separator,
.view.separator,
.separator,
.sidebar.separator:hover,
.sidebar.view.separator:hover,
.sidebar .view.separator:hover,
.view.separator:hover,
.separator:hover {
    border-width: 1px;
    border-style: solid;
    border-color: @border_color;
    color: @border_color;
}
.separator:insensitive {
    border-color: @border_color;
    color: @border_color;
}
.button .separator,
.button.separator {
    border-width: 0;
    color: transparent;
}

.button .separator:insensitive,
.button.separator:insensitive {
    color: transparent;
    border-width: 0;
}

.primary-toolbar GtkSeparatorToolItem,
.primary-toolbar .separator,
.primary-toolbar .separator:insensitive,
.toolbar GtkSeparatorToolItem,
.toolbar .separator,
.toolbar .separator:insensitive
.header-bar GtkSeparatorToolItem,
.header-bar .separator,
.header-bar .separator:insensitive {
    -GtkWidget-window-dragging: true;
    border-color: @bg_color;
    color: @bg_color;
}

.primary-toolbar .button .separator,
.primary-toolbar .button.separator,
.toolbar .button .separator,
.toolbar .button.separator,
.header-bar .button .separator,
.header-bar .button.separator {
    border-color: transparent;
}

.primary-toolbar .button .separator:insensitive,
.primary-toolbar .button.separator:insensitive,
.toolbar .button .separator:insensitive,
.toolbar .button.separator:insensitive,
.header-bar .button .separator:insensitive,
.header-bar .button.separator:insensitive {
    border-color: transparent;
}

.menuitem.separator {
    -GtkMenuItem-horizontal-padding: 0;
    -GtkWidget-separator-height: 1;

    border-style: none;
    color: @entry_border_color;
}

GtkComboBox .separator {
    border-style: none;

    /* always disable separators */
    -GtkWidget-wide-separators: true;
    -GtkWidget-horizontal-separator: 0;
    -GtkWidget-vertical-separator: 0;
}

/***********
 * sidebar *
 ***********/
.sidebar,
.sidebar.view,
.sidebar .view,
.sidebar GtkScrolledWindow {
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 0;
    border-width: 1px;
    background-color: shade(@bg_color,1.05);
    color: @theme_text_color;
}
.sidebar .view row:hover,
.sidebar row:hover {
    color: shade(@selected_bg_color, 1.0);
}

.sidebar row:selected,
.sidebar row:selected:focus,
.sidebar row:selected:prelight,
.sidebar row:selected:hover,
.sidebar row:active:hover,
.sidebar .view row:selected,
.sidebar .view row:selected:hover,
.sidebar .view row:selected:focus,
.sidebar .view row:selected:prelight,
.sidebar .view row:active:hover {
    border-width: 0;
    background-color: shade(@theme_selected_bg_color,0.9);
    background-image: none;
    color: shade(@base_color, 1.0);
}
.sidebar .frame {
    border-width: 0;
}
.sidebar .radio,
.sidebar .radio:focus,
.sidebar .radio:selected {
	background-image: none;
	background-color: transparent;
}
.sidebar .scrollbar.trough,
.sidebar .scrollbar.trough.vertical {
    background-color: shade(@bg_color,1.05);
}

/**************
 * spinbutton *
 **************/
.spinbutton {
    border-left-style: none;
    border-right-style: none;
    border-top-style: none;
    border-bottom-style: solid;
    border-width: 2px;
    border-color: shade(@theme_bg_color,0.8);
    box-shadow: none;
    border-radius: 0;
}
.spinbutton:insensitive {
    border-bottom-style: none;
}
.spinbutton .button {
    text-shadow: none;
    icon-shadow: none;
    color: mix(@theme_text_color, @theme_base_color, 0.5);
    box-shadow: none;
    border-width: 0;
    border-radius: 2px;
    border-style: none;
    background-color: transparent;
    background-image: none;
    
}

.spinbutton .button:insensitive {
    color: mix(@theme_text_color, @theme_base_color, 0.55);
}

.spinbutton .button:active,
.spinbutton .button:hover {
    color: shade(@theme_selected_bg_color, 1.0);
}

.spinbutton .button:first-child {
}

.spinbutton .button:last-child {
}

.spinbutton .button:dir(rtl) {

}

.spinbutton.vertical .button {
    text-shadow: none;
    icon-shadow: none;
    border-width: 1px;
    border-style: solid;
    border-color: @entry_border_color;
    border-radius: 2px;
    background-color: @theme_base_color;
    color: mix(@theme_text_color, @theme_base_color, 0.5);
    background-image: none;
    
}

.spinbutton.vertical .button:hover {
    color: @theme_fg_color;
    background-image: none;
    background-color: @selected_bg_color;
}

.spinbutton.vertical .button:active {
    color: @theme_fg_color;
    background-image: none;
    background-color: @selected_bg_color;
}

.spinbutton.vertical .button:active:hover {

}

.spinbutton.vertical .button:focus,
.spinbutton.vertical .button:hover:focus,
.spinbutton.vertical .button:active:focus,
.spinbutton.vertical .button:active:hover:focus {

}

.spinbutton.vertical .button:insensitive {
    background-color: shade(@theme_bg_color,1.0);
    background-image: none;
    color: mix(@theme_text_color, @theme_base_color, 0.55);
    background-image: none;
}

.spinbutton.vertical .button:first-child {
    border-width: 1px 1px 0 1px;
    border-bottom-width: 0;
    border-radius: 2px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.spinbutton.vertical .button:last-child {
    border-width: 0 1px 1px 1px;
    border-top-width: 0;
    border-radius: 2px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.spinbutton.vertical.entry {
    border-width: 1px;
    border-style: solid;
    border-top-color: @theme_base_color;
    border-bottom-color: @theme_base_color;
    border-radius: 0;
}
.spinbutton.vertical.entry:insensitive {
    border-top-color: shade(@theme_bg_color, 0.95);
    border-bottom-color: shade(@theme_bg_color, 0.95);
}
.spinbutton.vertical.entry:active,
.spinbutton.vertical.entry:focus {
    border-color: @theme_selected_bg_color;
}

/***********
 * spinner *
 ***********/
@keyframes spin {
    to { -gtk-icon-transform: rotate(1turn); }
}

.spinner {
    -gtk-icon-source: -gtk-icontheme("process-working-symbolic");
    color: @selected_bg_color;
    opacity: 0;
}

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

.spinner:active:backdrop {
    color: @backdrop_fg_color;
}

.spinner:active:insensitive {
    opacity: 0.5;
}
.menu.spinner,
.menu .spinner,
.menu .spinner:hover,
.primary-toolbar .spinner {
    color: @theme_selected_bg_color;
    border: none;
    box-shadow: none;
}
/*************
 * statusbar *
 *************/
GtkStatusbar {
    padding: 4px;
    color: @theme_fg_color;
}

/**********
 * switch *
 **********/
GtkSwitch {
    padding: 0px;
    border-radius: 2px;
    font: bold condensed;
    outline-offset: -4px;
}

GtkSwitch.slider {
    border: 2px solid transparent;
    border-radius: 2px;
    background-color: @theme_base_color;
    background-image: none;
}

GtkSwitch.slider:insensitive {
    background-color: @theme_bg_color;
    background-image: none;
}

GtkSwitch.trough {
    border: none;
    background-color: @switch_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

GtkSwitch.trough:active {
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

GtkSwitch.trough:insensitive {
    background-color: shade(@switch_bg_color, 1.1);
    background-image: none;
    color: mix(@theme_selected_fg_color, @theme_fg_color, 0.5);
}

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

/*****************
 * color chooser *
 *****************/
GtkColorSwatch,
GtkColorSwatch:selected {
    border-width: 4px;
    border-style: solid;
    border-radius: 7px;
    border-color: @theme_bg_color;
    background-color: transparent;
    transition: all 200ms ease-out;
}

GtkColorSwatch:hover,
GtkColorSwatch:selected:hover {
    border-width: 0;
    border-radius: 5px;
    border-color: @theme_bg_color;
    transition: all 200ms ease-in;
}

GtkColorSwatch.color-dark:hover {
}

GtkColorSwatch.color-light:hover {
}

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

GtkColorSwatch.left,
GtkColorSwatch:first-child {

}

GtkColorSwatch.right,
GtkColorSwatch:last-child {

}

GtkColorSwatch:only-child {

}

GtkColorSwatch.top {

}

GtkColorSwatch.bottom {

}

GtkColorChooserWidget #add-color-button {
    border-color: @entry_border_color;
    border-width: 1px;
    border-style: solid;
    border-radius: 5px;
    background-color: @theme_base_color;
    color: mix(@theme_text_color, @theme_base_color, 0.6);
}

GtkColorChooserWidget #add-color-button:hover {
    border-color: @entry_border_color;
    border-width: 1px;
    border-style: solid;
    border-radius: 5px;
    background-color: @theme_base_color;
    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 GtkColorSwatch {
    border-width: 4px;
    border-style: solid;
    border-radius: 7px;
    border-color: @theme_bg_color;
    background-color: transparent;
    transition: all 200ms ease-out;
}

GtkColorEditor GtkColorSwatch.color-dark:hover,
GtkColorEditor GtkColorSwatch.color-light:hover {
    border-width: 0;
    border-radius: 5px;
    border-color: @theme_bg_color;
    transition: all 200ms ease-in;
}

GtkColorButton.button {
    padding: 6px;
}

/**************
 * header-bar *
 **************/

.header-bar {
    padding: 4px;
    border-width: 0;
    border-style: solid;
    border-color: @theme_bg_color;
    background-color: @theme_bg_color;
}

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

.header-bar .button.image-button {
    padding: 4px;
}

.header-bar .title {
    font: bold;
}

.header-bar .subtitle {
    font: smaller;
}

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

.toolbar .button {
    padding: 2px;
}

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

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

.toolbar:insensitive {
    background-color: @theme_bg_color;
}

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

/*******************
 * primary-toolbar *
 *******************/
.primary-toolbar,
.primary-toolbar .toolbar,
.primary-toolbar.toolbar {

}

.primary-toolbar GtkComboBox,
.primary-toolbar .button,
.primary-toolbar GtkComboBox:insensitive,
.primary-toolbar .button:insensitive {

}
.primary-toolbar GtkComboBox,
.primary-toolbar .button {

}
.toolbar GtkComboBox,
.toolbar .button,
.header-bar GtkComboBox,
.header-bar .button {

}
.primary-toolbar GtkComboBox:hover,
.primary-toolbar .button:hover {
    text-shadow: none;
    icon-shadow: none;
    background-image: none;
    color: @theme_selected_bg_color;

}
.primary-toolbar GtkComboBox:active,
.primary-toolbar .button:active,
.primary-toolbar GtkComboBox:active:hover,
.primary-toolbar .button:active:hover {
    background-color: @theme_selected_bg_color;
    color: @base_color;
}
.primary-toolbar GtkComboBox:checked,
.primary-toolbar .button:checked,
.primary-toolbar GtkComboBox:checked:hover,
.primary-toolbar .button:checked:hover {
    background-color: @theme_selected_bg_color;
    color: @base_color;
}
/*.primary-toolbar.toolbar GtkComboBox *{
    color: @theme_fg_color;

}
.primary-toolbar.toolbar GtkComboBox *:hover,
.primary-toolbar.toolbar GtkComboBox .menu * {
    color: @theme_selected_fg_color;

}*/


.primary-toolbar GtkComboBox .arrow:insensitive {
    color: mix(@theme_fg_color, @theme_bg_color, 0.6);
}

.primary-toolbar GtkComboBox .arrow {
    color: shade(@theme_fg_color, 1.2);
}
.primary-toolbar GtkComboBox .arrow:active,
.primary-toolbar GtkComboBox .arrow:hover {
    color: shade(@theme_selected_fg_color, 0.95);
}

.primary-toolbar GtkComboBox .menu .menuitem *{


}
.primary-toolbar GtkComboBox *:hover,
.primary-toolbar .button *:hover,
.toolbar .button *:hover,
.header-bar .button *:hover {

}
.primary-toolbar GtkComboBox *:active,
.primary-toolbar .button *:active,
.toolbar .button *:active,
.header-bar .button *:active,
.primary-toolbar GtkComboBox *:active:hover,
.primary-toolbar .button *:active:hover,
.toolbar .button *:active:hover,
.header-bar .button *:active:hover {
    color: @base_color;
}

.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,
.header-bar .button:focus,
.header-bar .button:hover:focus,
.header-bar .button:active:focus,
.header-bar .button:active:hover:focus {

}

.primary-toolbar .button:insensitive,
.toolbar .button:insensitive,
.header-bar .button:insensitive {

}

.primary-toolbar .button *:insensitive {
    color: shade(@entry_border_color, 0.8);
}

.primary-toolbar .entry,
.toolbar .entry,
.header-bar .entry {

}

.primary-toolbar .entry:active,
.primary-toolbar .entry:focus,
.toolbar .entry:active,
.toolbar .entry:focus,
.header-bar .entry:active,
.header-bar .entry:focus {

}

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

    padding: 2px;
    border-width: 0;
    border-style: none;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
}

.inline-toolbar.toolbar:last-child {

}

.inline-toolbar.toolbar .button {

}

.inline-toolbar.toolbar .button:hover {

}

.inline-toolbar.toolbar .button:active {
 
}

.inline-toolbar.toolbar .button:active:hover {

}

.inline-toolbar.toolbar .button:focus,
.inline-toolbar.toolbar .button:hover:focus,
.inline-toolbar.toolbar .button:active:focus,
.inline-toolbar.toolbar .button:active:hover:focus {

}

.inline-toolbar.toolbar .button *:insensitive,
.inline-toolbar.toolbar GtkToolButton .button:insensitive {

}

/******************
 * linked buttons *
 *****************/
/* set up shadows for visual separation */
.linked .button,
.inline-toolbar.toolbar .button,
.inline-toolbar.toolbar GtkToolButton .button,
.inline-toolbar.toolbar GtkToolButton > .button {
    text-shadow: none;
    icon-shadow: none;
    background-color: @button_normal_color;
    background-image: none;
    color: @theme_selected_fg_color;

}
.linked .button:hover,
.inline-toolbar.toolbar .button:hover,
.inline-toolbar.toolbar GtkToolButton .button:hover,
.inline-toolbar.toolbar GtkToolButton > .button:hover {
    text-shadow: none;
    icon-shadow: none;
    background-color: shade(@button_normal_color, 1.06);
    background-image: none;

}
.linked .button:active,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar GtkToolButton .button:active,
.inline-toolbar.toolbar GtkToolButton > .button:active {
    
    background-color: @theme_selected_bg_color;
    background-image: none;

}

.linked .button:insensitive,
.inline-toolbar.toolbar .button:insensitive,
.inline-toolbar.toolbar GtkToolButton .button:insensitive,
.inline-toolbar.toolbar GtkToolButton > .button:insensitive {
    
    background-color: shade(@button_normal_color, 1.0);
    background-image: none;
}

/* remove box shadow from last-child and only-child */
.linked .button:last-child,
.linked .button:only-child,
.linked .button:insensitive:last-child,
.linked .button:insensitive:only-child,
.linked .button:active *:insensitive:last-child,
.linked .button:active *:insensitive:only-child,
.inline-toolbar.toolbar .button:last-child,
.inline-toolbar.toolbar .button:only-child,
.inline-toolbar.toolbar .button:insensitive:last-child,
.inline-toolbar.toolbar .button:insensitive:only-child,
.inline-toolbar.toolbar .button:active *:insensitive:last-child,
.inline-toolbar.toolbar .button:active *:insensitive:only-child,
.inline-toolbar.toolbar GtkToolButton:last-child > .button,
.inline-toolbar.toolbar GtkToolButton:only-child > .button,
.inline-toolbar.toolbar GtkToolButton:last-child > .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:only-child > .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:last-child > .button:active *:insensitive,
.inline-toolbar.toolbar GtkToolButton:only-child > .button:active *:insensitive {
    
}

/* 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 GtkToolButton:last-child > .button:active,
.inline-toolbar.toolbar GtkToolButton:only-child > .button:active {
}

/* middle button */

.linked .button,
.linked .button:active,
.linked .button:active:hover,
.linked .button:insensitive,
.inline-toolbar.toolbar .button,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar .button:insensitive,
.inline-toolbar.toolbar GtkToolButton .button,
.inline-toolbar.toolbar GtkToolButton .button:active,
.inline-toolbar.toolbar GtkToolButton .button:insensitive {
    border-width: 1px;
    border-radius: 0;
    border-color: transparent;
    border-style: solid;
}

/*leftmost button */
.linked .entry:first-child,
.linked .button:first-child,
.linked .button:active:first-child,
.linked .button:active:hover:first-child,
.linked .button:insensitive:first-child,
GtkFileChooser .button:first-child,
GtkFileChooser .button:active:first-child,
GtkFileChooser .button:active:hover:first-child,
GtkFileChooser .button:insensitive:first-child,
.inline-toolbar.toolbar .button:first-child,
.inline-toolbar.toolbar .button:active:first-child,
.inline-toolbar.toolbar .button:insensitive:first-child,
.inline-toolbar.toolbar GtkToolButton:first-child .button,
.inline-toolbar.toolbar GtkToolButton:first-child .button:active,
.inline-toolbar.toolbar GtkToolButton:first-child .button:insensitive {
    border-radius: 3px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    padding: 4px;
}

/* rightmost button */
.linked .entry:last-child,
.linked .button:last-child,
.linked .button:active:last-child,
.linked .button:active:hover:last-child,
.linked .button:insensitive:last-child,
GtkFileChooser .button:last-child,
GtkFileChooser .button:active:last-child,
GtkFileChooser .button:active:hover:last-child,
GtkFileChooser .button:insensitive:last-child,
.inline-toolbar.toolbar .button:last-child,
.inline-toolbar.toolbar .button:active:last-child,
.inline-toolbar.toolbar .button:insensitive:last-child,
.inline-toolbar.toolbar GtkToolButton:last-child .button,
.inline-toolbar.toolbar GtkToolButton:last-child .button:active,
.inline-toolbar.toolbar GtkToolButton:last-child .button:insensitive {
    border-radius: 3px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    padding: 4px;
}

/* linked single button */
.linked .entry:only-child,
.linked .button:only-child,
.linked .button:active:only-child,
.linked .button:active:hover:only-child,
.linked .button:insensitive:only-child,
GtkFileChooser .button:only-child,
GtkFileChooser .button:active:only-child,
GtkFileChooser .button:active:hover:only-child,
GtkFileChooser .button:insensitive:only-child,
.inline-toolbar.toolbar .button:only-child,
.inline-toolbar.toolbar .button:active:only-child,
.inline-toolbar.toolbar .button:insensitive:only-child,
.inline-toolbar.toolbar GtkToolButton:only-child .button,
.inline-toolbar.toolbar GtkToolButton:only-child .button:active,
.inline-toolbar.toolbar GtkToolButton:only-child .button:insensitive {
    border-radius: 3px;
    padding: 4px;
}

/* linked button shadows (vertical) */
.linked.vertical .button,
.inline-toolbar.toolbar.vertical .button,
.inline-toolbar.toolbar.vertical GtkToolButton > .button {

}
.linked.vertical .button:hover,
.inline-toolbar.toolbar.vertical .button:hover,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:hover {

}
.linked.vertical .button:active,
.inline-toolbar.toolbar.vertical .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:active {

}

.linked.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:insensitive {

}

/* remove box shadow from last-child and only-child */
.linked.vertical .button:last-child,
.linked.vertical .button:only-child,
.linked.vertical .button:insensitive:last-child,
.linked.vertical .button:insensitive:only-child,
.linked.vertical .button:active *:insensitive:last-child,
.linked.vertical .button:active *:insensitive:only-child,
.inline-toolbar.toolbar.vertical .button:last-child,
.inline-toolbar.toolbar.vertical .button:only-child,
.inline-toolbar.toolbar.vertical .button:insensitive:last-child,
.inline-toolbar.toolbar.vertical .button:insensitive:only-child,
.inline-toolbar.toolbar.vertical .button:active *:insensitive:last-child,
.inline-toolbar.toolbar.vertical .button:active *:insensitive:only-child,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:active *:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:active *:insensitive {
    
}

/* 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 GtkToolButton:last-child > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:active {
    
}

/* middle button (vertical) */

.linked.vertical .button,
.linked.vertical .button:active,
.linked.vertical .button:active:hover,
.linked.vertical .button:insensitive {
    border-width: 1px;
    border-radius: 0;
    border-color: transparent;
    border-style: solid;
}

/* 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:insensitive:first-child {
    border-radius: 3px;
    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:insensitive:last-child {
    border-radius: 3px;
    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:insensitive:only-child {
    border-radius: 3px;
}
.linked .button .arrow,
.inline-toolbar.toolbar .button .arrow {
    color: @theme_selected_fg_color;
}
/* linked toolbar buttons */
.primary-toolbar .button.raised.linked,
.primary-toolbar .raised.linked .button,
.toolbar .button.raised.linked,
.toolbar .raised.linked .button,
.toolbar .linked .button,
.header-bar .button.raised.linked,
.header-bar .raised.linked .button,
.header-bar .linked .button {
    text-shadow: none;
    icon-shadow: none;
    background-color: @theme_bg_color;
    background-image: none;
}
.primary-toolbar .button.raised.linked.text-button,
.primary-toolbar .raised.linked .button.text-button,
.toolbar .button.raised.linked.text-button,
.toolbar .raised.linked .button.text-button,
.toolbar .linked .button.text-button,
.header-bar .button.raised.linked.text-button,
.header-bar .raised.linked .button.text-button,
.header-bar .linked .button.text-button {
    background-color: @theme_base_color;
}
.primary-toolbar .button.raised.linked:hover,
.primary-toolbar .raised.linked .button:hover,
.toolbar .button.raised.linked:hover,
.toolbar .raised.linked .button:hover,
.toolbar .linked .button:hover,
GtkFileChooser .button:hover,
GtkFileChooser .button:active:hover,
GtkFileChooser .button:checked:hover,
.header-bar .button.raised.linked:hover,
.header-bar .raised.linked .button:hover,
.header-bar .linked .button:hover {
    color: @theme_selected_bg_color;
    text-shadow: none;
    icon-shadow: none;
    background-image: none;
}
.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,
GtkFileChooser .button:active:hover,
GtkFileChooser .button:checked:hover,
.header-bar .button.raised.linked:active,
.header-bar .raised.linked .button:active,
.header-bar .linked .button:active {
    background-color: @selected_bg_color;
    background-image: none;
    color: @theme_base_color;
}
.primary-toolbar .button.raised.linked:checked,
.primary-toolbar .raised.linked .button:checked,
.toolbar .button.raised.linked:checked,
.toolbar .raised.linked .button:checked,
.toolbar .linked .button:checked,
GtkFileChooser .button:checked,
.header-bar .button.raised.linked:checked,
.header-bar .raised.linked .button:checked,
.header-bar .linked .button:checked {
    background-color: @selected_bg_color;
    background-image: none;
    color: @theme_base_color;
}
.primary-toolbar .button.raised.linked:insensitive,
.primary-toolbar .raised.linked .button:insensitive,
.toolbar .button.raised.linked:insensitive,
.toolbar .raised.linked .button:insensitive,
.toolbar .linked .button:insensitive,
GtkFileChooser .button:insensitive,
.header-bar .button.raised.linked:insensitive,
.header-bar .raised.linked .button:insensitive,
.header-bar .linked .button:insensitive {
	box-shadow: none; 
    background-color: @bg_color;
    background-image: 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:insensitive.raised.linked:last-child,
.primary-toolbar .button:insensitive.raised.linked:only-child,
.primary-toolbar .button:active *:insensitive.raised.linked:last-child,
.primary-toolbar .button:active *:insensitive.raised.linked:only-child,
.primary-toolbar .raised.linked .button:last-child,
.primary-toolbar .raised.linked .button:only-child,
.primary-toolbar .raised.linked .button:insensitive:last-child,
.primary-toolbar .raised.linked .button:insensitive:only-child,
.primary-toolbar .raised.linked .button:active *:insensitive:last-child,
.primary-toolbar .raised.linked .button:active *:insensitive:only-child,
.toolbar .button.raised.linked:last-child,
.toolbar .button.raised.linked:only-child,
.toolbar .button:insensitive.raised.linked:last-child,
.toolbar .button:insensitive.raised.linked:only-child,
.toolbar .button:active *:insensitive.raised.linked:last-child,
.toolbar .button:active *:insensitive.raised.linked:only-child,
.toolbar .raised.linked .button:last-child,
.toolbar .raised.linked .button:only-child,
.toolbar .raised.linked .button:insensitive:last-child,
.toolbar .raised.linked .button:insensitive:only-child,
.toolbar .raised.linked .button:active *:insensitive:last-child,
.toolbar .raised.linked .button:active *:insensitive:only-child,
.toolbar .linked .button:last-child,
.toolbar .linked .button:only-child,
.toolbar .linked .button:insensitive:last-child,
.toolbar .linked .button:insensitive:only-child,
.toolbar .linked .button:active *:insensitive:last-child,
.toolbar .linked .button:active *:insensitive:only-child,
.header-bar .button.raised.linked:last-child,
.header-bar .button.raised.linked:only-child,
.header-bar .button:insensitive.raised.linked:last-child,
.header-bar .button:insensitive.raised.linked:only-child,
.header-bar .button:active *:insensitive.raised.linked:last-child,
.header-bar .button:active *:insensitive.raised.linked:only-child,
.header-bar .raised.linked .button:last-child,
.header-bar .raised.linked .button:only-child,
.header-bar .raised.linked .button:insensitive:last-child,
.header-bar .raised.linked .button:insensitive:only-child,
.header-bar .raised.linked .button:active *:insensitive:last-child,
.header-bar .raised.linked .button:active *:insensitive:only-child,
.header-bar .linked .button:last-child,
.header-bar .linked .button:only-child,
.header-bar .linked .button:insensitive:last-child,
.header-bar .linked .button:insensitive:only-child,
.header-bar .linked .button:active *:insensitive:last-child,
.header-bar .linked .button:active *:insensitive:only-child {
    
}

/* 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,
.header-bar .button:active.raised.linked:last-child,
.header-bar .button:active.raised.linked:only-child,
.header-bar .raised.linked .button:active:last-child,
.header-bar .raised.linked .button:active:only-child,
.header-bar .linked .button:active:last-child,
.header-bar .linked .button:active:only-child {
    
}

/* middle button */
.primary-toolbar .button.raised.linked,
.primary-toolbar .button.raised.linked:active,
.primary-toolbar .button.raised.linked:insensitive,
.primary-toolbar .raised.linked .button,
.primary-toolbar .raised.linked .button:active,
.primary-toolbar .raised.linked .button:insensitive,
.toolbar .button.raised.linked,
.toolbar .button.raised.linked:active,
.toolbar .button.raised.linked:insensitive,
.toolbar .raised.linked .button,
.toolbar .raised.linked .button:active,
.toolbar .raised.linked .button:insensitive,
.toolbar .linked .button,
.toolbar .linked .button:active,
.toolbar .linked .button:insensitive,
.header-bar .button.raised.linked,
.header-bar .button.raised.linked:active,
.header-bar .button.raised.linked:insensitive,
.header-bar .raised.linked .button,
.header-bar .raised.linked .button:active,
.header-bar .raised.linked .button:insensitive,
.header-bar .linked .button,
.header-bar .linked .button:active,
.header-bar .linked .button:insensitive {
    border-width: 0;
    border-radius: 0;
    border-color: transparent;
    border-style: solid;
}

/* leftmost button */
.primary-toolbar .button.raised.linked:first-child,
.primary-toolbar .button.raised.linked:active:first-child,
.primary-toolbar .button.raised.linked:insensitive:first-child,
.primary-toolbar .raised.linked .button:first-child,
.primary-toolbar .raised.linked .button:active:first-child,
.primary-toolbar .raised.linked .button:insensitive:first-child,
.toolbar .button.raised.linked:first-child,
.toolbar .button.raised.linked:active:first-child,
.toolbar .button.raised.linked:insensitive:first-child,
.toolbar .raised.linked .button:first-child,
.toolbar .raised.linked .button:active:first-child,
.toolbar .raised.linked .button:insensitive:first-child,
.toolbar .linked .button:first-child,
.toolbar .linked .button:active:first-child,
.toolbar .linked .button:insensitive:first-child,
.header-bar .button.raised.linked:first-child,
.header-bar .button.raised.linked:active:first-child,
.header-bar .button.raised.linked:insensitive:first-child,
.header-bar .raised.linked .button:first-child,
.header-bar .raised.linked .button:active:first-child,
.header-bar .raised.linked .button:insensitive:first-child,
.header-bar .linked .button:first-child,
.header-bar .linked .button:active:first-child,
.header-bar .linked .button:insensitive:first-child {
    border-radius: 3px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.header-bar .path-bar .button {
    background-color: @base_color;
    padding: 5px;
}
.header-bar .path-bar .button:insensitive {
    background-color: @base_color;
}
.header-bar .path-bar .button .arrow {
    color: shade(@text_color, 0.8);
}
.header-bar .path-bar .button .arrow:hover,
.header-bar .path-bar .button .arrow:active,
.header-bar .path-bar .button .arrow:active:hover,
.header-bar .path-bar .button .arrow:checked {
    color: @selected_bg_color;
}
.header-bar .path-bar .button .arrow:insensitive {
    color: @bg_color;
}
.primary-toolbar .button.image-button.raised.linked:first-child,
.primary-toolbar .button.image-button.raised.linked:active:first-child,
.primary-toolbar .button.image-button.raised.linked:insensitive:first-child,
.primary-toolbar .raised.linked .button.image-button:first-child,
.primary-toolbar .raised.linked .button.image-button:active:first-child,
.primary-toolbar .raised.linked .button.image-button:insensitive:first-child,
.toolbar .button.image-button.raised.linked:first-child,
.toolbar .button.image-button.raised.linked:active:first-child,
.toolbar .button.image-button.raised.linked:insensitive:first-child,
.toolbar .raised.linked .button.image-button:first-child,
.toolbar .raised.linked .button.image-button:active:first-child,
.toolbar .raised.linked .button.image-button:insensitive:first-child,
.toolbar .linked .button.image-button:first-child,
.toolbar .linked .button.image-button:active:first-child,
.toolbar .linked .button.image-button:insensitive:first-child,
.header-bar .button.image-button.raised.linked:first-child,
.header-bar .button.image-button.raised.linked:active:first-child,
.header-bar .button.image-button.raised.linked:insensitive:first-child,
.header-bar .raised.image-button.linked .button:first-child,
.header-bar .raised.image-button.linked .button:active:first-child,
.header-bar .raised.image-button.linked .button:insensitive:first-child,
.header-bar .linked .button.image-button:first-child,
.header-bar .linked .button.image-button:active:first-child,
.header-bar .linked .button.image-button:insensitive:first-child {
    border-radius: 2px;
}

/* rightmost button */
.primary-toolbar .button.raised.linked:last-child,
.primary-toolbar .button.raised.linked:active:last-child,
.primary-toolbar .button.raised.linked:insensitive:last-child,
.primary-toolbar .raised.linked .button:last-child,
.primary-toolbar .raised.linked .button:active:last-child,
.primary-toolbar .raised.linked .button:insensitive:last-child,
.toolbar .button.raised.linked:last-child,
.toolbar .button.raised.linked:active:last-child,
.toolbar .button.raised.linked:insensitive:last-child,
.toolbar .raised.linked .button:last-child,
.toolbar .raised.linked .button:active:last-child,
.toolbar .raised.linked .button:insensitive:last-child,
.toolbar .linked .button:last-child,
.toolbar .linked .button:active:last-child,
.toolbar .linked .button:insensitive:last-child,
.header-bar .button.raised.linked:last-child,
.header-bar .button.raised.linked:active:last-child,
.header-bar .button.raised.linked:insensitive:last-child,
.header-bar .raised.linked .button:last-child,
.header-bar .raised.linked .button:active:last-child,
.header-bar .raised.linked .button:insensitive:last-child,
.header-bar .linked .button:last-child,
.header-bar .linked .button:active:last-child,
.header-bar .linked .button:insensitive:last-child {
    border-radius: 3px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.primary-toolbar .button.image-button.raised.linked:last-child,
.primary-toolbar .button.image-button.raised.linked:active:last-child,
.primary-toolbar .button.image-button.raised.linked:insensitive:last-child,
.primary-toolbar .raised.linked .button.image-button:last-child,
.primary-toolbar .raised.linked .button.image-button:active:last-child,
.primary-toolbar .raised.linked .button.image-button:insensitive:last-child,
.toolbar .button.image-button.raised.linked:last-child,
.toolbar .button.image-button.raised.linked:active:last-child,
.toolbar .button.image-button.raised.linked:insensitive:last-child,
.toolbar .raised.linked .button.image-button:last-child,
.toolbar .raised.linked .button.image-button:active:last-child,
.toolbar .raised.linked .button.image-button:insensitive:last-child,
.toolbar .linked .button.image-button:last-child,
.toolbar .linked .button.image-button:active:last-child,
.toolbar .linked .button.image-button:insensitive:last-child,
.header-bar .button.image-button.raised.linked:last-child,
.header-bar .button.image-button.raised.linked:active:last-child,
.header-bar .button.image-button.raised.linked:insensitive:last-child,
.header-bar .raised.image-button.linked .button:last-child,
.header-bar .raised.image-button.linked .button:active:last-child,
.header-bar .raised.image-button.linked .button:insensitive:last-child,
.header-bar .linked .button.image-button:last-child,
.header-bar .linked .button.image-button:active:last-child,
.header-bar .linked .button.image-button:insensitive:last-child {
    border-radius: 2px;
}
/* linked single button */
.primary-toolbar .button.raised.linked:only-child,
.primary-toolbar .button.raised.linked:active:only-child,
.primary-toolbar .button.raised.linked:insensitive:only-child,
.primary-toolbar .raised.linked .button:only-child,
.primary-toolbar .raised.linked .button:active:only-child,
.primary-toolbar .raised.linked .button:insensitive:only-child,
.toolbar .button.raised.linked:only-child,
.toolbar .button.raised.linked:active:only-child,
.toolbar .button.raised.linked:insensitive:only-child,
.toolbar .raised.linked .button:only-child,
.toolbar .raised.linked .button:active:only-child,
.toolbar .raised.linked .button:insensitive:only-child,
.toolbar .linked .button:only-child,
.toolbar .linked .button:active:only-child,
.toolbar .linked .button:insensitive:only-child,
.header-bar .button.raised.linked:only-child,
.header-bar .button.raised.linked:active:only-child,
.header-bar .button.raised.linked:insensitive:only-child,
.header-bar .raised.linked .button:only-child,
.header-bar .raised.linked .button:active:only-child,
.header-bar .raised.linked .button:insensitive:only-child,
.header-bar .linked .button:only-child,
.header-bar .linked .button:active:only-child,
.header-bar .linked .button:insensitive:only-child {
    border-radius: 3px;
}

.primary-toolbar .button.image-button.raised.linked:only-child,
.primary-toolbar .button.image-button.raised.linked:active:only-child,
.primary-toolbar .button.image-button.raised.linked:insensitive:only-child,
.primary-toolbar .raised.linked .button.image-button:only-child,
.primary-toolbar .raised.linked .button.image-button:active:only-child,
.primary-toolbar .raised.linked .button.image-button:insensitive:only-child,
.toolbar .button.image-button.raised.linked:only-child,
.toolbar .button.image-button.raised.linked:active:only-child,
.toolbar .button.image-button.raised.linked:insensitive:only-child,
.toolbar .raised.linked .button.image-button:only-child,
.toolbar .raised.linked .button.image-button:active:only-child,
.toolbar .raised.linked .button.image-button:insensitive:only-child,
.toolbar .linked .button.image-button:only-child,
.toolbar .linked .button.image-button:active:only-child,
.toolbar .linked .button.image-button:insensitive:only-child,
.header-bar .button.image-button.raised.linked:only-child,
.header-bar .button.image-button.raised.linked:active:only-child,
.header-bar .button.image-button.raised.linked:insensitive:only-child,
.header-bar .raised.image-button.linked .button:only-child,
.header-bar .raised.image-button.linked .button:active:only-child,
.header-bar .raised.image-button.linked .button:insensitive:only-child,
.header-bar .linked .button.image-button:only-child,
.header-bar .linked .button.image-button:active:only-child,
.header-bar .linked .button.image-button:insensitive:only-child {
    border-radius: 2px;
}

/***********
 * tooltip *
 ***********/
.tooltip {
    border-width: 0;
    border-style: none;
    border-radius: 5px;
    background-color: @theme_bg_color;
    background-image: none;
    color: @text_color;
}

.tooltip * {
    background-color: transparent;
}

/************
 * treeview *
 ************/
GtkTreeView {
    -GtkTreeView-vertical-separator: 0;
    -GtkWidget-focus-line-width: 1;
    -GtkWidget-focus-padding: 1;
}

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

GtkTreeView .entry {
    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:insensitive,
.view:insensitive:insensitive {
    background-color: @entry_border_color;
    color: mix(@theme_fg_color, @theme_bg_color, 0.6);
}

.view:selected,
.view:selected:hover,
.view:selected:focus {
    background-color: shade(@theme_selected_bg_color,0.9);
    color: @base_color;
}

/*********************
 * app notifications *
 *********************/
.app-notification {
    border-style: solid;
    border-color: @entry_border_color;
    border-width: 0 1px 1px 1px;
    border-radius: 0 0 5px 5px;
    padding: 8px;
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_text_color;
}


/*******
 * osd *
 *******/

.osd {
    border-radius: 3px;
}

.background.osd {
    border-style: none;
    border-width: 0;
    color: @osd_fg;
    background-color: @osd_bg;
}

GtkOverlay.osd {
    border-style: none;
    border-width: 0;
    background-color: transparent;
}

.osd.frame {
    border-style: none;
    border-width: 0;
    background-clip: border-box;
    background-origin: border-box;
}

.osd.button,
.osd .button {

}

.osd.button:prelight,
.osd.button:hover,
.osd .button:hover {

}

.osd.button:active,
.osd .button:active,
.osd GtkMenuButton.button:active {

}

.osd.button:active:hover,
.osd .button:active:hover,
.osd GtkMenuButton.button:active:hover {

}

.osd.button:insensitive,
.osd .button:insensitive {

}

.osd.button:active *:insensitive,
.osd .button:active *:insensitive {

}

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

    padding: 4px;
    border-width: 0;
    border-style: none;
    border-radius: 5px;
    background-color: @osd_bg;
    background-image: none;
    color: @osd_fg;
}

.osd.toolbar .button {

}

.osd.toolbar .button:hover {

}

.osd.toolbar .button:active {

}

.osd.toolbar .button:active:hover {

}

.osd.toolbar .button:focus,
.osd.toolbar .button:hover:focus,
.osd.toolbar .button:active:focus,
.osd.toolbar .button:active:hover:focus {

}

.osd.toolbar .button:insensitive {

}

.osd.toolbar .button:active *:insensitive {

}

.osd.toolbar .button:first-child {

}

.osd.toolbar .button:last-child {

}

.osd.toolbar .button:only-child,
.osd.toolbar GtkToolButton .button,
.osd.toolbar GtkToolButton:only-child .button,
.osd.toolbar GtkToolButton:last-child .button,
.osd.toolbar GtkToolButton:first-child .button {

}

.osd.toolbar .separator {
    color: @osd_separator;
}

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

.osd.progressbar {
    background-color: @theme_selected_bg_color;
}

.osd .scale.slider {
    border-radius: 8px;
    background-color: @button_normal_color;
    background-image: none;
}

.osd .scale.slider:hover {
    background-color: shade(@button_normal_color, 1.06);
}

.osd .scale.slider:insensitive {
    background-color: shade(@osd_bg, 1.1);
    background-image: none;
}

.osd .scale.trough {
    border-radius: 3px;
    background-color: shade(@osd_bg, 1.05);
    background-image: none;
}

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

.osd .scale.trough:insensitive,
.osd .scale.trough.highlight:insensitive {
    background-color: shade(@osd_bg, 1.05);
    background-image: none;
}

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

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

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

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

.osd .scrollbar.trough {
    background-color: shade(@osd_bg, 1.05);
}

.osd .scrollbar.slider {
    border-radius: 5px;
    background-color: @button_normal_color;
}

.osd .scrollbar.slider:hover {
    background-color: shade(@button_normal_color, 1.1);
}

.osd .scrollbar.slider:active {
    background-color: @theme_selected_bg_color;
}

.osd GtkIconView.cell:selected,
.osd GtkIconView.cell:selected:focus {
    background-color: @theme_selected_bg_color;
    border-style: solid;
    border-radius: 5px;
    border-width: 0;
    outline-color: transparent;
}

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

/******************************
 * destructive action buttons *
 ******************************/
.destructive-action.button {
    text-shadow: none;
    icon-shadow: none;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 5px;
    background-color: @error_color;
    background-image: none;
    color: mix(@theme_selected_fg_color, @error_color, 0.1);
}

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

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

.destructive-action.button:hover:active {

}

/******************
 * selection mode *
 ******************/
.selection-mode.header-bar,
.selection-mode.toolbar {
    border-width: 0;
    border-style: none;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @base_color;
}

.selection-mode.header-bar {

}

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

/* regular button */
.selection-mode.header-bar .button,
.selection-mode.toolbar .button,
.selection-mode.toolbar GtkToolButton .button {
    text-shadow: none;
    icon-shadow: none;
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 3px;
    background-color: @button_info_color;
    background-image: none;
    color: @text_color;
}

.selection-mode.header-bar .button:hover,
.selection-mode.toolbar .button:hover,
.selection-mode.toolbar GtkToolButton .button:hover {
    text-shadow: none;
    icon-shadow: none;
    background-color: shade(@button_info_color, 1.06);
    background-image: none;
}

.selection-mode.header-bar .button:active,
.selection-mode.toolbar .button:active,
.selection-mode.toolbar GtkToolButton .button:active {
    background-color: shade(@button_info_color, 0.925);
    background-image: none;
    color: shade(@theme_selected_fg_color, 0.95);
}

.selection-mode.header-bar .button:hover:active,
.selection-mode.toolbar .button:hover:active,
.selection-mode.toolbar GtkToolButton .button:hover:active {

}

/* suggested button */
.selection-mode.header-bar .suggested-action.button,
.selection-mode.toolbar .suggested-action.button,
.selection-mode.toolbar GtkToolButton.suggested-action .button {
    text-shadow: none;
    icon-shadow: none;
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 3px;
    background-color: @button_info_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

.selection-mode.header-bar .suggested-action.button:hover,
.selection-mode.toolbar .suggested-action.button:hover,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover {
    text-shadow: none;
    icon-shadow: none;
    background-color: shade(@button_info_color, 1.06);
    background-image: none;
}

.selection-mode.header-bar .suggested-action.button:active,
.selection-mode.toolbar .suggested-action.button:active,
.selection-mode.toolbar GtkToolButton.suggested-action:active {
    background-color: shade(@button_info_color, 0.925);
    background-image: none;
    color: shade(@theme_selected_fg_color, 0.95);
}

.selection-mode.header-bar .suggested-action.button:hover:active,
.selection-mode.toolbar .suggested-action.button:hover:active,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover:active {

}

/* menu button */
.selection-mode.header-bar .selection-menu.button,
.selection-mode.toolbar .selection-menu.button {
    text-shadow: none;
    icon-shadow: none;
    border-style: none;
    background-color: transparent;
    background-image: none;
    color: shade(@theme_selected_bg_color, 0.7);
}

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

.selection-mode.header-bar .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: @theme_selected_fg_color;
}

.selection-mode.header-bar .selection-menu.button:active,
.selection-mode.toolbar .selection-menu.button:active {
    color: shade(@theme_selected_fg_color, 0.8);
    
}
/**************
 * List boxes *
 **************/
EggListBox {
    background-color: @theme_base_color;
}

EggListBox:hover {
    background-color: mix(white, @theme_selected_bg_color, 0.05) ;
}

EggListBox:selected {
    background-color: @theme_selected_bg_color;
}

.list {
    background-color: @theme_base_color;
}
.list-row,
.list-row:hover {
    background-color: @theme_base_color;
}

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

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

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

GtkBubbleWindow .toolbar {
    background-color: transparent;
}

/*******
 * CSD *
 *******/
.titlebar {
    border-style: solid;
    border-radius: 3px 3px 0 0;
    border-color: transparent;
    background-image: none;
    background-color: @theme_bg_color;
    color: @theme_fg_color;
    text-shadow: none;
}

/* this is the default titlebar that is added by GTK
 * when client-side decorations are in use and the application
 * did not set a custom titlebar.
 */
.titlebar.default-decoration {
    border: none;
}

.titlebar .title {
    font: bold;
    color: @text_color;
}

.titlebar:backdrop {
    background-image: none;
    background-color: @theme_bg_color;
    color: mix(@theme_fg_color, @theme_bg_color, 0.3);
    text-shadow: none;
}

.titlebar .titlebutton {
    padding: 4px;
    border-style: none;
    background: none;
    icon-shadow: none;
}

.titlebar .titlebutton:active {
    background-color: @theme_bg_color;
    color: shade(@selected_bg_color, 1.2);
}

.titlebar .titlebutton:backdrop {
    background-image: none;
    color: mix(@theme_fg_color, @theme_bg_color, 0.4);
    icon-shadow: none;
}

.titlebar .right .button.titlebutton:nth-last-child(3),
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(3),
.titlebar .left .button.titlebutton:nth-child(3),
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(3),
.titlebar .right .button.titlebutton:nth-last-child(3):active:hover,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(3):active:hover,
.titlebar .left .button.titlebutton:nth-child(3):active:hover,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(3):active:hover  {
    color: shade(@selected_bg_color, 0.80);
}

.titlebar .right .button.titlebutton:nth-last-child(2),
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(2),
.titlebar .left .button.titlebutton:nth-child(2),
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(2),
.titlebar .right .button.titlebutton:nth-last-child(2):active:hover,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(2):active:hover,
.titlebar .left .button.titlebutton:nth-child(2):active:hover,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(2):active:hover {
    color: @minimize_color;
}

.titlebar .right .button.titlebutton:last-child,
.titlebar .right:dir(rtl) .button.titlebutton:first-child,
.titlebar .left .button.titlebutton:first-child,
.titlebar .left:dir(rtl) .button.titlebutton:last-child,
.titlebar .right .button.titlebutton:last-child:active:hover,
.titlebar .right:dir(rtl) .button.titlebutton:first-child:active:hover,
.titlebar .left .button.titlebutton:first-child:active:hover,
.titlebar .left:dir(rtl) .button.titlebutton:last-child:active:hover {
    color: @close_color;
}

.titlebar .right .button.titlebutton:nth-last-child(3):prelight,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(3):prelight,
.titlebar .left .button.titlebutton:nth-child(3):prelight,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(3):prelight,
.titlebar .right .button.titlebutton:nth-last-child(3):backdrop:prelight,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(3):backdrop:prelight,
.titlebar .left .button.titlebutton:nth-child(3):backdrop:prelight,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(3):backdrop:prelight  {
    color: shade(@selected_bg_color, 1.1);
}

.titlebar .right .button.titlebutton:nth-last-child(2):prelight,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(2):prelight,
.titlebar .left .button.titlebutton:nth-child(2):prelight,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(2):prelight,
.titlebar .right .button.titlebutton:nth-last-child(2):backdrop:prelight,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(2):backdrop:prelight,
.titlebar .left .button.titlebutton:nth-child(2):backdrop:prelight,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(2):backdrop:prelight {
    color: shade(@minimize_color, 1.2);
}

.titlebar .right .button.titlebutton:last-child:prelight,
.titlebar .right:dir(rtl) .button.titlebutton:first-child:prelight,
.titlebar .left .button.titlebutton:first-child:prelight,
.titlebar .left:dir(rtl) .button.titlebutton:last-child:prelight,
.titlebar .right .button.titlebutton:last-child:backdrop:prelight,
.titlebar .right:dir(rtl) .button.titlebutton:first-child:backdrop:prelight,
.titlebar .left .button.titlebutton:first-child:backdrop:prelight,
.titlebar .left:dir(rtl) .button.titlebutton:last-child:backdrop:prelight {
    color: shade(@close_color, 1.2);
}

.titlebar .right .button.titlebutton:nth-last-child(3):backdrop,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(3):backdrop,
.titlebar .left .button.titlebutton:nth-child(3):backdrop,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(3):backdrop {
    color: #999999;
}

.titlebar .right .button.titlebutton:nth-last-child(2):backdrop,
.titlebar .right:dir(rtl) .button.titlebutton:nth-child(2):backdrop,
.titlebar .left .button.titlebutton:nth-child(2):backdrop,
.titlebar .left:dir(rtl) .button.titlebutton:nth-last-child(2):backdrop {
    color: #999999;
}

.titlebar .right .button.titlebutton:last-child:backdrop,
.titlebar .right:dir(rtl) .button.titlebutton:first-child:backdrop,
.titlebar .left .button.titlebutton:first-child:backdrop,
.titlebar .left:dir(rtl) .button.titlebutton:last-child:backdrop {
    color: #999999;
}

.window-frame {
    background-image: none;
    border-image: none;
    border-radius: 3px 3px 0 0;
    box-shadow: 0 3px 12px 2px alpha(black, 0.5);
    /* this is used for the resize cursor area */
    margin: 10px;
}

.window-frame:backdrop {
    border-width: 5px 1px 1px 1px;
    border-color: @theme_bg_color;
    border-image: none;
    box-shadow: 0 2px 7px 1px alpha(black, 0.5);
}

.window-frame.tiled,
.window-frame.csd.popup,
.window-frame.csd.tooltip {
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); }
