/* Gnome 3 enhancements.  Larger border-radius radius for better antialiasing */
/* try csd-solid */
/* try overshoot and undershoot */
.window-frame {
    border-radius: 6px 6px 0 0;
    border-width: 0px;
    box-shadow: 0 2px 8px 3px alpha(black, 0.5);
}
.window-frame.ssd {
    border-radius: 6px 6px 0 0;
    box-shadow: 0 2px 8px 3px alpha(black, 0.5);
}

.window-frame.ssd.maximized {
    border-radius: 0;
}

.window-frame:backdrop {
    box-shadow: 0 2px 5px 1px alpha(black, 0.5);
}

.window-frame.solid-csd {
    border-radius: 6px 6px 0 0;
    margin: 0px;
    background-color: rgba(0, 0, 0, 0);
    box-shadow: none; }

/*.window-frame.tiled {
    border-radius: 6px 6px 0 0;
}

.titlebar {
    border-radius: 6px 6px 0 0;
}

.tiled .titlebar {
    border-radius: 6px 6px 0 0;
}*/

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

/* */

* {
    -GtkArrow-arrow-scaling: 0.6;
    -GtkButton-child-displacement-x: 1;
    -GtkButton-child-displacement-y: 1;
    -GtkButton-default-border: 0;
    -GtkButton-image-spacing: 0;
    -GtkButton-interior-focus: true;
    -GtkButton-inner-border: 3;
    -GtkCheckButton-indicator-size: 18;
    -GtkCheckMenuItem-indicator-size: 16;
    -GtkEntry-inner-border: 2;
    -GtkEntry-progress-border: 0;
    -GtkExpander-expander-size: 8;
    -GtkHTML-link-color: #f07746; /* @link_color */
    -GtkIMHtml-hyperlink-color: #f07746; /* @link_color */
    -GtkMenu-horizontal-padding: 0;
    -GtkMenu-vertical-padding: 5px;
    -GtkMenuBar-internal-padding: 0;
    -GtkMenuItem-arrow-scaling: 0.6;
    -GtkNotebook-tab-overlap: 1;
    -GtkPaned-handle-size: 6;
    -GtkProgressBar-min-horizontal-bar-height: 14;
    -GtkProgressBar-min-vertical-bar-width: 14;
    -GtkRange-trough-border: 0;
    -GtkRange-slider-width: 14;
    -GtkRange-stepper-size: 13;
    -GtkRange-trough-under-steppers: 1;
    -GtkRange-stepper-spacing: 0;
    -GtkScale-trough-border: 0;
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 1;
    -GtkSeparatorMenuItem-horizontal-padding: 0;
    -GtkStatusbar-shadow-type: none;
    -GtkTextView-error-underline-color: #df382c; /* @error_color doesn't work due to a gtk bug */
    -GtkToolButton-icon-spacing: 6;
    -GtkToolItemGroup-expander-size: 11;
    -GtkToolbar-internal-padding: 0;
    -GtkTreeView-expander-size: 8;
    -GtkTreeView-vertical-separator: 0;
    -GtkWidget-separator-width: 1;
    -GtkWidget-separator-height: 1;
    -GtkWidget-wide-separators: true;
    -GtkWidget-link-color: #f07746; /* @link_color */
    -GtkWidget-visited-link-color: #f07746; /* @link_color */
    -GtkWindow-resize-grip-width: 0;
    -GtkWindow-resize-grip-height: 0;
    -WnckTasklist-fade-overlay-rect: 0;

    background-origin: border-box;
    background-clip: padding-box;
}

.background {
    color: @fg_color;
    background-color: @bg_color;
}

.background:backdrop {
    color: @backdrop_fg_color;
    box-shadow: inset -1px 0 shade (@bg_color, 0.94);
}

/**********
 * button *
 **********/

/* button */

.button {
    padding: 5px;

    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.1)),
                                     to (shade (@bg_color, 1.05)));
    color: @fg_color;

    border: 1px solid shade(@bg_color, 0.8);

    border-radius: 4px;
}

.button:backdrop {
    background-image: none;
    background-color: shade(@bg_color, 1.05);

    border-color: shade(@bg_color, 0.9);

    color: @backdrop_fg_color;
}

.button:focus {
    border-color: @selected_bg_color;
}

.button.flat {
    background-image: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.button.flat:backdrop {
    background-image: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.button.flat:hover {
    background-image: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.button.title {
}

/* button hover */

.button:hover {
    box-shadow: 0 0 2px 0 shade(@bg_color, 0.8);
}

.button:hover:backdrop {
    border-color: shade(@bg_color, 0.9);
    box-shadow: 0 0 2px 0 shade(@bg_color, 0.9);
}

.button:hover:focus {
    border-color: @selected_bg_color;
    box-shadow: 0 0 2px 0 @selected_bg_color;
}

/* button checked */

.button:checked {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.3)),
                                     to (shade (@bg_color, 1.2)));
}

.button:checked:backdrop {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.2)),
                                     to (shade (@bg_color, 1.1)));
}

.button:checked:focus {
    border-color: @selected_bg_color;
}

/* button pressed */

.button:active {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.1)),
                                     to (shade (@bg_color, 1)));
}

/* button insensitive */

.button:insensitive {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.05)),
                                     to (shade (@bg_color, 1)));
}

.button:insensitive:backdrop {
    background-color: @bg_color;
}

.button.flat:insensitive,
.button.flat:insensitive:backdrop {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.button:active:insensitive {
    background-color: #dcdcdc;
    border-color: #c8c8c8;
}

.button:checked:backdrop {
    background-color: #d2d2d2;
}

.button:active:backdrop {
    background-color: #eeeeee;
}

.button:checked:insensitive:backdrop {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.05)),
                                     to (shade (@bg_color, 1)));
}

.button.default {
    background-color: @selected_bg_color;
}

.button.default:hover {
    background-color: @selected_bg_color;
}.
.button.default:focus {
    background-color: @selected_bg_color;
    border-color: @selected_bg_color;
}

.button.default:focus:hover {
    background-color: @selected_bg_color;
    border-color: @selected_bg_color;
}

/******************
 * Linked Widgets *
 *****************/

/* combo box, button, entry */

.linked > .entry,
.linked > .button,
.linked > GtkComboBox > .button {
    border-radius: 0;
    border-left-color: shade(@bg_color, 1.1);
}
.linked > GtkComboBox > .button:focused {
    border-color: @selected_bg_color;
}

.linked > .button:hover,
.linked > GtkComboBox > .button:hover {
    box-shadow: 0 0 2px 0 shade(@bg_color, 0.8);
}

.linked > .button:hover:backdrop,
.linked > GtkComboBox > .button:hover:backdrop {
    border-color: shade(@bg_color, 0.9);
    box-shadow: 0 0 2px 0 shade(@bg_color, 0.9);
}

.linked > .button:hover:focus,
.linked > GtkComboBox > .button:hover:focus {
    border-color: @selected_bg_color;
    box-shadow: 0 0 2px 0 @selected_bg_color;
}

/* first child */

.linked > .entry:first-child,
.linked > .button:first-child,
.linked > GtkComboBox:first-child > .button {
    border-radius: 4px 0 0 4px;
    border-left-color: shade(@bg_color, 0.8);
}


.linked > GtkComboBox:first-child > .button:focused {
    border-color: @selected_bg_color;
}

/* last child */

.linked > .entry:last-child,
.linked > .button:last-child,
.linked > GtkComboBox:last-child > .button {
    border-radius: 0 4px 4px 0;
}

.linked > .entry:last-child:focus,
.linked > .button:last-child:focus,
.linked > GtkComboBox:last-child:focus > .button {
    border-color: @selected_bg_color;
}

.linked > GtkComboBox:first-child > .button:backdrop,
.linked > GtkComboBox:last-child > .button:backdrop,
.linked > .entry:backdrop,
.linked > .button:backdrop,
.linked > .entry:first-child:backdrop,
.linked > .button:first-child:backdrop,
.linked > GtkComboBox > .button:backdrop,
.linked > GtkComboBox > .button:focused:backdrop {
}

/* only child */

.linked > .entry:only-child,
.linked > .button:only-child,
.linked > GtkComboBox:only-child > .button {
    border-radius: 4px;
    border-left-color: @dark_button_border;
}

/*** primary-toolbar / header-bar buttons ***/

	/* button */
	.primary-toolbar .linked .button,
	.header-bar .linked .button {
	    border-left-color: shade(@dark_bg_color,1); 
	    box-shadow: none;
	}

	.primary-toolbar .linked .button:active,
	.header-bar .linked .button:active,
	.primary-toolbar .linked .button:selected,
	.header-bar .linked .button:selected,
	.primary-toolbar .linked .button:prelight,
	.header-bar .linked .button:prelight,
	.primary-toolbar .linked .button:hover,
	.header-bar .linked .button:hover {
	    border-left-color: shade(@dark_bg_color,1); 
	    background-color: alpha(white, 0.12);
	    box-shadow: none;
	}

	.primary-toolbar .linked .button:focused,
	.header-bar .linked .button:focused {
	    border-color: @selected_bg_color;
	    border-left-color: @selected_bg_color;
	}

	.header-bar .linked .button:backdrop,
	.primary-toolbar .linked .button:backdrop,
	.header-bar .linked .button:backdrop:hover,
	.primary-toolbar .linked .button:backdrop:hover {
	    border-color: shade(@dark_bg_color, 1.3);
	    border-left-color: @dark_bg_color;
	    box-shadow: none;
	}

	/* first child */

	.primary-toolbar .linked .button:first-child,
	.header-bar .linked .button:first-child {
	    border-left-color: @dark_button_border;
	    border-top-left-radius: 4px;
	    border-bottom-left-radius: 4px;
	}

	.primary-toolbar .linked .button:first-child:focused,
	.header-bar .linked .button:first-child:focused {
	    border-color: @selected_bg_color;
	    border-left-color: @selected_bg_color;
	}

	.primary-toolbar .linked .button:first-child:backdrop,
	.header-bar .linked .button:first-child:backdrop {
	    border-left-color: shade(@dark_bg_color, 1.3)
	}

	.primary-toolbar .linked .button:first-child:active,
	.header-bar .linked .button:first-child:active,
	.primary-toolbar .linked .button:first-child:insensitive,
	.header-bar .linked .button:first-child:insensitive {
	}

	/* last child */

	.primary-toolbar .linked .button:last-child,
	.header-bar .linked .button:last-child {
	    border-top-right-radius: 4px;
	    border-bottom-right-radius: 4px;
	    border-width: 1px;
	}

	.primary-toolbar .linked .button:last-child:focused,
	.header-bar .linked .button:last-child:focused {
	    border-color: @selected_bg_color;
	    border-left-color: @selected_bg_color;
	}

	.header-bar .linked .button:last-child:backdrop {
	}

	/* only child */

	.primary-toolbar .linked .button:only-child,
	.header-bar .linked .button:only-child,
	.primary-toolbar .linked .button:only-child:checked,
	.header-bar .linked .button:only-child:checked {
	    border-radius: 4px;
	}

	.primary-toolbar .linked .button:only-child:focused,
	.header-bar .linked .button:only-child:focused {
	    border-color: @selected_bg_color;
	}

	.primary-toolbar .linked .button:only-child:backdrop,
	.header-bar .linked .button:only-child:backdrop {
	}

/****************
 * cell and row *
 ****************/
.cell {
    -GtkCheckButton-indicator-size: 16;

    background-color: @base_color;
    border-radius: 0;
    border-width: 0;
}

row:selected {
    background-image: -gtk-gradient (linear, left bottom, left top,
                                     from (@selected_bg_color),
                                     to (@selected_bg_color));
    border-top-color: shade (@selected_bg_color, 0.88);
    border: none;
}

row:selected:backdrop {
    background-color: @backdrop_selected_bg_color;
    border-top-color: shade (@backdrop_selected_bg_color, 0.9);
}

/*******************
 * check and radio *
 *******************/

/* Draw a focus ring around the contained label ... */
GtkCheckButton.text-button GtkLabel {
    border: 1px solid transparent;
    border-radius: 4px;
}

GtkCheckButton.text-button:focus GtkLabel {
    border-color: @focus_color;
    background-color: @focus_bg_color;
}

/* ... unless it's a proper button, which already has a focus-colored border */
.button.text-button:focus GtkLabel {
    border: none;
    background: none;
}

.menu .radio * {
    box-shadow: none;
}

/*****************
 * column-header *
 *****************/
column-header .button,
column-header .button:active {
    border-radius: 0;
    border-width: 0 1px 1px 0;
    border-image: none;
}

column-header .button {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.06)),
                                     to (shade (@bg_color, 1.04)));
    border-image: -gtk-gradient (linear, left top, left bottom,
                                 from (shade (@bg_color, 0.99)),
                                 to (shade (@bg_color, 0.9))) 1;
    box-shadow: inset -1px 0 shade (@bg_color, 1.1),
                inset 0 -1px shade (@bg_color, 1.1);

    text-shadow: 0 1px alpha (shade (@bg_color, 1.25), 0.4);
}

column-header .button:backdrop {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.04)),
                                     to (shade (@bg_color, 1.02)));
    border-image: -gtk-gradient (linear, left top, left bottom,
                                 from (shade (@bg_color, 0.94)),
                                 to (shade (@bg_color, 0.88))) 1;
    box-shadow: inset -1px 0 shade (@bg_color, 1.03),
                inset 0 -1px shade (@bg_color, 1.03);
}

column-header .button:hover {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.13)),
                                     to (shade (@bg_color, 1.08)));
    border-image: -gtk-gradient (linear, left top, left bottom,
                                 from (shade (@bg_color, 0.99)),
                                 to (shade (@bg_color, 0.9))) 1;
}

column-header .button:hover:backdrop {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.1)),
                                     to (shade (@bg_color, 1.06)));
    border-image: -gtk-gradient (linear, left top, left bottom,
                                 from (shade (@bg_color, 0.99)),
                                 to (shade (@bg_color, 0.9))) 1;
}


column-header:nth-child(last) .button {
    border-width: 0 0 1px 0;
}

/****************
 * Content view *
 ****************/
.content-view.view {
    background-color: shade (@bg_color, 1.01);
}

.content-view.view:prelight {
    background-color: shade (@bg_color, 1.03);
}

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

.content-view.view:insensitive {
    background-color: @bg_color;
}

.content-view.view:backdrop {
    background-color: @bg_color;
}

.content-view.view:selected:backdrop {
    background-color: @backdrop_selected_bg_color;
}

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

/*********
 * entry *
 *********/
.entry {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@base_color, 0.96)),
                                     to (@base_color));
    padding: 5px 7px;

    color: @text_color;

    box-shadow: none;
}

.entry:backdrop {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (mix (shade (@base_color, 0.96), @bg_color, 0.5)),
                                     to (mix (@base_color, @bg_color, 0.5)));
    color: @backdrop_text_color;
    box-shadow: none;
}

.entry:selected,
.entry:selected:focused {
    background-color: @selected_bg_color;
}

.entry:insensitive {
    background-color: #f5f5f5;
    background-image: none;

    color: mix (@text_color, @base_color, 0.4);
}

.entry.readonly {
    background-color: #f5f5f5;
    background-image: none;
}

.entry:insensitive:backdrop {
    background-color: mix (#f5f5f5, @bg_color, 0.5);

    color: mix (@text_color, @base_color, 0.4);
}

.primary-toolbar .entry.progressbar,
.primary-toolbar .entry.progressbar,
.header-bar .entry.progressbar,
.header-bar .entry.progressbar,
.entry.progressbar {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@selected_bg_color, 0.8)),
                                     color-stop (0.1, shade (@selected_bg_color, 0.9)),
                                     to (shade (@selected_bg_color, 1.1)));
    border-width: 0;

    color: @selected_fg_color;
}

/* Application notification */
.app-notification,
.app-notification.frame {
    padding: 3px;
    border-width: 0 1px 1px;
    border-style: solid;
    background-color: @bg_color;
}

/************
 * expander *
 ************/
.expander {
    color: @fg_color;
}

/*********
 * frame *
 *********/
.frame {
    border-radius: 0;
    border-width: 1px;
    border-style: solid;
    border-color: shade (@bg_color, 0.82);
    border-image: none;
    background: none;
}

.frame.flat {
    border: none;
}

/****************
 * window-frame *
 ****************/

.window-frame.csd.popup {
    border-style: none;
    border-radius: 0;
    box-shadow: 0 3px 8px @shadow_color;
}

/************
 * iconview *
 ************/
.view {
    background-color: @base_color;
    color: @text_color;
}

GtkIconView.view.cell:selected,
GtkIconView.view.cell:selected:focused {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@selected_bg_color, 1.0)),
                                     to (shade (@selected_bg_color, 0.9)));
    border-radius: 4px;
    border-style: solid;
    border-width: 1px;
    border-color: shade (@selected_bg_color, 0.8);
    border-bottom-color: shade (@selected_bg_color, 0.7);

    box-shadow: inset 1px 0 shade (@selected_bg_color, 1.05),
                inset -1px 0 shade (@selected_bg_color, 1.05),
                inset 0 1px shade (@selected_bg_color, 1.08),
                inset 0 -1px shade (@selected_bg_color, 1.0);
}

.rubberband {
    background-color: alpha (@selected_bg_color, 0.35);
    border-color: @selected_bg_color;
    border-radius: 0;
    border-style: solid;
    border-width: 1px;
}

GtkIconView.cell {
    background-color: transparent;
}

/***********
 * infobar *
 ***********/
.info {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@info_bg_color, 1.04)),
                                     to (shade (@info_bg_color, 0.96)));
    border-style: solid;
    border-width: 1px;

    color: @info_fg_color;

    border-color: shade (@info_bg_color, 0.8);
    border-bottom-color: shade (@info_bg_color, 0.75);

    box-shadow: inset 1px 0 shade (@info_bg_color, 1.08),
                inset -1px 0 shade (@info_bg_color, 1.08),
                inset 0 1px shade (@info_bg_color, 1.1),
                inset 0 -1px shade (@info_bg_color, 1.04);
}

.warning {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@warning_bg_color, 1.04)),
                                     to (shade (@warning_bg_color, 0.96)));
    border-style: solid;
    border-width: 1px;

    color: @warning_fg_color;

    border-color: shade (@warning_bg_color, 0.8);
    border-bottom-color: shade (@warning_bg_color, 0.75);

    box-shadow: inset 1px 0 shade (@warning_bg_color, 1.08),
                inset -1px 0 shade (@warning_bg_color, 1.08),
                inset 0 1px shade (@warning_bg_color, 1.1),
                inset 0 -1px shade (@warning_bg_color, 1.04);
}

.question {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@question_bg_color, 1.04)),
                                     to (shade (@question_bg_color, 0.96)));
    border-style: solid;
    border-width: 1px;

    color: @question_fg_color;

    border-color: shade (@question_bg_color, 0.8);
    border-bottom-color: shade (@question_bg_color, 0.75);

    box-shadow: inset 1px 0 shade (@question_bg_color, 1.08),
                inset -1px 0 shade (@question_bg_color, 1.08),
                inset 0 1px shade (@question_bg_color, 1.1),
                inset 0 -1px shade (@question_bg_color, 1.04);
}

.error {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@error_bg_color, 1.04)),
                                     to (shade (@error_bg_color, 0.96)));
    border-style: solid;
    border-width: 1px;

    color: @error_fg_color;

    border-color: shade (@error_bg_color, 0.8);
    border-bottom-color: shade (@error_bg_color, 0.75);

    box-shadow: inset 1px 0 shade (@error_bg_color, 1.08),
                inset -1px 0 shade (@error_bg_color, 1.08),
                inset 0 1px shade (@error_bg_color, 1.1),
                inset 0 -1px shade (@error_bg_color, 1.04);
}

/********
 * menu *
 ********/
GtkTreeMenu.menu,
.toolbar .header-bar .menu,
GtkMenuToolButton.menu,
.primary-toolbar .button .menu,
.header-bar .button .menu,
.menu {
    background-image: none;
    background-color: shade (@dark_bg_color, 1.08);
    border-bottom-color: shade (@dark_bg_color, 0.96);
    border-left-color: shade (@dark_bg_color, 0.8);
    border-right-color: shade (@dark_bg_color, 0.8);
    border-top-color: shade (@dark_bg_color, 0.96);
    padding: 0;
    border-width: 1px;
    border-style: solid;

    color: @dark_fg_color;

    margin: 1px;
}

.toolbar .menu,
GtkComboBox .menu {
    background-image: none;
    background-color: @bg_color;
    border-bottom-color: shade (@bg_color, 0.66);
    border-left-color: shade (@bg_color, 0.7);
    border-right-color: shade (@bg_color, 0.7);
    border-top-color: shade (@bg_color, 0.8);
    border-style: solid;
    padding: 0;

    color: @fg_color;
}

.menu:selected {
    background-color: @selected_bg_color;
}

.menu.button:hover,
.menu.button:checked,
.menu.button:checked:insensitive,
.menu.button:insensitive,
.menu.button
{
    background-color: shade (@dark_bg_color, 1.08);
    background-image: none;
    border-radius: 0;
    border-style: none;
    border-width: 1px;
}

.context-menu {
    font: regular medium;
}

/********
 * menu *
 ********/
GtkTreeMenu.menu,
GtkMenuToolButton.menu,
GtkComboBox .menu {
    background-color: @dark_bg_color;
    margin: 3px;
}

.primary-toolbar .menu,
.primary-toolbar .button .menu,
.toolbar .menu,
.toolbar .primary-toolbar .menu,
.header-bar .menu,
.header-bar .primary-toolbar .menu,
.menu {
    padding: 0;
    border-radius: 0;
    border-style: none;
    background-color: @dark_bg_color;
    color: @dark_fg_color;
}

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

.menu.button:hover,
.menu.button:active,
.menu.button:checked,
.menu.button:active:insensitive,
.menu.button:checked:insensitive,
.menu.button:insensitive,
.menu.button {
    border-width: 0;
    background-color: @dark_bg_color;
    background-image: none;
}

.context-menu {
    font: initial;
}

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

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

    border-style: none;
    background-color: @dark_bg_color;
    background-image: none;
    color: @dark_fg_color;
}

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

.menubar.menuitem:hover,
.menubar .menuitem:hover {
    border-color: mix(@dark_bg_color, @dark_fg_color, 0.21);
    background-color: mix(@dark_bg_color, @dark_fg_color, 0.21);
    background-image: none;
    color: shade(@dark_fg_color, 1.08);
}

.menubar .menuitem *:hover {
    color: shade(@dark_fg_color, 1.08);
}

/************
 * menuitem *
 ************/
GtkTreeMenu .menuitem {
    padding: 0;
    border-width: 0;
}

.menuitem,
.menu .menuitem {
    -GtkMenuItem-arrow-scaling: 0.5;

    padding: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 0;
    background-color: transparent;
    background-image: none;
    color: @menu_fg_color;
}

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

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

.menu .menuitem:insensitive,
.menu .menuitem *:insensitive {
    color: mix(@dark_fg_color, @dark_bg_color, 0.5);
}

.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 GtkCalendar {
    background-color: transparent;
}

.menuitem GtkCalendar:inconsistent {
    color: mix(@dark_fg_color, @dark_bg_color, 0.5);
}

.menuitem GtkCalendar.button {
    border-style: none;
    background-color: transparent;
    background-image: none;
    color: @dark_fg_color;
}

.menuitem .entry {
    border-color: shade(@dark_bg_color, 0.7);
    background-color: @dark_bg_color;
    background-image: none;
    color: @dark_fg_color;
}

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

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

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

.menuitem .accelerator:insensitive {
    color: alpha(mix(@dark_fg_color, @dark_bg_color, 0.5), 0.6);
}

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

/************
 * popovers *
 ************/
GtkPopover {
    margin: 10px;
    padding: 2px;
    border-radius: 2px;
    border-color: shade(@dark_bg_color, 0.8);
    border-width: 1px;
    border-style: solid;
    background-clip: border-box;
    background-image: none;
    background-color: @dark_bg_color;
    color: @dark_fg_color;
    box-shadow: 0 2px 3px alpha(black, 0.5);
}

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

GtkPopover:backdrop {
    box-shadow: none;
}

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

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

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

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

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

GtkPopover .entry {
    border-color: mix(@dark_bg_color, @dark_fg_color, 0.12);
    background-color: @dark_bg_color;
    background-image: none;
    color: @dark_fg_color;
}

GtkPopover .entry:hover,
GtkPopover .entry:focus,
GtkPopover .entry:active  {
    border-color: mix(@dark_bg_color, @dark_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.1);
    font-size: 80%;
    font-weight: bold;
}

.menuitem.button {
    color: @dark_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: @dark_bg_color;
}

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

GtkModelButton.button {
    color: @dark_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: @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: @selected_bg_color;
    color: @selected_fg_color;
    text-shadow: none;
    border-width: 0;
    border-color: transparent;
    border-radius: 2px;
}
/************
 * notebook *
 ************/
.notebook {
    padding: 0;
    border-width: 0;
    border-style: solid;
    border-color: shade(@bg_color, 0.82);
    border-radius: 0;
    background-color: @bg_color;
    background-image: none;
    background-clip: border-box;

    -GtkNotebook-initial-gap: 0;
    -GtkNotebook-arrow-spacing: 5;
    -GtkNotebook-tab-curvature: 0;
    -GtkNotebook-tab-overlap: 1;
    -GtkNotebook-has-tab-gap: false;
}

.notebook.frame {
    border: 1px solid shade(@bg_color, 0.82);
    border-radius: 0;
}

.notebook.header {
    border-width: 0;
    background-color: @dark_bg_secondary;
}

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

.notebook.header.frame.top {
    border-width: 1px 0 0 0;
}

.notebook.header.frame.right {
    border-width: 0 1px 0 0;
}

.notebook.header.frame.bottom {
    border-width: 0 0 1px 0;
}

.notebook.header.frame.left {
    border-width: 0 0 0 1px;
}

.notebook GtkViewport {
    border-width: 0;
    background-color: @bg_color;
    color: @fg_color;
}

.notebook tab {
    padding: 6px;
    border-style: solid;
    border-width: 1px;
    border-color: @dark_bg_selected;
    border-radius: 0;
    background-color: @dark_bg_secondary;
    background-image: none;
}

.notebook tab:active {
    background-color: @dark_bg_selected;
    background-image: none;
    border-image: none;
}

.notebook tab.top {
    padding: 5px 6px 7px 6px;
    border-image: -gtk-gradient (linear, left top, left bottom,
                                 from (@dark_bg_secondary),
                                 to (@dark_bg_selected)) 1;
    border-bottom-width: 0;
}

.notebook tab.top:hover {
    box-shadow:inset 0 -3px @selected_bg_color;
}

.notebook tab.top:active {
    border-image: none;
    box-shadow:inset 0 -3px @selected_bg_color;
}

.notebook tab.right {
    padding: 6px 5px 6px 7px;
    border-image: -gtk-gradient (linear, right top, left top,
                                 from (@dark_bg_secondary),
                                 to (@dark_bg_selected)) 1;
    border-left-width: 0;
}

.notebook tab.right:hover {
    box-shadow:inset 3px 0 @selected_bg_color;
}

.notebook tab.right:active {
    border-image: none;
    box-shadow:inset 3px 0 @selected_bg_color;
}

.notebook tab.bottom {
    padding: 7px 6px 5px 6px;
    border-image: -gtk-gradient (linear, left bottom, left top,
                                 from (@dark_bg_secondary),
                                 to (@dark_bg_selected)) 1;
    border-top-width: 0;
}

.notebook tab.bottom:hover {
    box-shadow:inset 0 3px @selected_bg_color;
}

.notebook tab.bottom:active {
    border-image: none;
    box-shadow:inset 0 3px @selected_bg_color;
}

.notebook tab.left {
    padding: 6px 7px 6px 5px;
    border-image: -gtk-gradient (linear, left top, right top,
                                 from (@dark_bg_secondary),
                                 to (@dark_bg_selected)) 1;
    border-right-width: 0;
}

.notebook tab.left:hover {
    box-shadow:inset -3px 0 @selected_bg_color;
}

.notebook tab.left:active {
    border-image: none;
    box-shadow:inset -3px 0 @selected_bg_color;
}

.notebook tab GtkLabel {
    color: @dark_fg_color;
}

.notebook .prelight-page,
.notebook .prelight-page GtkLabel {
    color: @dark_fg_color;
}

.notebook .active-page,
.notebook .active-page GtkLabel {
    color: @dark_fg_color;
}

.notebook tab.reorderable-page {
    padding: 9px;
}

/* close button styling */
.notebook tab .button,
.notebook tab .button:active,
.notebook tab .button:checked,
.notebook tab .button:hover,
.notebook tab .button:backdrop {
    padding: 1px;
    border-width: 1px;
    border-radius: 2px;
    border-style: solid;
    border-color: transparent;
    background-image: none;
    background-color: transparent;
    color: @dark_fg_color;
    box-shadow: none;
}

.notebook tab .button:hover {
    border-color: @dark_fg_color;
}

.notebook tab .button:active,
.notebook tab .button:checked,
.notebook tab .button:active:hover,
.notebook tab .button:checked:hover {
    border-color: @dark_fg_color;
    background-color: @dark_bg_selected;
}
/******************
 * pane separator *
 ******************/
.sidebar .pane-separator,
.pane-separator {
    background-color: transparent;
    border-color: shade (@bg_color, 0.84);
}

/*************************
 * progressbar and scale *
 *************************/
GtkScale,
GtkProgressBar {
    border-radius: 8px;
    border-width: 0px;
    padding: 1px;
}

.scale.trough {
    margin: 7px 0 6px 0;
}

.scale.trough.vertical {
    margin: 0 7px 0 6px;
}

.menubar .menuitem .scale.highlight.left,
.scale.highlight.left,
.progressbar,
.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focused,
.progressbar row:nth-child(odd) {
    border-radius: 8px;
    border-width: 0px;
    background-image: none;
    background-color: #db6a3c;
    border-style: solid;
}

.progressbar:backdrop,
.progressbar row:backdrop,
.progressbar row:hover:backdrop,
.progressbar row:selected:backdrop,
.progressbar row:selected:focused:backdrop,
.scale.highlight.bottom:backdrop,
.progressbar.vertical:backdrop {
    border-radius: 8px;
    border-width: 0px;
    background-image: none;
    background-color: @backdrop_filling_bg;
}

.scale.highlight.left:insensitive {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 0.95)),
                                     to (shade (@bg_color, 0.85)));
}

.scale.highlight.bottom:insensitive {
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (shade (@bg_color, 0.95)),
                                     to (shade (@bg_color, 0.85)));
}

.trough,
.trough row,
.trough row:hover,
.trough row:selected,
.trough row:selected:focused {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (#d1d1d1),
                                     to (#e8e8e8));
    border-style: solid;
    border-width: 1px;

    color: @text_color;
}

.trough.vertical {
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (#d1d1d1),
                                     to (#e8e8e8));
}

/* level bars as used for password quality or remaining power */

GtkLevelBar {
    -GtkLevelBar-min-block-width: 34;
    -GtkLevelBar-min-block-height: 3;
}

GtkLevelBar.vertical {
    -GtkLevelBar-min-block-width: 3;
    -GtkLevelBar-min-block-height: 34;
}

.level-bar.trough {
    padding: 2px;
}

.level-bar.fill-block {
    border-width: 1px;
    border-style: solid;

    border-color: @selected_bg_color;
    background-color: #db6a3c;
}

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

.level-bar.fill-block:backdrop,
.level-bar.fill-block.level-high:backdrop,
.level-bar.fill-block.level-low:backdrop {
    background-color: @backdrop_filling_bg;
    border-color: @backdrop_filling_bg;
    background-image: none;
}


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

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

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

.level-bar.fill-block.level-low {
    border-color: shade(@warning_bg_color, 0.80);
    background-image: linear-gradient(to bottom,
                                      shade(@warning_bg_color, 1.3),
                                      @warning_bg_color 75%,
                                      shade(@warning_bg_color, 0.90)
                                      );
}

.level-bar.fill-block.empty-fill-block {
    background-color: transparent;
    background-image: none;
    border-color: alpha(@bg_color, 0.1);
}

.level-bar.fill-block.empty-fill-block:backdrop {
    border-color: transparent;
    background-color: transparent;
}

GtkScale {
    -GtkRange-slider-width: 18;
    -GtkRange-trough-border: 0;
    -GtkScale-slider-length: 14;
}

GtkScale.vertical {
    -GtkScale-slider-length: 13;
}

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

.scale.trough.highlight:insensitive {
    background-color: #b5b5b5;
    background-image: none;
}

.scale.trough.highlight.left {
    margin: 7px 0 7px 0;
}

.scale.trough.highlight:backdrop {
    background-color: #dcdcdc;
    background-image: none;
}


.scale.trough.highlight.bottom {
    margin: 0 7px 0 7px;
}

GtkScale.mark {
    border-color: shade (@bg_color, 0.8);
}

/*************
 * scrollbar *
 *************/
.scrollbar {
    -GtkScrollbar-has-backward-stepper: 0;
    -GtkScrollbar-has-forward-stepper: 0;
    -GtkScrollbar-trough-border: 0;
    -GtkScrollbar-min-slider-length: 31;
    -GtkRange-slider-width: 10;

    background-color: @scrollbar_track_color;
    background-image: none;
    background-size: 0;
    border: none;
    border-radius: 0;
}

.scrollbar.overlay-indicator {
    background-color: transparent;
}

.scrollbar:hover,
.scrollbar.dragging {
    background-color: @scrollbar_track_color;
}

.scrollbar:hover:backdrop,
.scrollbar.dragging:backdrop {
    background-color: @backdrop_selected_bg_color;
}

/* Adding margins, so actual visible size is: -GtkRange-slider-width - margin
 * this allows to keep the slider smaller, but keeping few threshold pixels
 */
.scrollbar.vertical:hover:dir(ltr),
.scrollbar.vertical.dragging:dir(ltr) {
    margin-left: 2px;
}

.scrollbar.vertical:hover:dir(rtl),
.scrollbar.vertical.dragging:dir(rtl) {
    margin-right: 2px;
}

.scrollbar.horizontal:hover,
.scrollbar.horizontal.dragging,
.scrollbar.horizontal.slider:hover,
.scrollbar.horizontal.slider.dragging {
    margin-top: 2px;
}

.scrollbar.slider {
    background-color: alpha(@selected_bg_color, 0.8);
    border-radius: 1px;
}

.scrollbar.slider.hovering,
.scrollbar.slider.dragging {
    border-radius: 2px;
    margin: 0;
}

/* Adding margins, so actual visible size is: -GtkRange-slider-width - margin
 * this allows to define some kind of proximity effect also on mouse-enter
 */
.scrollbar.slider.vertical:dir(ltr):not(:hover):not(.dragging) {
    margin-left: 7px;
}

.scrollbar.slider.vertical:dir(rtl):not(:hover):not(.dragging) {
    margin-right: 7px;
}

.scrollbar.slider.horizontal:not(:hover):not(.dragging) {
    margin-top: 7px;
}

.scrollbar.slider:hover {
    background-color: alpha(@selected_bg_color, 0.85);
}

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

.scrollbar.slider:backdrop {
    background-color: alpha(@backdrop_filling_bg, 0.8);
}

.scrollbar.slider:hover:backdrop {
    background-color: alpha(@backdrop_filling_bg, 0.85);
}

.scrollbar.slider:active:backdrop {
    background-color: @backdrop_filling_bg;
}

/*******************
 * scrolled window *
 *******************/
.ubuntu-online-accounts.frame,
GtkScrolledWindow.frame {
    border-top-color: shade (@bg_color, 0.84);
    border-right-color: shade (@bg_color, 0.76);
    border-bottom-color: shade (@bg_color, 0.86);
    border-left-color: shade (@bg_color, 0.76);
    border-radius: 0;
    border-style: solid;
}

.ubuntu-online-accounts.frame {
    border-top-width: 0;
}

/*************
 * separator *
 *************/
.separator {
    border-width: 0px;
    border-style: solid;
    border-image: none;
    border-color: shade (@bg_color, 0.92);
}

GtkTreeView.view.separator,
GtkTreeView.separator,
.separator,
.separator:hover {
    color: shade (@bg_color, 0.92);
}

.separator.horizontal {
    border-width: 1px 0 0 0;
}

.separator.vertical {
    border-width: 0 1px 0 0;
}

GtkComboBox .separator {
    -GtkWidget-wide-separators: true;
    -GtkWidget-horizontal-separator: 0;
    -GtkWidget-vertical-separator: 0;
}

.button .separator,
.button.separator {
    border-color: shade (@button_bg_color, 0.9);
    border-bottom-color: alpha (shade (@bg_color, 1.26), 0.6);
    border-right-color: alpha (shade (@bg_color, 1.26), 0.6);
}

.button .separator:insensitive,
.button.separator:insensitive {
    border-color: shade (@button_insensitive_bg_color, 0.96);
}

.menuitem.separator {
    -GtkMenuItem-horizontal-padding: 0;
    border-width: 1px 0 1px 0;
    color: @dark_bg_color;
}

GtkTreeMenu .menuitem.separator,
.toolbar .header-bar .menuitem.separator,
GtkMenuToolButton .menuitem.separator,
.primary-toolbar .button .menuitem.separator,
.header-bar .button .menuitem.separator,
.menuitem.separator {
    border-color: shade (@dark_bg_color, 0.99);
    border-bottom-color: alpha (shade (@dark_bg_color, 1.26), 0.5);
    border-right-color: alpha (shade (@dark_bg_color, 1.26), 0.5);
}

.toolbar .menuitem.separator,
GtkComboBox .menuitem.separator {
    border-color: shade (@bg_color, 0.92);
    border-bottom-color: alpha (shade (@bg_color, 1.26), 0.6);
    border-right-color: alpha (shade (@bg_color, 1.26), 0.6);
}

/***********
 * sidebar *
 ***********/
GtkPlacesSidebar.sidebar .view {
    background-color: shade (@bg_color, 0.95);

    color: @fg_color;
    text-shadow: 0 1px shade (shade (@bg_color, 0.95), 1.04);
}

GtkPlacesSidebar.sidebar:backdrop {
    color: mix (@fg_color, shade (@bg_color, 0.95), 0.2);
    text-shadow: 0 1px shade (shade (@bg_color, 0.95), 1.02);
}

GtkPlacesSidebar.sidebar row:selected {
    color: @selected_fg_color;
    text-shadow: 0 1px shade (@selected_bg_color, 0.7);
}

GtkPlacesSidebar.sidebar row:selected:backdrop {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (shade (@bg_color, 0.95), 0.94)),
                                     to (shade (shade (@bg_color, 0.95), 0.86)));
    border-top-color: shade (shade (@bg_color, 0.95), 0.88);

    color: @fg_color;
    text-shadow: 0 1px shade (shade (@bg_color, 0.95), 0.96);
}

GtkPlacesSidebar.sidebar .sidebar-icon {
    padding-left: 10px;
    padding-right: 10px;
}


/**************
 * spinbutton *
 **************/
.spinbutton.button:active,
.spinbutton.button:insensitive,
.spinbutton.button {
    border-radius: 0;
}

.spinbutton.button:active:nth-child(last),
.spinbutton.button:insensitive:nth-child(last)
.spinbutton.button:nth-child(last),
.spinbutton.button:active:backdrop:nth-child(last),
.spinbutton.button:insensitive:backdrop:nth-child(last),
.spinbutton.button:backdrop:nth-child(last) {
    border-radius: 0 4px 4px 0;
}

.spinbutton.button,
.spinbutton.button:active,
.spinbutton.button:backdrop,
.spinbutton.button:active:backdrop,
.spinbutton.button:hover,
.spinbutton.button:hover:backdrop {
    background-image: none;
    background-color: transparent;
    border-image: none;
    border-width: 0 0 0 1px;
    border-left-color: alpha (shade (@bg_color, 0.6), 0.22);
}

.spinbutton.button:active {
    background-image: -gtk-gradient (radial, center center, 0.0, center center, 0.5,
                                     from (alpha (@selected_bg_color, 0.2)),
                                     to (alpha (@selected_bg_color, 0.0)));
}

.spinbutton.button:insensitive,
.spinbutton.button:insensitive:backdrop {
    border-left-color: alpha (shade (@bg_color, 0.6), 0.18);

    color: shade (@bg_color, 0.66);
}

.spinbutton,
.spinbutton:hover {
    color: @fg_color;
}

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

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

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

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

.spinner:active:insensitive {
    opacity: 0.5;
}

/*************
 * statusbar *
 *************/
GtkStatusbar {
}

/**********
 * switch *
 **********/
GtkSwitch {
    border-radius: 8px;
    padding: 0;
}

GtkSwitch.trough {
    border-radius: 8px;
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (#cecece),
                                     to (#e8e8e8));

    color: @fg_color;
    text-shadow: 0 1px alpha (shade (@bg_color, 1.25), 0.5);
}

GtkSwitch.trough:active {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@selected_bg_color, 0.93)),
                                     to (shade (@selected_bg_color, 0.99)));

    color: @selected_fg_color;
    text-shadow: 0 1px shade (@selected_bg_color, 0.7);
}

GtkSwitch:focus {
    outline: 2px solid @focus_color;
    outline-offset: -2px;
    outline-radius: 6px;
}

/* XXX temporary */
GtkSwitch.trough:backdrop,
GtkSwitch.trough:insensitive {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 0.93)),
                                     to (shade (@bg_color, 0.99)));

    color: shade (@bg_color, 0.6);
    text-shadow: 0 1px alpha (shade (@bg_color, 1.25), 0.5);
}

GtkSwitch.slider {
    padding: 1px;
    border-radius: 6px;
    border-style: solid;

    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@button_bg_color, 1.08)),
                                     color-stop (0.5, @button_bg_color),
                                     to (shade (@button_bg_color, 0.94)));

    color: @fg_color;
    text-shadow: 0 1px alpha (shade (@button_bg_color, 1.25), 0.4);
}

GtkSwitch.slider:backdrop {
    background-image: none;
    background-color: @bg_color;

    color: @backdrop_fg_color;
    text-shadow: 0 1px alpha (shade (@button_bg_color, 1.25), 0.2);
}

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

.header-bar {
    padding: 2px 6px;
}

/*
 * Header Bars GNOME CSD
 *
 * The following rules only style header bars when they are used as a window's
 * titlebar widget (i.e., they have .titlebar set as well).
 *
 * Some applications reuse their header bar as a primary toolbar on desktops
 * that prefer showing traditional title bars. The rules for those are further
 * down grouped with normal toolbars.
 */
.titlebar.header-bar {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@dark_bg_color, 1.2)),
                                     to (shade (@dark_bg_color, 1)));
    border-style: none;
    border-width: 0;
    border-radius: 6px 6px 0 0;

    color: @dark_fg_color;

    padding: 7px;

    box-shadow: inset 0 1px shade (@dark_bg_color, 1.4);
}

.titlebar.header-bar .title {
    font: regular;
}

.titlebar.header-bar .subtitle {
    font-size: smaller;
    opacity: 0.5;
}

.titlebar.header-bar:backdrop {
    color: @backdrop_fg_color;
    background-image: none;
    background-color: @dark_bg_color;
    border-top-color: @dark_bg_color;

    box-shadow: inset 0 1px shade (@dark_bg_color, 1.1);
}

.maximized .titlebar.header-bar {
    border-radius: 0;
    border: none;
}

.titlebar.header-bar .button.titlebutton {
    background-clip: padding-box;
    border: 0px solid #383734;
    color: #32312e;
    border-radius: 9px;
    padding: 0;
    box-shadow: none;
    background-image: linear-gradient(to top, #75746d, #8e8d88);
}

.titlebar.header-bar .button.titlebutton.close {
    color: #323112;
    background-image: linear-gradient(to top, #de4c19, #e77345);
}

.titlebar.header-bar .button.titlebutton.close:hover {
    background-image: linear-gradient(to top, #f17750, #f17750);
}

.titlebar.header-bar .button.titlebutton:hover,
.titlebar.header-bar .button.titlebutton:backdrop:hover {
    background-image: linear-gradient(to top, #969696, #bdbdbd);
}

.titlebar.header-bar .button.titlebutton:active {
    icon-shadow: none;
    background-image: linear-gradient(to top, #77766f, #74736c);
}

.titlebar.header-bar .button.titlebutton.close:active {
    background-image: linear-gradient(to top, #ec6e44, #e76b41);
}

.titlebar.header-bar .button.titlebutton:backdrop {
    color: #3d3c37;
    icon-shadow: none;
    background-image: linear-gradient(to top, #605f59, #5b5a54);
}


/***********
 * toolbar *
 ***********/
.toolbar {
    border: none;
    padding: 1px;

    background-color: @bg_color;
    color: @fg_color;
    text-shadow: none;
    border-radius: 0;
}

.toolbar:backdrop {
    color: @backdrop_fg_color;
}

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

    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@dark_bg_color, 1)),
                                     to (shade (@dark_bg_color, 0.8)));

    color: @dark_fg_color;

    padding: 7px;

    border: none;

}

.primary-toolbar:backdrop,
.header-bar:backdrop {
    background-image: none;
    background-color: @dark_bg_color;

    border-top-color: @dark_bg_color;

    border: none;

    color: @backdrop_dark_fg_color;

    box-shadow: inset 0 -1px shade (@dark_bg_color, 0.95);
}

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

/* primary-toolbar header-bar buttons */

.primary-toolbar .button,
.header-bar .button {
    border: 1px solid @dark_button_border;
    background-image: none;
    background-color: @dark_button_normal;
    color: @dark_fg_color;
    padding: 7px;
    box-shadow: none;
}
.primary-toolbar .button.flat:hover,
.primary-toolbar .button.flat:hover:backdrop {
    background-color: shade (@dark_bg_color, 1.2);
    color: @dark_fg_color;
    box-shadow: none;
    padding: 7px;
    border-color: shade (@dark_bg_color, 1.4);
}

.primary-toolbar .button.flat,
.header-bar .button.flat,
.primary-toolbar .button.flat:insensitive,
.header-bar .button.flat:insensitive,
.primary-toolbar .button.flat:backdrop,
.header-bar .button.flat:backdrop {
    background-image: none;
    background-color: transparent;
    border-color: transparent;
    border-width: 1px;
    border-style: solid;
    box-shadow: none;
}

.primary-toolbar .button:focused,
.header-bar .button:focused {
    border-color: @selected_bg_color;
}

.primary-toolbar .button:active,
.primary-toolbar .button:hover:active,
.primary-toolbar .button:active:focused,
.primary-toolbar .button:checked:active,
.header-bar .button:active,
.header-bar .button:hover:active,
.header-bar .button:active:focused,
.header-bar .button:checked:active {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@dark_bg_color, 0.9)),
                                     to (shade (@dark_bg_color, 1)));
}
.primary-toolbar .button:checked,
.header-bar .button:checked,
.primary-toolbar .button:selected,
.header-bar .button:selected,
.primary-toolbar .button:prelight,
.header-bar .button:prelight,
.primary-toolbar .button:hover,
.header-bar .button:hover {
    background-image: none;
    background-color: alpha(white, 0.12);

    box-shadow: none;

}

.primary-toolbar .button:checked:focused,
.header-bar .button:checked:focused {
    background-color: #626260;
}

.primary-toolbar .button:backdrop,
.header-bar .button:backdrop {
    background-image: none;
    background-color: shade(@dark_bg_color, 1.1);
    color: @backdrop_dark_fg_color;
    border-color: shade(@dark_bg_color, 1.3);
}

.primary-toolbar .button:active:backdrop,
.primary-toolbar .button:checked:backdrop,
.header-bar .button:active:backdrop,
.header-bar .button:checked:backdrop,
.primary-toolbar .button:hover:backdrop,
.header-bar .button:hover:backdrop {
    background-image: none;
    background-color: shade(@dark_bg_color,1.2);
}

.primary-toolbar .button:active,
.header-bar .button:active {
    background-color: rgba(0,0,0,0.2);
}

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

.primary-toolbar .button:insensitive,
.header-bar .button:insensitive {
    background-image: none;
    background-color: transparent;
}

.primary-toolbar .button.flat:insensitive {
    background-image: none;
}

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

.primary-toolbar GtkSeparatorToolItem,
.primary-toolbar .separator,
.primary-toolbar .separator:insensitive,
.header-bar GtkSeparatorToolItem,
.header-bar .separator,
.header-bar .separator:insensitive {
    border-color: alpha (shade (@dark_bg_color, 0.94), 0.35);
    border-bottom-color: alpha (shade (@dark_bg_color, 1.26), 0.5);
    border-right-color: alpha (shade (@dark_bg_color, 1.26), 0.5);

}

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

    border-right-color: shade (@bg_color, 0.86);
    border-bottom-color: shade (@bg_color, 0.88);
    border-left-color: shade (@bg_color, 0.86);

    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (#f2f1ef, 0.93)),
                                     color-stop (0.08, #f2f1ef),
                                     to (#ffffff));
    border-width: 0 1px 1px 1px;
    border-style: solid;
    border-radius: 3px;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    padding: 3px 4px 4px 4px;
}

.inline-toolbar.toolbar .button {
    padding: 4px;

    icon-shadow: 0 1px shade (@bg_color, 1.16);
}

/* Middle button */
.inline-toolbar.toolbar .button,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar .button:focus,
.inline-toolbar.toolbar .button:focus:active,
.inline-toolbar.toolbar .button:insensitive,
.inline-toolbar.toolbar .button:backdrop,
.inline-toolbar.toolbar .button:backdrop:insensitive,
.inline-toolbar.toolbar GtkToolButton .button,
.inline-toolbar.toolbar GtkToolButton .button:active,
.inline-toolbar.toolbar GtkToolButton .button:focus,
.inline-toolbar.toolbar GtkToolButton .button:focus:active,
.inline-toolbar.toolbar GtkToolButton .button:insensitive,
.inline-toolbar.toolbar GtkToolButton .button:backdrop,
.inline-toolbar.toolbar GtkToolButton .button:backdrop:insensitive {
    border-right-width: 0;
    border-left-width: 0;
    border-radius: 0;
}

/* Leftmost button */
.inline-toolbar.toolbar .button:first-child,
.inline-toolbar.toolbar .button:active:first-child,
.inline-toolbar.toolbar .button:focus:first-child,
.inline-toolbar.toolbar .button:focus:active:first-child,
.inline-toolbar.toolbar .button:insensitive:first-child,
.inline-toolbar.toolbar .button:backdrop:first-child,
.inline-toolbar.toolbar .button:backdrop: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:focus,
.inline-toolbar.toolbar GtkToolButton:first-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:first-child .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:first-child .button:backdrop,
.inline-toolbar.toolbar GtkToolButton:first-child .button:backdrop:insensitive {
/*    border-left-width: 1px;
    border-right-width: 0;
*/
    border-radius: 4px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* Rightmost button */
.inline-toolbar.toolbar .button:last-child,
.inline-toolbar.toolbar .button:active:last-child,
.inline-toolbar.toolbar .button:focus:last-child,
.inline-toolbar.toolbar .button:focus:active:last-child,
.inline-toolbar.toolbar .button:insensitive:last-child,
.inline-toolbar.toolbar .button:backdrop:last-child,
.inline-toolbar.toolbar .button:backdrop: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:focus,
.inline-toolbar.toolbar GtkToolButton:last-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:last-child .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:last-child .button:backdrop,
.inline-toolbar.toolbar GtkToolButton:last-child .button:backdrop:insensitive {
    border-radius: 4px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* Single button */
.inline-toolbar.toolbar .button:only-child,
.inline-toolbar.toolbar .button:active:only-child,
.inline-toolbar.toolbar .button:focus:only-child,
.inline-toolbar.toolbar .button:focus:active:only-child,
.inline-toolbar.toolbar .button:insensitive:only-child,
.inline-toolbar.toolbar .button:backdrop:only-child,
.inline-toolbar.toolbar .button:backdrop: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:focus,
.inline-toolbar.toolbar GtkToolButton:only-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:only-child .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:only-child .button:backdrop,
.inline-toolbar.toolbar GtkToolButton:only-child .button:backdrop:insensitive {
    border-radius: 4px;
}

/***********
 * tooltip *
 ***********/
.tooltip {
    background-image: -gtk-gradient (radial, center 0, 0, center 0, 0.8,
                                     from (alpha (mix (@tooltip_bg_color, #ffffff, 0.2), 0.86)),
                                     to (alpha (@tooltip_bg_color, 0.86)));
    border-color: alpha (#ffffff, 0.2);
    border-radius: 4px;
    border-style: solid;
    border-width: 1px;

    color: @tooltip_fg_color;
}

/************
 * treeview *
 ************/
GtkTreeView.dnd {
    border-color: shade (@selected_bg_color, 1.12);
    border-radius: 2px;
    border-width: 1px;
    border-style: solid;
}

GtkTreeView .entry {
    background-image: none;
}

.view row:nth-child(odd) {
    /* zebra stripping, see LP#945430 */
    background-color: shade (@base_color, 0.965);
}

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

/************
 * listbox  *
 ************/
.list-row.button {
    border-image: none;
    border-style: none;
    border-radius: 0;
    background-image: none;
    box-shadow: none;
}

.list-row.button:selected {
    text-shadow: none;
}

/************
 * popover  *
 ************/
.popover {
    background-clip: border-box;

    border-radius: 4px;
    border: 1px solid darker(@bg_color);

    box-shadow: 0 2px 3px @shadow_color;
    margin: 10px;
    padding: 2px;
}

.popover:backdrop {
    box-shadow: none;
}

/* Popover menuitems are actually buttons. The following rules reset most of
 * the button styles for them.
 */
.popover .menuitem,
.popover .menuitem:checked,
.popover .menuitem:hover,
.popover .menuitem:active,
.popover .menuitem:insensitive,
.popover .menuitem:backdrop {
    color: @dark_fg_color;
    border-image: none;
    border: none;
    text-shadow: none;
    border-radius: 3px;
}

.popover .menuitem:backdrop:hover {
    border: none;
    border-image: none;
    background: transparent;
    color: @fg_color;
}

.popover .menuitem:checked,
.popover .menuitem.check,
.popover .menuitem.check:checked,
.popover .menuitem.radio,
.popover .menuitem.radio:checked {
    background-image: none;
    border: none;
}

.popover .menuitem:insensitive,
.popover .menuitem *:insensitive {
    text-shadow: none;
    background: none;
}

/* Floating bars */
.floating-bar {
    background-color: @info_bg_color;
    border-radius: 3px 3px 0 0;
    border-style: solid;
    border-width: 1px;
    border-color: darker (@info_bg_color);
}


/* OSD overlays */
.osd,
.osd:backdrop {
    color: @osd_fg_color;
    background-color: @osd_bg_color;
    border-color: @osd_border_color;
}

.osd.toolbar {
    padding: 12px;
    border-radius: 8px;
}

.osd .button,
.osd .button:backdrop {
    color: @osd_fg_color;
    background: none;
    border: none;
    padding: 12px;
    border-radius: 8px;
    transition: all 100ms ease-in-out;
}

/* buttons that are not part of an osd toolbar need a background */
.button.osd,
.button.osd:hover,
.button.osd:active {
    background: @osd_bg_color;
    padding: 12px;
    box-shadow: none;
    border-image: none;
}

.button.osd:hover,
.osd .button:hover {
    color: lighter(@osd_fg_color);
    icon-shadow: 0 0 3px @osd_fg_color;
}

.button.osd:active,
.osd .button:active {
    color: darker(@osd_fg_color);
    icon-shadow: none;
}

.osd .scale {
    margin-left: 9px;
    margin-right: 9px;
}

/*************
 * overshoot *
 *************/
.overshoot.top {
    background: -gtk-gradient(radial, center top, 0, center top, 0.7, from(shade(@bg_color, 0.92)), to(alpha(@bg_color, 0.0)));
}

.overshoot.right {
    background: -gtk-gradient(radial, right center, 0, right center, 0.7, from(shade(@bg_color, 0.92)), to(alpha(@bg_color, 0.0)));
}

.overshoot.bottom {
    background: -gtk-gradient(radial, center bottom, 0, center bottom, 0.7, from(shade(@bg_color, 0.92)), to(alpha(@bg_color, 0.0)));
}

.overshoot.left {
    background: -gtk-gradient(radial, left center, 0, left center, 0.7, from(shade(@bg_color, 0.92)), to(alpha(@bg_color, 0.0)));
}

/**************
 * undershoot *
 **************/
.undershoot {
    background: none;
}

/*****************************************************************************
 * states [please keep this section at the end of the file (CSS precedence)] *
 *****************************************************************************/
*:insensitive {
    color: shade (@bg_color, 0.6);
    text-shadow: 0 1px alpha (shade (@bg_color, 1.25), 0.5);
}

*:selected,
*:selected:focused {
    background-color: alpha (@selected_bg_color, 0.9);

    color: @selected_fg_color;
}

*:selected:backdrop,
*:selected:focused:backdrop {
    background-color: alpha (@backdrop_selected_bg_color, 0.9);

    color: @backdrop_selected_fg_color;
}

*:link,
*:visited {
    color: #f07746; /* @link_color */
}
