* {
	engine: none;
	padding: 0;
	background-clip: padding-box;
	-GtkButton-child-displacement-x: 1;
	-GtkButton-child-displacement-y: 1;
	-GtkButtonBox-child-min-height: 26;
	-GtkCheckButton-indicator-size: 16;
	-GtkCheckMenuItem-indicator-size: 12;
	-GtkDialog-button-spacing: 4;
	-GtkDialog-action-area-border: 10; /* buttons mate-appearance-properties */
	-GtkExpander-expander-size: 11;
	-GtkMenu-horizontal-padding: 0;
	-GtkMenu-vertical-padding: 0;
	-GtkPaned-handle-size: 1;
	-GtkScrolledWindow-scrollbar-spacing: 0;
	-GtkScrolledWindow-scrollbars-within-bevel: 1;
	-GtkTextView-error-underline-color: @error_color;
	-GtkToolButton-icon-spacing: 4;
	-GtkToolItemGroup-expander-size: 11;
	-GtkTreeView-expander-size: 11;
	-GtkTreeView-horizontal-separator: 4;
	-GtkWidget-focus-padding: 2;
	-GtkWidget-focus-line-width: 0;
	-GtkWindow-resize-grip-width: 13;
	-GtkWindow-resize-grip-height: 13;
	-GtkStatusbar-shadow-type: none;
	-GtkIMHtml-hyperlink-color: @link_color;
	-GtkHTML-link-color: @link_color;
	-WnckTasklist-fade-overlay-rect: 0;
	outline-color: alpha(@theme_text_color, 0.3);
	outline-style: dashed;
	outline-offset: -3px; /* 2px */
	outline-width: 0px; /* disable ugly focus-line */
	outline-radius: 2px;
/*	-gtk-icon-style: regular;*/ /* disable symbolic icons */
}

/***************
 * Base States *
 ***************/

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

.background:backdrop {
	text-shadow: none;
	icon-shadow: none;
}

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

*:selected:backdrop {
	/* I would like to remove colors from the backdrop state, next release*/
	background-color: @theme_unfocused_selected_bg_color;
	color: @theme_unfocused_selected_fg_color;
}

*:insensitive {
	/*background-color: @insensitive_bg_color;*/
	color: @insensitive_fg_color;
	border-color: @insensitive_borders;
}

/* 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: shade(@theme_bg_color, 1.10);
	color: @theme_fg_color;
}

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

.gtkstyle-fallback:insensitive {
	background-color: @insensitive_bg_color;
	color: @insensitive_fg_color;
}

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

GtkImage,
GtkImage:insensitive,
GtkLabel,
GtkLabel:insensitive,
GtkBox,
GtkBox:insensitive,
GtkGrid,
GtkGrid:insensitive {
	background-color: transparent;
}

GtkFlowBox .grid-child {
	padding: 3px;
	border-radius: 3px; 
}

GtkFlowBox .grid-child:selected {
	outline-offset: -2px; 
}

GtkTextView {
	background-color: @theme_base_color; 
}

/************
 * Tooltips *
 ************/
.tooltip,
.tooltip.background {
	padding: 4px;
	border-style: solid;
	border-width: 1px;
	border-color: shade(@theme_tooltip_bg_color, 0.50);
	border-radius: 0px;

	background-color: @theme_tooltip_bg_color;
	color: @theme_tooltip_fg_color;

	text-shadow: none;
}

.tooltip * {
	background-color: transparent;
}

/*********************
 * Spinner Animation *
 *********************/
/* This is could be CPU-intensive */

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

.spinner {
	background-image: none;
	background-color: blue;
	opacity: 0;
	-gtk-icon-source: -gtk-icontheme("process-working-symbolic");
}

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

.button .spinner:active {
	color: @theme_fg_color;
}

/*****************
 * Miscellaneous *
 *****************/
.view.rubberband,
.rubberband {
	background-color: alpha (@theme_selected_bg_color, 0.35);

	border-color: @theme_selected_bg_color;
	border-style: solid;
	border-width: 1px;
	border-radius: 0px;
}

GtkStatusbar .label,
GtkStatusbar .frame.flat {
	color: @theme_fg_color;
	-GtkStatusbar-shadow-type: none;
}

GtkStatusbar .frame.flat {
	padding: 1px;
	border-width: 0;
}

GtkStatusbar .frame.flat .button.flat {
    padding: 0px;
}

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

GtkTreeView.view.separator,
GtkTreeView.separator,
.separator,
.separator:hover {
	color: @view_separators;
	background-color: transparent;
}

.toolbar .separator {
	/*color: @toolbar_separator;*/
	color: transparent;
}

.pane-separator {
	-GtkPaned-handle-size: 1;
	border-width: 0 1px 1px 1px;
	border-style: solid;
	border-color: @borders;
	background-color: @sidebar_bg;
	background-image: url("assets/null.png");
	color: @borders;
}

.pane-separator:hover,
.pane-separator:selected {
	color: @theme_text_color;
}

.notebook .pane-separator,
.notebook .pane-separator:hover {
	background-color: @theme_base_color;
}

/************************
 * overshoot/undershoot *
 ************************/

/* displays at end of mouse scrolling */
.overshoot.top {
    background-image: -gtk-gradient(radial,
                                    center top, 0,
                                    center top, 0.5,
                                    to(@overshoot_bg_color),
                                    to(rgba(158, 179, 137, 0))),
                      -gtk-gradient(radial,
                                    center top, 0,
                                    center top, 0.6,
                                    from(rgba(73, 87, 56, 0.17)),
                                    to(rgba(73, 87, 56, 0)));
    background-size: 100% 5%, 100% 100%;
    background-repeat: no-repeat;
    background-position: center top;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.overshoot.top:backdrop {
    background-image: -gtk-gradient(radial,
                                    center top, 0,
                                    center top, 0.5,
                                    to(@overshoot_backdrop_bg_color),
                                    to(rgba(137, 145, 131, 0)));
    background-size: 100% 5%;
    background-repeat: no-repeat;
    background-position: center top;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.overshoot.bottom {
    background-image: -gtk-gradient(radial,
                                    center bottom, 0,
                                    center bottom, 0.5,
                                    to(@overshoot_bg_color),
                                    to(rgba(158, 179, 137, 0))),
                      -gtk-gradient(radial,
                                    center bottom, 0,
                                    center bottom, 0.6,
                                    from(rgba(73, 87, 56, 0.17)),
                                    to(rgba(73, 87, 56, 0)));
    background-size: 100% 5%, 100% 100%;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.overshoot.bottom:backdrop {
    background-image: -gtk-gradient(radial,
                                    center bottom, 0,
                                    center bottom, 0.5,
                                    to(@overshoot_backdrop_bg_color),
                                    to(rgba(137, 145, 131, 0)));
    background-size: 100% 5%;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.overshoot.left {
    background-image: -gtk-gradient(radial,
                                    left center, 0,
                                    left center, 0.5,
                                    to(@overshoot_bg_color),
                                    to(rgba(158, 179, 137, 0))),
                      -gtk-gradient(radial,
                                    left center, 0,
                                    left center, 0.6,
                                    from(rgba(73, 87, 56, 0.07)),
                                    to(rgba(73, 87, 56, 0)));
    background-size: 5% 100%, 100% 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.overshoot.left:backdrop {
    background-image: -gtk-gradient(radial,
                                    left center, 0,
                                    left center, 0.5,
                                    to(@overshoot_backdrop_bg_color),
                                    to(rgba(137, 145, 131, 0)));
    background-size: 5% 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.overshoot.right {
    background-image: -gtk-gradient(radial,
                                    right center, 0,
                                    right center, 0.5,
                                    to(@overshoot_bg_color),
                                    to(rgba(158, 179, 137, 0))),
                      -gtk-gradient(radial,
                                    right center, 0,
                                    right center, 0.6,
                                    from(rgba(73, 87, 56, 0.07)),
                                    to(rgba(73, 87, 56, 0)));
    background-size: 5% 100%, 100% 100%;
    background-repeat: no-repeat;
    background-position: right center;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.overshoot.right:backdrop {
    background-image: -gtk-gradient(radial,
                                    right center, 0,
                                    right center, 0.5,
                                    to(@overshoot_backdrop_bg_color),
                                    to(rgba(137, 145, 131, 0)));
    background-size: 5% 100%;
    background-repeat: no-repeat;
    background-position: right center;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

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

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

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

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

/****************
 * Text Entries *
 ****************/
.entry {
	border-style: solid;
	padding: 5px 4px 6px; /*4px;*/

	/* border-image defined in the -assets variants */

	color: @entry_text_color;
	background-color: @theme_base_color;
	box-shadow: inset 0px 2px 3px 0px alpha(@theme_fg_color, 0.15);
}

.entry.image.left {
	padding-right: 6px;
}

.entry.flat, .entry.flat:focus {
	padding: 2px;
	background-color: @theme_base_color;
	border-color: @borders;
	border: none;
	border-radius: 0;
}

.entry:focus {
	box-shadow: inset 1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset 1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset -1px -1px alpha(@theme_selected_bg_color, 0.2);
}

.entry.progressbar,
.entry.progressbar:focus {
	margin-left: 2px;
	margin-right: 2px;
	border-image: none;
	border-style: none;
	background-color: transparent;
	background-image: linear-gradient(to top, 
		transparent 2px,
		white 2px,
		white 3px,
		shade(@theme_selected_bg_color, 0.9) 3px,
		shade(@theme_selected_bg_color, 0.9) 5px,
		transparent 5px);
	background-size: auto;
	box-shadow: none;
}

.entry.progressbar.pulse,
.entry.progressbar.pulse:focus {
	background-image: linear-gradient(to top, 
		transparent 2px,
		white 2px,
		white 3px,
		@borders 3px,
		@borders 5px,
		transparent 5px);
}

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

.entry:insensitive {
	color: @insensitive_fg_color;
}

.entry:active {
	color: @theme_unfocused_selected_fg_color;
	background-color: @theme_unfocused_selected_bg_color;
}

.cursor-handle.top,
.cursor-handle.bottom {
	background-color: transparent;
	box-shadow: none;
	border-style: none;
	border-image: none;
	border-radius: 0px;
	border-width: 0px;

	/* background-image in assets */
}

/*******************
 * Symbolic images *
 *******************/
.image {
	color: @internal_element_color;
}

.image:hover {
	color: @internal_element_prelight;
}

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

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

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

/*****************
 * GtkSpinButton *
 *****************/
.spinbutton .button {
	color: @internal_element_color;
	padding: 2px 6px;
	border-width: 0;
	border-radius: 0;
	border-style: none;
	border-image: none;
	box-shadow: inset 1px 0 @inset_dark_color;
}

.spinbutton .button {
	background-color: transparent;
	background-image: none;
}

.spinbutton .button:insensitive {
	color: @internal_element_insensitive;
}

.spinbutton .button:active,
.spinbutton .button:hover {
	color: @internal_element_prelight;
}

.spinbutton .button:first-child {
	border-radius: 3px 0 0 3px;
	box-shadow: none;
}

.spinbutton .button:last-child {
	border-radius: 0 3px 3px 0;
}

.spinbutton .button:dir(rtl) {
	box-shadow: inset -1px 0 @inset_dark_color;
}

/* Add back the glowy effect from the entry covered by the pushed button background*/
.spinbutton .button:active,
.spinbutton .button:active:focus {
	padding: 2px 4px;
	box-shadow: inset 1px 0 @inset_dark_color,
		inset 0 1px alpha(@theme_selected_bg_color, 0.2),
		inset 0 -1px alpha(@theme_selected_bg_color, 0.2);
}

.spinbutton .button:first-child:active,
.spinbutton .button:first-child:active:focus {
	padding: 2px 4px;
	box-shadow: inset 1px 1px alpha(@theme_selected_bg_color, 0.2),
		inset 0 -1px alpha(@theme_selected_bg_color, 0.2);
}

.spinbutton .button:last-child:active,
.spinbutton .button:last-child:active:focus {
	padding: 2px 4px;
	box-shadow: inset 1px 0 @inset_dark_color,
		inset 0 1px alpha(@theme_selected_bg_color, 0.2),
		inset -1px -1px alpha(@theme_selected_bg_color, 0.2);
}

.spinbutton.vertical .button {
	padding: 4px;
	icon-shadow: 0 1px @button_text_shadow;
}

.spinbutton.vertical .button,
.spinbutton.vertical .button:hover {
	padding: 4px;
	color: @theme_fg_color;
}

.spinbutton.vertical .button:insensitive {
	color: @insensitive_fg_color;
}

.spinbutton.vertical .button:active {
	color: @button_active_text;
	icon-shadow: 0 1px @button_active_text_shadow;
}

/* :insensitive:insensitive to override the dark overriden style for
   normal spinbutton buttons, yeah we lack !important */
.spinbutton.vertical .button:insensitive:insensitive {
	icon-shadow: none;
}

.spinbutton.vertical .button,
/* :active:active to override the dark overriden style for
   normal spinbutton buttons, yeah we lack !important */
.spinbutton.vertical .button:active:active {
	box-shadow: none;
}

.spinbutton.vertical .button:first-child,
.spinbutton.vertical .button:active:first-child {
	border-image-width: 3px 3px 0 3px;
	border-width: 2px 1px 0 1px;
	border-bottom-left-radius: 0; 
	border-bottom-right-radius: 0;
	padding: 4px;
}

.spinbutton.vertical .button:last-child,
.spinbutton.vertical .button:active:last-child {
	border-image-width: 0 3px 4px 3px;
	border-width: 0 1px 2px 1px;
	border-top-left-radius: 0; 
	border-top-right-radius: 0;
	padding: 4px;
}

.spinbutton.vertical.entry {
	border-image: none;
	border-color: alpha(@borders, 0.1);
	border-width: 0 1px 0 1px;
	border-style: solid;
	border-radius: 0;
	box-shadow: inset 1px 0 0 0 @borders, 
		inset -1px 0 0 0 @borders,
		inset 0 1px 0 0 @borders,
		inset 0 -1px 0 0 @borders;

	/* I'm using box-shadow as borders, so I need to compensate
	   with padding. Those two values need to be entry padding +1 */
	padding-top: 5px;
	padding-bottom: 5px;
}

.spinbutton.vertical.entry:insensitive {
	border-color: alpha(@borders, 0.1);
	box-shadow: inset 0 1px alpha(@borders, 0.4),
		inset 0 -1px alpha(@borders, 0.4);
}

.spinbutton.vertical.entry:focus {
	border-color: alpha(@borders, 0.1);
	box-shadow: inset 1px 0 0 0 @theme_selected_bg_color, 
		inset -1px 0 0 0 @theme_selected_bg_color,
		inset 0 1px 0 0 @theme_selected_bg_color,
		inset 0 -1px 0 0 @theme_selected_bg_color;
}

/*****************
 * Color Chooser *
 *****************/
GtkColorSwatch,
GtkColorSwatch:selected {
	border-width: 1px;
	border-style: solid;
	border-radius: 1px;
	border-color: alpha(black, 0.3);
	box-shadow: inset 0 2px alpha(black, 0.07),
		inset 1px 1px alpha(black, 0.07);

	background-color: transparent;
	background-clip: border-box;
}

GtkColorSwatch:hover,
GtkColorSwatch:selected:hover {
	border-color: alpha(black, 0.45);
}

GtkColorSwatch.color-dark:hover {
	background-image: linear-gradient(to bottom,
		alpha(white, 0) 40%,
		alpha(white, 0.3)
		);
}

GtkColorSwatch.color-light:hover {
	background-image: linear-gradient(to top,
		alpha(black, 0) 40%,
		alpha(black, 0.1)
		);
}

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

GtkColorSwatch.left,
GtkColorSwatch:first-child {
	border-top-left-radius: 6px;
	border-bottom-left-radius: 6px;
}

GtkColorSwatch.right,
GtkColorSwatch:last-child {
	border-top-right-radius: 6px;
	border-bottom-right-radius: 6px;
}

GtkColorSwatch:only-child {
	border-radius: 6px;
}

GtkColorSwatch.top {
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
}

GtkColorSwatch.bottom {
	border-bottom-left-radius: 6px;
	border-bottom-right-radius: 6px;
}

GtkColorChooserWidget #add-color-button {
	background-clip: padding-box;
	border-color: mix(@borders, @theme_bg_color, 0.3);
	background-color: mix(@borders, @theme_bg_color, 0.3);
	color: @theme_base_color;
	box-shadow: none;
}

GtkColorChooserWidget #add-color-button:hover {
	border-color: @borders;
	background-color: @borders;
	color: @theme_base_color;
}

.color-active-badge,
.color-active-badge:selected {
	border-style: solid;
	border-width: 2px;
	background-color: transparent;
}

.color-active-badge.color-light,
.color-active-badge.color-light:hover {
	border-color: #444444;
	color: #444444;
}

.color-active-badge.color-dark,
.color-active-badge.color-dark:hover {
	border-color: #cccccc;
	color: #cccccc;
}

GtkColorEditor GtkColorSwatch {
	border-radius: 6px;
}

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

GtkColorButton.button {
	padding: 1px 20px;
}

/****************
 * Progress bar *
 ****************/

GtkProgressBar {
	/* FIXME - Not working 3.14 */
	-GtkProgressBar-min-horizontal-bar-height: 16;
	-GtkProgressBar-min-vertical-bar-width: 16;
	border-radius: 16px;
	padding: 0 0 1px 0;
	font-size: smaller;
}

/* progress component */
.progressbar,
.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focus {
	border-radius: 16px;
	border-width: 1px;
	border-style: solid;
	border-color: @progressbar_border;
}

.progressbar row:selected,
.progressbar row:selected:focus {
	border-color: shade(@progressbar_border, 0.85);
}

/* for progressbars in cell renderers */
.trough row {
	padding: 0;
}

.trough row:selected,
.trough row:selected:focus {
	background-image: linear-gradient(to bottom,
		mix(@trough_bg_color_a, @theme_selected_bg_color, 0.25),
		mix(@trough_bg_color_b, @theme_selected_bg_color, 0.25)
		);
}

/****************
 * Level Bar *
 ****************/

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;
	border-radius: 2px;
	background-image: linear-gradient(to bottom,
		@trough_bg_color_a,
		@trough_bg_color_b);
	background-color: transparent;
	box-shadow: none;
}


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

	border-color: @progressbar_border;
	background-image: linear-gradient(to bottom,
		@progressbar_background_a,
		@progressbar_background_b);
}

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

.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_color, 0.80);
	background-image: linear-gradient(to bottom,
		shade(@warning_color, 1.3),
		@warning_color 75%,
		shade(@warning_color, 0.90));
}

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

/************
 * GtkScale *
 ************/

.scale {
	-GtkScale-slider-length: 16;
	-GtkRange-slider-width: 16;
	-GtkRange-trough-border: 0;
}

.scale.slider,
.scale.slider:hover,
.scale.slider:insensitive {
	border-radius: 0;
	border-style: none;

	background-color: transparent;

	/* background-image in -assets variant */
}

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

.scale.trough {
	margin: 6px 0;
	border-radius: 6px;
}

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

.scale.trough,
.scale.trough.highlight {
	border-color: alpha(@theme_base_color, 0.0);
	border-top: 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 1px;
}

.scale.trough.vertical,
.scale.trough.highlight.vertical {
	border-color: alpha(@theme_base_color, 0.0);
	border-top: 0;
	border-left: 0;
	border-right: 1px;
	border-bottom: 0;
}

.scale.trough,
.scale.trough.vertical {
	border-color: @borders;
}

.scale.trough.highlight,
.scale.trough.highlight.vertical {
	border-color: @scale_highlight_border;
}

.scale.trough:insensitive,
.scale.trough.highlight:insensitive,
.scale.trough.vertical:insensitive,
.scale.trough.highlight.vertical:insensitive {
	background-color: shade(@insensitive_bg_color, 0.96);
	border-color: shade(@insensitive_scale_borders, 1.0);
	box-shadow: none;
	background-image: none;
}

.scale.trough.highlight,
.scale.trough.vertical.highlight {
	background-image: none;
	background-color: @scale_highlight_bg;
}

.scale.progressbar {
	background-color: @scale_progress_fill;
}

.scale.mark.separator {
	/* defines the color of the actuall marks on the scale */
	color: alpha(@theme_fg_color, 0.3);
}

.scale.trough {
	box-shadow: inset 0 1px shade(@theme_bg_color, 0.85),
		inset 0 -1px alpha(@theme_base_color, 0.4);
}

.scale.trough.vertical {
	box-shadow: inset 1px 0 shade(@theme_bg_color, 0.85),
		inset -1px 0 alpha(@theme_base_color, 0.4);
}

.scale.trough.highlight {
	box-shadow: inset 0 1px alpha(@theme_base_color, 0.2),
		inset 0 -1px shade(@theme_selected_bg_color, 0.7);
}

.scale.trough.vertical.highlight {
	box-shadow: inset 1px 0 alpha(@theme_base_color, 0.2),
		inset -1px 0 shade(@theme_selected_bg_color, 0.7);
}

/**********
 * Frames *
 **********/
.frame {
	border-width: 1px;
	border-color: @borders;
	border-style: solid;
	padding: 0;
}

.frame.flat {
	border-style: none; 
}

.frame.action-bar {
	padding: 6px;
	border-width: 1px 0 0; 
}

GtkScrolledWindow.frame {
    -gtk-icon-style: regular;
	border-style: solid;
	border-color: @borders;
	border-width: 1px;
	border-radius: 2px;
	padding: 0;
}

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

/***********
 * Buttons *
 ***********/
.button,
.button.menuitem.menubar,
GtkColorButton.button,
GtkComboBox.combobox-entry .button {
    -gtk-icon-style: regular;
	padding: 4px;
}

GtkToggleButton.button {
	padding: 3px 4px;
}

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

.button {
	transition: all 400ms ease-out;
	-GtkButton-image-spacing: 4;
	-GtkButton-interior-focus: true;
	-GtkButton-default-border: 0;
	-GtkButton-inner-border: 3;
	-GtkArrow-arrow-scaling: 0.5;

	border-style: solid;
	border-color: transparent;

	text-shadow: 0 1px @button_text_shadow;
}

.button.default {
	text-shadow: none;
	color: @theme_fg_color;
}

.button.flat {
	border-color: transparent;
	background-color: transparent;
	background-image: none;
	box-shadow: inset 0 1px rgba(255,255,255,0), 0 1px rgba(255,255,255,0);
	text-shadow: none;
	icon-shadow: none;
	border-image: none; 
}

.button.flat:hover {
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                                      @button_gradient_color_a,
                                      @button_gradient_color_b);
	border-radius: 1px;
}

.button.image-button.circular-button {
   border-image: none;
   border-width: 1px;
   border-style: solid;
   border-color: @borders;
}

/* We may want a background for focused buttons, but in the meantime let's remove it too */
.primary-toolbar .button,
.primary-toolbar .button:insensitive,
.primary-toolbar .button *:insensitive {
	background-image: none;
	background-color: transparent;
}

/* Remove borders from primary toolbar buttons*/
.primary-toolbar .button {
	border-image: none;

	/* setting border-style: none; here would override the border-width values 
	 * we set in gtk-widget-borders.css to zero.
	 */
	border-style: solid;
	border-width: 2px;
	border-color: transparent;

	text-shadow: 0 1px @button_text_shadow;
}

.primary-toolbar .button:active,
.inline-toolbar .button:active,
.button:active,
.primary-toolbar .button:checked,
.inline-toolbar .button:checked,
.button:checked {
	color: @button_active_text;
	text-shadow: 0 1px @button_active_text_shadow;
}

.button:insensitive,
.button:active *:insensitive,
.button:checked *:insensitive {
	color: @insensitive_fg_color;
	text-shadow: none;
}

.toolbar .button.raised,
.toolbar .raised .button,
.inline-toolbar .button {
	icon-shadow: 0 1px @button_text_shadow;
	text-shadow: 0 1px @button_text_shadow;
}

.toolbar .button.raised:active,
.toolbar .raised .button:active,
.inline-toolbar .button:active
.toolbar .button.raised:checked,
.toolbar .raised .button:checked,
.inline-toolbar .button:checked {
	icon-shadow: 0 1px @button_active_text_shadow;
	text-shadow: 0 1px @button_active_text_shadow;
}

.toolbar .button.raised:insensitive,
.toolbar .raised .button:insensitive,
.inline-toolbar .button:insensitive {
	icon-shadow: none;
	text-shadow: none;
}

/* linked entries/buttons */

/* Set up shadows and hilights for button visual separation */
.linked .entry {
	box-shadow: inset -1px 0 @inset_dark_color;
}

.linked .entry:focus {
	box-shadow: inset 1px 0 @inset_dark_color,
		inset -1px 0 @inset_dark_color,
		inset 1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset 1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset -1px -1px alpha(@theme_selected_bg_color, 0.2);

}

.linked .entry:focus:first-child {
	box-shadow: inset -1px 0 @inset_dark_color,
		inset 1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset 1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset -1px -1px alpha(@theme_selected_bg_color, 0.2);

}

.linked .entry:focus:last-child {
	box-shadow: inset 1px 0 @inset_dark_color,
		inset 1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset 1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset -1px -1px alpha(@theme_selected_bg_color, 0.2);

}

/* Set up shadows and hilights for button visual separation */
.linked .button,
.toolbar .button.raised.linked,
.toolbar .raised.linked .button,
.inline-toolbar.toolbar .button,
.inline-toolbar.toolbar GtkToolButton > .button {
	box-shadow: inset 1px 0 @inset_light_color, inset -1px 0 @inset_dark_color;
}

.linked .button:first-child,
.toolbar .button.raised.linked:first-child,
.toolbar .raised.linked .button:first-child,
.inline-toolbar.toolbar .button:first-child,
.inline-toolbar.toolbar GtkToolButton:first-child > .button {
	box-shadow: inset -1px 0 @inset_dark_color;
}

.linked .button:last-child,
.toolbar .button.raised.linked:last-child,
.toolbar .raised.linked .button:last-child,
.inline-toolbar.toolbar .button:last-child,
.inline-toolbar.toolbar GtkToolButton:last-child > .button {
	box-shadow: inset 1px 0 @inset_light_color;
}

.linked .button:active,
.toolbar .button.raised.linked:active,
.toolbar .raised.linked .button:active,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar GtkToolButton > .button:active,
.linked .button:checked,
.toolbar .button.raised.linked:checked,
.toolbar .raised.linked .button:checked,
.inline-toolbar.toolbar .button:checked,
.inline-toolbar.toolbar GtkToolButton > .button:checked {
	box-shadow: inset 1px 0 @inset_dark_color;
}

.linked .button:insensitive,
.toolbar .button.raised.linked:insensitive,
.toolbar .raised.linked .button:insensitive,
.inline-toolbar.toolbar .button:insensitive,
.inline-toolbar.toolbar GtkToolButton > .button:insensitive {
	box-shadow: inset -1px 0 @inset_dark_color;
}

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

/* remove inset from first-child and only-child active buttons */
.linked .button:only-child:active,
.toolbar .button.raised.linked:only-child:active,
.toolbar .raised.linked .button:only-child:active,
.inline-toolbar.toolbar .button:only-child:active,
.inline-toolbar.toolbar GtkToolButton > .button:only-child:active,
.linked .button:first-child:active,
.toolbar .button.raised.linked:first-child:active,
.toolbar .raised.linked .button:first-child:active,
.inline-toolbar.toolbar .button:first-child:active,
.inline-toolbar.toolbar GtkToolButton > .button:first-child:active,
.linked .button:only-child:checked,
.toolbar .button.raised.linked:only-child:checked,
.toolbar .raised.linked .button:only-child:checked,
.inline-toolbar.toolbar .button:only-child:checked,
.inline-toolbar.toolbar GtkToolButton > .button:only-child:checked,
.linked .button:first-child:checked,
.toolbar .button.raised.linked:first-child:checked,
.toolbar .raised.linked .button:first-child:checked,
.inline-toolbar.toolbar .button:first-child:checked,
.inline-toolbar.toolbar GtkToolButton > .button:first-child:checked {
	box-shadow: inset 0 1px 1px alpha(black, 0.1);
}

/* Middle button */
.linked .entry,
.linked > GtkComboBox > .button:last-child,
.linked > GtkComboBox > .button:focus:last-child,
.linked > GtkComboBox > .button:insensitive:last-child,
.linked > GtkComboBox > .button:active:last-child,
.linked > GtkComboBox > .button:focus:active:last-child,
.linked > GtkComboBox > .button:checked:last-child,
.linked > GtkComboBox > .button:focus:checked:last-child,
.linked > GtkComboBox > .button:hover:last-child,
.linked > GtkComboBox > .button:active:hover:last-child,
.linked > GtkComboBox > .button:checked:hover:last-child,
.linked .button,
.linked .button:hover, /* gtk-widget-factory middle page button */
.linked .button:active,
.linked .button:active:hover,
.linked .button:checked,
.linked .button:checked:checked, /* gtk-widget-factory middle page button */
.linked .button:checked:hover,
.linked .button:insensitive {
	border-right-width: 0;
	border-left-width: 0;
	border-image-width: 3px 0 4px 0;
	border-radius: 0;
}

/* Leftmost button */
.linked .entry:first-child,
.linked > GtkComboBox:first-child > .button:last-child,
.linked > GtkComboBox:first-child > .button:focus:last-child,
.linked > GtkComboBox:first-child > .button:insensitive:last-child,
.linked > GtkComboBox:first-child > .button:active:last-child,
.linked > GtkComboBox:first-child > .button:focus:active:last-child,
.linked > GtkComboBox:first-child > .button:checked:first-child:last-child,
.linked > GtkComboBox:first-child > .button:focus:checked:first-child:last-child,
.linked > GtkComboBox:first-child > .button:hover:first-child:last-child,
.linked > GtkComboBox:first-child > .button:active:hover:last-child,
.linked > GtkComboBox:first-child > .button:checked:hover:last-child,
.linked .button:first-child,
.linked .button:active:first-child,
.linked .button:active:hover:first-child,
.linked .button:checked:first-child,
.linked .button:checked:hover:first-child,
.linked .button:insensitive:first-child {
	border-right-width: 0;
	border-left-width: 2px;
	border-image-width: 3px 0 4px 4px;
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
}

/* Rightmost button */
.linked .entry:last-child,
.linked > GtkComboBox:last-child > .button,
.linked > GtkComboBox:last-child > .button:last-child,
.linked > GtkComboBox:last-child > .button:insensitive:last-child,
.linked > GtkComboBox:last-child > .button:active:last-child,
.linked > GtkComboBox:last-child > .button:focus:active:last-child,
.linked > GtkComboBox:last-child > .button:checked:last-child,
.linked > GtkComboBox:last-child > .button:focus:checked:last-child,
.linked > GtkComboBox:last-child > .button:hover:last-child,
.linked > GtkComboBox:last-child > .button:active:hover:last-child,
.linked > GtkComboBox:last-child > .button:checked:hover:last-child,
.linked .button:last-child,
.linked .button:active:last-child,
.linked .button:active:hover:last-child,
.linked .button:checked:last-child,
.linked .button:checked:hover:last-child,
.linked .button:insensitive:last-child {
	border-right-width: 2px;
	border-left-width: 0;
	border-image-width: 3px 4px 4px 0;
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
}

/* Linked single button */
.linked .entry:only-child,
.linked > GtkComboBox:only-child > .button,
.linked > GtkComboBox:only-child > .button:only-child,
.linked > GtkComboBox:only-child > .button:insensitive:only-child,
.linked > GtkComboBox:only-child > .button:hover:only-child,
.linked > GtkComboBox:only-child > .button:active:only-child,
.linked > GtkComboBox:only-child > .button:active:hover:only-child,
.linked > GtkComboBox:only-child > .button:focus:active:only-child,
.linked > GtkComboBox:only-child > .button:checked:only-child,
.linked > GtkComboBox:only-child > .button:checked:hover:only-child,
.linked > GtkComboBox:only-child > .button:focus:checked:only-child,
.linked .button:only-child,
.linked .button:active:only-child,
.linked .button:active:hover:only-child,
.linked .button:checked:only-child,
.linked .button:checked:hover:only-child,
.linked .button:insensitive:only-child {
	border-right-width: 1px;
	border-left-width: 1px;
	border-image-width: 3px 4px 4px 4px;
	border-radius: 3px;
}

/* Middle button (vertical) */
.linked.vertical > GtkComboBox > .button:last-child,
.linked.vertical > GtkComboBox > .button:focus:last-child,
.linked.vertical > GtkComboBox > .button:insensitive:last-child,
.linked.vertical > GtkComboBox > .button:active:last-child,
.linked.vertical > GtkComboBox > .button:focus:active:last-child,
.linked.vertical > GtkComboBox > .button:checked:last-child,
.linked.vertical > GtkComboBox > .button:focus:checked:last-child,
.linked.vertical > GtkComboBox > .button:hover:last-child,
.linked.vertical > GtkComboBox > .button:active:hover:last-child,
.linked.vertical > GtkComboBox > .button:checked:hover:last-child,
.linked.vertical .entry,
.linked.vertical .button,
.linked.vertical .button:active,
.linked.vertical .button:active:hover,
.linked.vertical .button:checked,
.linked.vertical .button:checked:hover,
.linked.vertical .button:insensitive {
	border-top-width: 0px;
	border-bottom-width: 0px;
	border-right-width: 1px;
	border-left-width: 1px;
	border-image-width: 0 4px;
	border-radius: 0;
}

/* Top button (vertical) */
.linked.vertical > GtkComboBox:first-child > .button:last-child,
.linked.vertical > GtkComboBox:first-child > .button:focus:last-child,
.linked.vertical > GtkComboBox:first-child > .button:insensitive:last-child,
.linked.vertical > GtkComboBox:first-child > .button:active:last-child,
.linked.vertical > GtkComboBox:first-child > .button:focus:active:last-child,
.linked.vertical > GtkComboBox:first-child > .button:checked:first-child:last-child,
.linked.vertical > GtkComboBox:first-child > .button:focus:checked:first-child:last-child,
.linked.vertical > GtkComboBox:first-child > .button:hover:first-child:last-child,
.linked.vertical > GtkComboBox:first-child > .button:active:hover:last-child,
.linked.vertical > GtkComboBox:first-child > .button:checked:hover:last-child,
.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:checked:first-child,
.linked.vertical .button:checked:hover:first-child,
.linked.vertical .button:insensitive:first-child {
	border-bottom-width: 0px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-left-width: 1px;
	border-image-width: 3px 4px 0 4px;
	border-radius: 4px 4px 0 0;
}

/* Bottom button (vertical) */
.linked.vertical > GtkComboBox:last-child > .button,
.linked.vertical > GtkComboBox:last-child > .button:last-child,
.linked.vertical > GtkComboBox:last-child > .button:insensitive:last-child,
.linked.vertical > GtkComboBox:last-child > .button:active:last-child,
.linked.vertical > GtkComboBox:last-child > .button:focus:active:last-child,
.linked.vertical > GtkComboBox:last-child > .button:checked:last-child,
.linked.vertical > GtkComboBox:last-child > .button:focus:checked:last-child,
.linked.vertical > GtkComboBox:last-child > .button:hover:last-child,
.linked.vertical > GtkComboBox:last-child > .button:active:hover:last-child,
.linked.vertical > GtkComboBox:last-child > .button:checked:hover:last-child,
.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:checked:last-child,
.linked.vertical .button:checked:hover:last-child,
.linked.vertical .button:insensitive:last-child {
	border-top-width: 0px;
	border-bottom-width: 1px;
	border-right-width: 1px;
	border-left-width: 1px;
	border-image-width: 0 4px 4px 4px;
	border-radius: 0 0 4px 4px;
}

/* Linked single button (vertical) */
.linked.vertical > GtkComboBox:only-child > .button,
.linked.vertical > GtkComboBox:only-child > .button:only-child,
.linked.vertical > GtkComboBox:only-child > .button:insensitive:only-child,
.linked.vertical > GtkComboBox:only-child > .button:hover:only-child,
.linked.vertical > GtkComboBox:only-child > .button:active:only-child,
.linked.vertical > GtkComboBox:only-child > .button:active:hover:only-child,
.linked.vertical > GtkComboBox:only-child > .button:focus:active:only-child,
.linked.vertical > GtkComboBox:only-child > .button:checked:only-child,
.linked.vertical > GtkComboBox:only-child > .button:checked:hover:only-child,
.linked.vertical > GtkComboBox:only-child > .button:focus:checked:only-child,
.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:checked:only-child,
.linked.vertical .button:checked:hover:only-child,
.linked.vertical .button:insensitive:only-child {
	border-width: 1px;
	border-image-width: 3px 4px 4px 4px;
	border-radius: 4px;
}

/* Linked button shadows (vertical) */
.linked.vertical .button,
.inline-toolbar.toolbar.vertical .button,
.inline-toolbar.toolbar.vertical GtkToolButton > .button {
	box-shadow: inset 0 1px @inset_light_color, inset 0 -1px @inset_dark_color;
}

.linked.vertical .button:first-child,
.inline-toolbar.toolbar.vertical .button:first-child,
.inline-toolbar.toolbar.vertical GtkToolButton:first-child > .button {
	box-shadow: inset 0 -1px @inset_dark_color;
}

.linked.vertical .button:last-child,
.inline-toolbar.toolbar.vertical .button:last-child,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button {
	box-shadow: inset 0 -1px @inset_light_color;
}

.linked.vertical .button:active,
.linked.vertical .button:checked,
.inline-toolbar.toolbar.vertical .button:active,
.inline-toolbar.toolbar.vertical .button:checked,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:checked {
	box-shadow: inset 0 1px @inset_dark_color, inset 0 -1px @inset_dark_color;
}

.linked.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:insensitive {
	box-shadow: inset 0 -1px @inset_dark_color;
}

.linked.vertical .button:only-child,
.linked.vertical .button:insensitive:last-child,
.inline-toolbar.toolbar.vertical .button:insensitive:last-child,
.inline-toolbar.toolbar.vertical .button:only-child,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button {
	box-shadow: none;
}

/* remove shadows from linked menu buttons */
.linked GtkMenuButton.menu-button:active,
.toolbar GtkMenuButton.menu-button.raised.linked:active,
.toolbar .raised.linked GtkMenuButton.menu-button:active,
.inline-toolbar.toolbar GtkMenuButton.menu-button:active,
.inline-toolbar.toolbar GtkToolButton > GtkMenuButton.menu-button:active {
	box-shadow: none;
}

/* Linked buttons on primary toolbars */

/* Middle button */
.primary-toolbar .button.raised.linked,
.primary-toolbar .button.raised.linked:active,
.primary-toolbar .button.raised.linked:checked,
.primary-toolbar .button.raised.linked:insensitive,
.primary-toolbar .linked .entry,
.primary-toolbar .linked .button,
.primary-toolbar .linked .button:active,
.primary-toolbar .linked .button:checked,
.primary-toolbar .linked .button:insensitive,
.inline-toolbar.toolbar .button,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar .button:checked,
.inline-toolbar.toolbar .button:insensitive,
.inline-toolbar.toolbar GtkToolButton > .button,
.inline-toolbar.toolbar GtkToolButton > .button:active,
.inline-toolbar.toolbar GtkToolButton > .button:checked,
.inline-toolbar.toolbar GtkToolButton > .button:insensitive {
	border-right-width: 0;
	border-left-width: 0;
	border-image-width: 3px 0 4px 0;
	border-radius: 0;
}

/* Leftmost button */
.primary-toolbar .button.raised.linked:first-child,
.primary-toolbar .button.raised.linked:active:first-child,
.primary-toolbar .button.raised.linked:checked:first-child,
.primary-toolbar .button.raised.linked:insensitive:first-child,
.primary-toolbar .linked .entry:first-child,
.primary-toolbar .linked .button:first-child,
.primary-toolbar .linked .button:active:first-child,
.primary-toolbar .linked .button:checked:first-child,
.primary-toolbar .linked .button:insensitive:first-child,
.inline-toolbar.toolbar .button:first-child,
.inline-toolbar.toolbar .button:active:first-child,
.inline-toolbar.toolbar .button:checked: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:checked,
.inline-toolbar.toolbar GtkToolButton:first-child > .button:insensitive {
	border-left-width: 2px;
	border-right-width: 0;
	border-image-width: 3px 0 4px 3px;
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
}

/* Rightmost button */
.primary-toolbar .button.raised.linked:last-child,
.primary-toolbar .button.raised.linked:active:last-child,
.primary-toolbar .button.raised.linked:checked:last-child,
.primary-toolbar .button.raised.linked:insensitive:last-child,
.primary-toolbar .linked .entry:last-child,
.primary-toolbar .linked .button:last-child,
.primary-toolbar .linked .button:active:last-child,
.primary-toolbar .linked .button:checked:last-child,
.primary-toolbar .linked .button:insensitive:last-child,
.inline-toolbar.toolbar .button:last-child,
.inline-toolbar.toolbar .button:active:last-child,
.inline-toolbar.toolbar .button:checked: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:checked,
.inline-toolbar.toolbar GtkToolButton:last-child > .button:insensitive {
	border-left-width: 0;
	border-right-width: 2px;
	border-image-width: 3px 3px 4px 0;
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
	box-shadow: none;
}

/* Single button */
.inline-toolbar.toolbar .button:only-child,
.inline-toolbar.toolbar .button:active:only-child,
.inline-toolbar.toolbar .button:checked: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:checked,
.inline-toolbar.toolbar GtkToolButton:only-child > .button:insensitive {
	border-right-width: 2px;
	border-left-width: 2px;
	border-image-width: 3px 3px 4px 3px;
	border-radius: 4px;
}

/* Special-case GtkMenuToolButton, since it's a GtkToolButton, but it
 * has a box inside to pack the button and the actual menu */
.inline-toolbar.toolbar GtkMenuToolButton .button:first-child,
.inline-toolbar.toolbar GtkMenuToolButton .button:active:first-child,
.inline-toolbar.toolbar GtkMenuToolButton .button:checked:first-child,
.inline-toolbar.toolbar GtkMenuToolButton .button:insensitive:first-child,
.inline-toolbar.toolbar GtkMenuToolButton .button:last-child,
.inline-toolbar.toolbar GtkMenuToolButton .button:active:last-child,
.inline-toolbar.toolbar GtkMenuToolButton .button:checked:last-child,
.inline-toolbar.toolbar GtkMenuToolButton .button:insensitive:last-child {
	border-right-width: 0;
	border-left-width: 0;
	border-image-width: 3px 0 4px 0;
	border-radius: 0;
}

.inline-toolbar.toolbar GtkMenuToolButton:first-child .button:first-child,
.inline-toolbar.toolbar GtkMenuToolButton:first-child .button:active:first-child,
.inline-toolbar.toolbar GtkMenuToolButton:first-child .button:checked:first-child,
.inline-toolbar.toolbar GtkMenuToolButton:first-child .button:insensitive:first-child {
	border-left-width: 2px;
	border-right-width: 0;
	border-image-width: 3px 0 3px 3px;
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
}

.inline-toolbar.toolbar GtkMenuToolButton:last-child .button:last-child,
.inline-toolbar.toolbar GtkMenuToolButton:last-child .button:active:last-child,
.inline-toolbar.toolbar GtkMenuToolButton:last-child .button:checked:last-child,
.inline-toolbar.toolbar GtkMenuToolButton:last-child .button:insensitive:last-child {
	border-left-width: 0;
	border-right-width: 2px;
	border-image-width: 3px 3px 4px 0;
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
}

/* Vertical inline toolbars */

/* Middle button */
.inline-toolbar.toolbar.vertical .button,
.inline-toolbar.toolbar.vertical .button:active,
.inline-toolbar.toolbar.vertical .button:checked,
.inline-toolbar.toolbar.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton > .button,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:checked,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:insensitive {
	border-bottom-width: 0;
	border-top-width: 0;
	border-image-width: 0 3px 0 3px;
	border-radius: 0;
}

/* Topmost button */
.inline-toolbar.toolbar.vertical .button:first-child,
.inline-toolbar.toolbar.vertical .button:active:first-child,
.inline-toolbar.toolbar.vertical .button:checked:first-child,
.inline-toolbar.toolbar.vertical .button:insensitive:first-child,
.inline-toolbar.toolbar.vertical GtkToolButton:first-child > .button,
.inline-toolbar.toolbar.vertical GtkToolButton:first-child > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton:first-child > .button:checked,
.inline-toolbar.toolbar.vertical GtkToolButton:first-child > .button:insensitive {
	border-width: 1px 1px 0 1px;
	border-image-width: 3px 3px 0 3px;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

/* Bottommost button */
.inline-toolbar.toolbar.vertical .button:last-child,
.inline-toolbar.toolbar.vertical .button:active:last-child,
.inline-toolbar.toolbar.vertical .button:checked:last-child,
.inline-toolbar.toolbar.vertical .button:insensitive:last-child,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:checked,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:insensitive {
	border-width: 0 1px 2px 1px;
	border-image-width: 0 3px 4px 3px;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

/* Single button */
.inline-toolbar.toolbar.vertical .button:only-child,
.inline-toolbar.toolbar.vertical .button:active:only-child,
.inline-toolbar.toolbar.vertical .button:checked:only-child,
.inline-toolbar.toolbar.vertical .button:insensitive:only-child,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:checked,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:insensitive {
	border-top-width: 1px;
	border-bottom-width: 2px;
	border-image-width: 3px 3px 3px 4px;
	border-radius: 3px;
}

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

GtkLinkButton.button,
GtkLinkButton.button:hover,
GtkLinkButton.button:active,
GtkLinkButton.button:active:hover {
    transition: all 400ms ease-in;
    text-shadow: none;
}

.button .separator { 
	color: shade(@internal_element_color, 1.30);
}

/* Stack switcher */
.stack-switcher > .button > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
.titlebar .stack-switcher > .button.titlebutton > GtkLabel,
GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
	padding-left: 6px;
	padding-right: 6px; 
}
.stack-switcher > .button > GtkImage, .header-bar .stack-switcher > .button.titlebutton > GtkImage,
.titlebar .stack-switcher > .button.titlebutton > GtkImage,
GtkCalendar.header .stack-switcher > .button.titlebutton > GtkImage {
	padding-left: 6px;
	padding-right: 6px;
	padding-top: 3px;
	padding-bottom: 3px; 
}
.stack-switcher > .button.text-button {
	padding: 5px 10px 6px; 
}
.stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button,
.titlebar .stack-switcher > .titlebutton.button,
GtkCalendar.header .stack-switcher > .titlebutton.button {
	padding: 5px 2px;
}
.stack-switcher > .button.needs-attention > GtkLabel, .stack-switcher > .button.needs-attention > GtkImage {
	animation: needs_attention 150ms ease-in;
	background-color: @theme_bg_color; /* FIXME: ? */
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	background-position: right 3px, right 4px; 
}
.stack-switcher > .button.needs-attention > GtkLabel:backdrop, .stack-switcher > .button.needs-attention > GtkImage:backdrop {
	background-size: 6px 6px, 0 0; 
}
.stack-switcher > .button.needs-attention > GtkLabel:dir(rtl), .stack-switcher > .button.needs-attention > GtkImage:dir(rtl) {
	background-position: left 3px, left 4px; 
}
.stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > GtkLabel, .stack-switcher > .button.needs-attention:checked > GtkImage {
	animation: none;
	background-image: none; 
}

/*****************
 * Notebooks and *
 * tabs          *
 *****************/
.notebook {
    padding: 0;
    background-clip: border-box;
    border-style: solid;
    border-color: @borders;
    border-width: 0px;
    background-color: shade (@theme_bg_color, 1.1);
    -GtkNotebook-initial-gap: 0;
    -GtkNotebook-arrow-spacing: 5;
    -GtkNotebook-tab-curvature: 0;
    -GtkNotebook-tab-overlap: 0;
    -GtkNotebook-has-tab-gap: false;
    -GtkWidget-focus-padding: 0;
    -GtkWidget-focus-line-width: 0;
}

.notebook :hover {
    -gtk-image-effect: highlight;
    color: @theme_fg_color;
}

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

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

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

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

.notebook.header {
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 0.96),
                                      shade(@theme_bg_color, 1.0));
    border-width: 0px;
    box-shadow: inset 0 1px 0 0 alpha(@borders, 0.4), inset 0 -1px 0 0 alpha(@borders, 1.0);
}

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

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

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

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

.notebook GtkViewport {
    background-color: @theme_base_color;
    border-width: 0px;
}

.notebook tab {
    border-color: transparent;
    border-width: 0px;
    background-image: none;
    background-color: transparent;
}

.notebook tab GtkLabel {
    color: mix (@theme_fg_color, @theme_bg_color, 0.40);
    font-weight: normal;
}

.notebook .prelight-page,
.notebook .prelight-page GtkLabel {
    color: mix (@theme_fg_color, @theme_bg_color, 0.15);
}

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

/* horizontal tabs */

.notebook tab.top,
/* wtf, why this doesn't work? */
.notebook tab.bottom {
    padding: 6px 21px 4px;
}

/* workaround for wtf */
.notebook tab.bottom:active {
    padding: 3px 21px 7px 21px;
}

.notebook tab.top:active,
.notebook tab.top:active:hover {
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.18),
                                      shade(@theme_bg_color, 1.1));
    border-radius: 4px 4px 0px 0px;
    border-width: 1px 1px 0px 1px;
    border-style: solid;
    border-color: @borders;
    box-shadow: none;
}

.notebook tab.top:hover {
    background-image: linear-gradient(to bottom,
                                      alpha(@theme_base_color, 0.0),
                                      alpha(@theme_base_color, 0.3));
    border-radius: 0px;
    border-width: 0px 1px 0px 1px;
    border-style: solid;
    border-color: @borders;
}

.notebook tab.bottom:active,
.notebook tab.bottom:active:hover {
    background-image: linear-gradient(to top,
                                      shade(@theme_bg_color, 1.18),
                                      shade(@theme_bg_color, 1.1));
    border-radius: 0 0 4px 4px;
    border-style: solid;
    border-width: 0px 1px 1px 1px;
    border-color: @borders;
    box-shadow: none;
}

.notebook tab.bottom:hover {
    background-image: linear-gradient(to top,
                                      alpha(@theme_base_color, 0.0),
                                      alpha(@theme_base_color, 0.3));
    border-radius: 0px;
    border-width: 0px 1px 0px 1px;
    border-style: solid;
    border-color: @borders;
}

/* vertical tabs */

.notebook tab.left,
.notebook tab.right {
    padding: 5px 20px;
}

.notebook tab.left:active,
.notebook tab.left:active:hover {
    background-image: linear-gradient(to right,
                                      shade(@theme_bg_color, 1.18),
                                      shade(@theme_bg_color, 1.1));
    border-radius: 4px 0px 0px 4px;
    border-width: 1px 0px 1px 1px;
    border-color: @borders;
}

.notebook tab.left:hover {
    background-image: linear-gradient(to right,
                                      alpha(@theme_base_color, 0.0),
                                      alpha(@theme_base_color, 0.3));
    border-width: 1px 0px 1px 0px;
    border-style: solid;
    border-color: @borders;
}

.notebook tab.right:active,
.notebook tab.right:active:hover {
    background-image: linear-gradient(to left,
                                      shade(@theme_bg_color, 1.18),
                                      shade(@theme_bg_color, 1.1));
    border-radius:  0px 4px 4px 0px;
    border-width: 1px 1px 1px 0px;
    border-color: @borders;
}

.notebook tab.right:hover {
    background-image: linear-gradient(to left,
                                      alpha(@theme_base_color, 0.0),
                                      alpha(@theme_base_color, 0.3));
    border-width: 1px 0px 1px 0px;
    border-style: solid;
    border-color: @borders;
}

.notebook tab.reorderable-page:hover {
    background-image: linear-gradient(to bottom,
                                      alpha(@theme_base_color, 0.0),
                                      alpha(@theme_base_color, 0.3));
    border-radius: 0;
    box-shadow: inset 1px 0 alpha(@borders, 0.6), inset -1px 0 alpha(@borders, 0.6);
    border-style: none;
}

.notebook tab.reorderable-page:active {
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.18),
                                      shade(@theme_bg_color, 1.1));
    border-radius: 4px 4px 0 0;
    box-shadow: none;
    border-style: solid;
}

/* close button styling */
.notebook tab .button {
    color: mix (@theme_fg_color, @theme_bg_color, 0.85);
    border-image: none;
    background-image: none;
    background-color: transparent;
    border-radius: 3px;
    border-style: solid;
    border-color: transparent;
    border-width: 1px;
    padding: 1px;
    icon-shadow: none;
}

.notebook .prelight-page .button,
.notebook tab.prelight-page .button,
.notebook .active-page .button,
.notebook tab.active-page .button {
    color: mix(@theme_fg_color, @theme_base_color, 0.6);
    icon-shadow: 0 1px @button_text_shadow;
}

.notebook tab .button:hover {
    color: @theme_fg_color;
    border-color: transparent;
    border-image: none;
    background-image: none;
    background-color: transparent;
}

.notebook tab .button:active,
.notebook tab .button:active:hover {
    color:  @button_active_text;
    background-color: alpha(black, 0.08);
    box-shadow: inset 0 1px alpha(black, 0.05);
    icon-shadow: 0 1px @button_active_text_shadow;
    border-color: alpha(black, 0.27)
                        alpha(black, 0.13)
                        alpha(black, 0.13)
                        alpha(black, 0.13);
}

.notebook.arrow {
    /* FIXME, why this doesn't work? */
    -GtkNotebook-arrow-scaling: 0.5;
    color: shade(@theme_fg_color, 2.6);
}

.notebook.arrow:hover {
    color: @theme_selected_bg_color;
}

.notebook.arrow:active {
    color: @theme_fg_color;
}

.notebook.arrow:insensitive {
    color: rgba(141, 144, 145, 0.3);
}

.notebook.arrow:backdrop {
    color: rgba(84, 89, 90, 0.4);
}

.notebook.arrow:backdrop:insensitive {
    color: #c7c7c7;
}

/**************
 * ComboBoxes *
 **************/
GtkComboBox {
	padding: 0;

	-GtkComboBox-arrow-scaling: 0.5;
	-GtkComboBox-shadow-type: none;

	text-shadow: 0 1px @button_text_shadow;
}

GtkComboBox:insensitive {
	text-shadow: none;
	color: @insensitive_fg_color;
}

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

GtkComboBox.combobox-entry .entry:first-child,
GtkComboBox.combobox-entry .button:first-child {
	border-image-width: 3px 0 4px 3px;
	border-radius: 3px 0 0 3px;
	border-right-width: 0;
}

GtkComboBox.combobox-entry .entry:last-child,
GtkComboBox.combobox-entry .button:last-child {
	border-image-width: 3px 3px 4px 0;
	border-radius: 0 3px 3px 0;
	border-left-width: 0;
}

.primary-toolbar GtkComboBox.combobox-entry .entry:first-child,
.primary-toolbar GtkComboBox.combobox-entry .button:first-child {
	border-image-width: 4px 0 4px 4px;
	border-radius: 3px 0 0 3px;
	border-right-width: 0;
}

.primary-toolbar GtkComboBox.combobox-entry .entry:last-child,
.primary-toolbar GtkComboBox.combobox-entry .button:last-child {
	border-image-width: 4px 4px 4px 0;
	border-radius: 0 3px 3px 0;
	border-left-width: 0;
}

GtkComboBox.combobox-entry .entry:focus:first-child {
	box-shadow: inset 1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset 1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset 0 -1px alpha(@theme_selected_bg_color, 0.2);
}

GtkComboBox.combobox-entry .entry:focus:last-child {
	box-shadow: inset -1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset -1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset 0 -1px alpha(@theme_selected_bg_color, 0.2);
}

GtkComboBox.combobox-entry .button:last-child,
GtkComboBox.combobox-entry .button:hover:last-child,
GtkComboBox.combobox-entry .button:active:last-child,
GtkComboBox.combobox-entry .button:hover:active:last-child {
	box-shadow: inset 1px 0 @inset_dark_color, 
		inset 0 1px @entry_inset,
		inset 0 2px alpha(@entry_inset, 0.4);
}

GtkComboBox.combobox-entry .button:first-child,
GtkComboBox.combobox-entry .button:hover:first-child,
GtkComboBox.combobox-entry .button:active:first-child,
GtkComboBox.combobox-entry .button:hover:active:first-child {
	box-shadow: inset -1px 0 @inset_dark_color, 
		inset 0 1px @entry_inset,
		inset 0 2px alpha(@entry_inset, 0.4);
}

GtkComboBox.combobox-entry .button:insensitive:first-child {
	box-shadow: inset -1px 0 @inset_dark_color;
}

GtkComboBox.combobox-entry .button:insensitive:last-child {
	box-shadow: inset 1px 0 @inset_dark_color;
}

GtkComboBox.combobox-entry .button:hover,
GtkComboBox.combobox-entry .button:active,
GtkComboBox.combobox-entry .button:active:hover {
    color: shade (@theme_selected_bg_color, 0.80);
    transition: all 400ms ease-in;
}

GtkComboBox .button {
    color: @theme_fg_color;
}

/********************
 * Various choosers *
 ********************/

GtkFontButton .separator,
GtkFileChooserButton .separator,
GtkFileChooserWidget horizontal.separator {
	/* always disable separators */
	-GtkWidget-wide-separators: true;
	-GtkWidget-horizontal-separator: 0;
	-GtkWidget-vertical-separator: 0;
}

GtkFontButton GtkLabel:last-child {
	color: mix(@theme_fg_color, @theme_bg_color, 0.35);
}

GtkFileChooserButton GtkImage:last-child {
	color: @internal_element_color;
}

GtkFileChooserWidget.vertical GtkPaned.horizontal {
    -GtkPaned-handle-size: 3px;
    border-color: transparent;
}

/**************
 * Scrollbars *
 **************/

.scrollbar {
	background-image: none;
	border-style: solid;
	-GtkRange-trough-border: 0;
	-GtkScrollbar-has-backward-stepper: true;
	-GtkScrollbar-has-forward-stepper: true;
	-GtkRange-stepper-size: 16;
	-GtkRange-slider-width: 13;
	-GtkScrollbar-min-slider-length: 42; /* minimum size for the slider. sadly can't be in '.slider' where it belongs */

	-GtkRange-stepper-spacing: 0;
	-GtkRange-trough-under-steppers: 1;
}

.scrollbars-junction { /* the small square between scrollbars!!! */
	background-image: none;
	background-color: @theme_bg_color;
	border-width: 0;
	border-radius: 0;
	border-image: none;
	box-shadow: none;
}

.scrollbar.trough,
.scrollbar.trough.vertical,
.sidebar.scrollbar.trough,
.sidebar.scrollbar.trough.vertical,
GtkPlacesSidebar .scrollbar.trough,
GtkPlacesSidebar .scrollbar.trough.vertical {
	background-image: linear-gradient(to right,
		@scrollbar_trough,
		shade (@scrollbar_trough, 1.08));
	border-left-width: 1px;
	border-style: solid;
	border-color: shade (@theme_bg_color, 0.94);
	border-radius: 0;
	border-image: none;
}

.scrollbar.trough.horizontal,
.sidebar.scrollbar.trough.horizontal,
GtkPlacesSidebar .scrollbar.trough.horizontal {
	background-image: linear-gradient(to bottom,
		@scrollbar_trough,
		shade (@scrollbar_trough, 1.08));
	border-top-width: 1px;
	border-style: solid;
	border-color: shade (@theme_bg_color, 0.94);
	border-radius: 0;
	border-image: none;
}

.scrollbar.button,
.scrollbar.button:active,
.scrollbar.button:active:hover,
.scrollbar.button:insensitive {
	border-style: none;
	border-image: none;
	border-radius: 0;
	background-image: none;
	background-color: transparent;
}

.scrollbar.button:active,
.scrollbar.button:active:hover {
	background-color: alpha(shade(@scrollbar_trough, 0.8), 0.5);
}

.scrollbar.button.top:hover {
	box-shadow: inset 0 -1px mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button.bottom:hover {
	box-shadow: inset 0 1px mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button.right:hover {
	box-shadow: inset 1px 0 mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button.left:hover {
	box-shadow: inset -1px 0 mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

.scrollbar.button {
	color: @theme_fg_color;
}

.scrollbar.button:hover {
	color: @theme_fg_color;
}

.scrollbar.button:insensitive {
	color: @insensitive_fg_color;
}

.scrollbar.button:active {
	color: @theme_fg_color;
}

.scrollbar.slider.vertical {
	background-image: linear-gradient(to right,
		shade(@scrollbar_slider, 0.95),
		shade(@scrollbar_slider, 0.8));
	border-radius: 20px;
	border-style: solid;
	border-image: none;
	border-color: shade(@scrollbar_slider, 0.65);
	border-width: 1px;
}

.scrollbar.slider.vertical:hover,
.scrollbar.slider.vertical:hover:active {
	background-image: linear-gradient(to right,
		shade(@scrollbar_slider, 0.85),
		shade(@scrollbar_slider, 0.7));
	border-style: solid;
	border-image: none;
	border-color: shade(@scrollbar_slider, 0.65);
	border-width: 1px;
}

.scrollbar.slider.horizontal {
	background-image: linear-gradient(to bottom,
		shade(@scrollbar_slider, 0.95),
		shade(@scrollbar_slider, 0.8));
	border-radius: 20px;
	border-style: solid;
	border-image: none;
	border-color: shade(@scrollbar_slider, 0.65);
	border-width: 1px;
}

.scrollbar.slider.horizontal:hover,
.scrollbar.slider.horizontal:hover:active {
	background-image: linear-gradient(to bottom,
		shade(@scrollbar_slider, 0.85),
		shade(@scrollbar_slider, 0.7));
	border-style: solid;
	border-image: none;
	border-color: shade(@scrollbar_slider, 0.65);
	border-width: 1px;
}

.scrollbar.slider:insensitive {
	background-color: shade(@scrollbar_slider, 0.85);
	border-style: solid;
	border-image: none;
	border-color: shade(@scrollbar_slider, 0.75);
	border-width: 1px;
}

.scrollbar.slider.fine-tune:prelight:active {
	background-image: linear-gradient(to right,
		shade(@scrollbar_slider, 0.85),
		shade(@scrollbar_slider, 0.7));
	border-style: solid;
	border-image: none;
	border-color: shade(@scrollbar_slider, 0.65);
	border-width: 1px;
}

/*********
 * Menus *
 *********/
/* combobox menus */
GtkTreeMenu.menu {
	background-color: @menu_bg_color;
}

GtkTreeMenu .menuitem {
	padding: 2px;
	border-style: none;
}

GtkTreeMenu .menuitem {
	color: @theme_text_color;
}

GtkTreeMenu .menuitem,
.button .menuitem,
.toolbar .button .menuitem {
	text-shadow: none;
}

.context-menu {
	font: initial;
	text-shadow: none;
}

.menu {
	background-color: @menu_bg_color;
	color: @menu_fg_color;
	padding: 0;
	border: 1px solid @borders;
	margin: 4px;
}

.menu.button {
	background-image: none;
	background-color: @theme_base_color;
	color: @internal_element_color;

	border-image: none;
	border-style: none;
}

.menu.button:hover {
	background-image: none;
	background-color: @theme_base_color;
	color: @theme_text_color;

	border-image: none;
	border-style: none;
}

.menu.button:insensitive {
	background-color: @theme_base_color;
	color: lighter(@internal_element_color);

	border-image: none;
	border-style: none;
}

/* this controls the general appearance of the menubar */
.menubar {
	background-image: linear-gradient(to bottom,
		@theme_bg_color,
		shade (@theme_bg_color, 0.96));
	border-width: 0;
	-GtkWidget-window-dragging: true;
}

.menubar .menuitem {
	-gtk-icon-style: regular;
	transition: all 200ms ease-out;
	border-style: none;
	padding: 4px 6px;
	text-shadow: 0 1px @button_text_shadow;
}

.menubar .menuitem:hover {
	background-image: linear-gradient(to bottom,
		shade (@theme_bg_color, 1.0),
		shade (@theme_bg_color, 0.82));
}

.menubar .menuitem:hover {
	color: @menu_fg_color;
}

.menu .menuitem {
	background-color: transparent;
	-GtkMenuItem-arrow-scaling: 0.6;
	transition: all 150ms ease-out;
	padding: 6px 5px;
}

.menu .menuitem:hover {
	border-radius: 0;
}

.menu .menuitem:active,
.menu .menuitem:hover {
	background-color: @theme_selected_bg_color;
	background-image: linear-gradient(to bottom,
		shade (@theme_selected_bg_color, 1.0),
		shade (@theme_selected_bg_color, 0.85));
	text-shadow: none;
	border: none;
}

.menu .menuitem:insensitive {
	background-color: transparent;
}

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

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

.menu .menuitem .accelerator:insensitive {
	color: mix (@menu_fg_color, @menu_bg_color, 0.7);
}

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

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

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

.menuitem.arrow {
	color: @menu_controls_color;
}

.menuitem.separator {
	color: @menu_separator;

	-GtkMenuItem-horizontal-padding: 0;
}

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

.menuitem.check:checked,
.menuitem.radio:checked {
	background-color: transparent;
}

.menuitem.check:checked {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-checkbox-checked.svg"));
}

.menuitem.check:checked:hover {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-checkbox-checked-selected.svg"));
}

.menuitem.check:checked:insensitive {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-checkbox-checked-insensitive.svg"));
}

.menuitem.check:inconsistent,
.menuitem.radio:inconsistent {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-checkbox-mixed.svg"));
}

.menuitem.check:inconsistent:insensitive,
.menuitem.radio:inconsistent:insensitive {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-checkbox-mixed-insensitive.svg"));
}

.menuitem.check:inconsistent:hover,
.menuitem.radio:inconsistent:hover {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-checkbox-mixed-selected.svg"));
}

.menuitem.radio:checked {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-radio-checked.svg"));
}

.menuitem.radio:checked:hover {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-radio-checked-selected.svg"));
}

.menuitem.radio:checked:insensitive {
	-gtk-icon-source: -gtk-scaled(url("assets/menuitem-radio-checked-insensitive.svg"));
}

/***************
 * Menu Button *
 ***************/
.toolbar GtkMenuButton.menu-button:active,
.toolbar GtkMenuButton.menu-button.raised:active,
GtkMenuButton.menu-button:active,
.linked GtkMenuButton.menu-button:active,
.toolbar .linked.raised GtkMenuButton.menu-button:active,
.toolbar GtkMenuButton.menu-button.linked.raised:active {
/*	background-image: none;
	background-color: @menu_bg_color;

	border-image: none;
	border-color: @menu_bg_color;
	border-radius: 4px 4px 0 0;
	color: @theme_text_color;*/
}

GtkMenuButton.menu-button:active,
.linked GtkMenuButton.menu-button:active,
.toolbar .linked.raised GtkMenuButton.menu-button:active,
.toolbar GtkMenuButton.menu-button.linked.raised:active {
	text-shadow: none;
	icon-shadow: none;
	box-shadow: none;
}

.linked GtkMenuButton.menu-button:active:last-child,
.toolbar .linked.raised GtkMenuButton.menu-button:active:last-child,
.toolbar GtkMenuButton.menu-button.linked.raised:active:last-child {
	border-top-left-radius: 0;
}

.linked GtkMenuButton.menu-button:active:first-child,
.toolbar .linked.raised GtkMenuButton.menu-button:active:first-child,
.toolbar GtkMenuButton.menu-button.linked.raised:active:first-child {
	border-top-right-radius: 0;
}

.button.menuitem.menubar:active {
	background-image: none;
	background-color: @menu_bg_color;

	border-radius: 4px 4px 0 0;
	border-image: none;
	border-width: 1px 1px 0 1px;
	border-color: @menu_bg_color;
	border-style: solid;
}

.button.menuitem.menubar:active,
GtkMenuButton.menu-button:active,
.toolbar GtkMenuButton.menu-button:active {
	color: @theme_text_color;
}

GtkMenuButton .menu {
	text-shadow: none;
}

/****************
 * Radiobuttons *
 ****************/

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

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

GtkCheckButton.text-button, GtkRadioButton.text-button {
	padding: 1px 2px 4px;
	outline-offset: 0; 
}

/************
 * Toolbars *
 ************/
.toolbar {
	border-style: none;
	border-color: darker (@theme_bg_color);
	padding: 6px;
	background-color: @theme_bg_color;
}

.toolbar .button {
	padding: 1px;
}

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

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

.toolbar:insensitive {
	color: alpha (@theme_fg_color, 0.6);
	background-color: @insensitive_bg_color;
}

/********************
 * Menubar Toolbars *
 ********************/
.toolbar.menubar {
	-GtkToolbar-button-relief: normal;
	
	padding: 6px 6px 5px 6px; /* weird padding to compensate border-images
					and eventual top border presence, 
					see selection mode toolbars */

}

/***************
 * Header bars *
 ***************/
.titlebar, GtkCalendar.header,
.header-bar {
	border-width: 0 0 1px;
	border-style: solid;
	border-color: shade(@borders, 0.90);
	box-shadow: inset 0 -1px shade(@wm_bg_b, 0.95);
	background-color: @theme_bg_color;
	padding: 6px;
}

.header-bar .button.text-button {
	padding: 2px 16px;
}

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

.titlebar .title, GtkCalendar.header .title,
.header-bar .title {
	font: Bold;
	padding: 0px 12px;
}

.titlebar .subtitle, GtkCalendar.header .subtitle,
.header-bar .subtitle {
	font-size: smaller;
	padding: 0px 12px;
}

/***************
 * Action bars *
 ***************/
.action-bar {
	border-width: 1px 0 0;
	border-style: solid;
	border-color: shade(@borders, 0.90);

	box-shadow: inset 0 -1px shade(@borders, 1.30);
	background-image: linear-gradient(to bottom,
		shade(@theme_bg_color, 1.05),
		shade(@theme_bg_color, 0.95));

	padding: 6px 6px 5px 6px;
}

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

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

.action-bar .title {
	font: Bold 10;
	padding: 0px 12px 0px 12px;
}

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

/***************
 * Dialog	  *
 ***************/

.prompt,
GtkMessageDialog {
	-GtkDialog-content-area-border: 0;
	-GtkDialog-action-area-border: 12;
	-GtkDialog-button-spacing: 1;
	margin: 0;
	padding: 0;
}

/* ie. mate-keyboard-properties option window */
GtkDialog GtkScrolledWindow.frame {
    border-color: @borders;
    border-style: solid;
    border-width: 1px;
    border-radius: 2px;
}

GtkDialog GtkScrolledWindow.frame GtkViewport .vertical {
    background-color: shade (@theme_bg_color, 1.07);
}

GtkDialog GtkScrolledWindow.frame GtkViewport .vertical GtkExpander .vertical {
    background-color: @theme_base_color;
    border-radius: 3px;
    border-color: @borders;
    border-style: solid;
    border-width: 1px;
}

/* middle buttons */
.dialog-action-area.linked .button,
.dialog-action-area.linked .button:active,
.dialog-action-area.linked .button:active:hover,
.dialog-action-area.linked .button:checked,
.dialog-action-area.linked .button:checked:hover,
.dialog-action-area.linked .button:insensitive {
    border-style: solid;
    border-radius: 0;
    border-width: 1px;
/*    border-right-width: 0px;
    border-left-width:  0px;*/
    border-color: @borders;
    border-image: none;
}

.dialog-action-area.linked .button.default,
.dialog-action-area.linked .button.default:active,
.dialog-action-area.linked .button.default:checked,
.dialog-action-area.linked .button.default:insensitive,
.dialog-action-area.linked .button:focus {
    border-style: solid;
    border-radius: 0;
    border-width: 1px;
/*    border-right-width: 0px;
    border-left-width:  0px;*/
    border-color: shade(@infobar_bg_color, 1.0);
    -GtkWidget-focus-line-width: 0;
}


/* left button */
.dialog-action-area.linked .button:first-child,
.dialog-action-area.linked .button:active:first-child,
.dialog-action-area.linked .button:active:hover:first-child,
.dialog-action-area.linked .button:checked:first-child,
.dialog-action-area.linked .button:checked:hover:first-child,
.dialog-action-area.linked .button:insensitive:first-child {
    border-style: solid;
    border-width: 1px;
/*    border-right-width: 0;*/
    border-radius: 3px 0 0px 3px;
    border-color: @borders;
    border-image: none;
}

.dialog-action-area.linked .button.default:first-child,
.dialog-action-area.linked .button.default:active:first-child,
.dialog-action-area.linked .button.default:checked:first-child,
.dialog-action-area.linked .button.default:insensitive:first-child,
.dialog-action-area.linked .button:focus:first-child {
    border-style: solid;
    border-width: 1px;
/*    border-right-width: 0;*/
    border-radius: 3px 0 0px 3px;
    border-color: shade(@infobar_bg_color, 1.0);
    -GtkWidget-focus-line-width: 0;
}

/* right button */
.dialog-action-area.linked .button:last-child,
.dialog-action-area.linked .button:active:last-child,
.dialog-action-area.linked .button:active:hover:last-child,
.dialog-action-area.linked .button:checked:last-child,
.dialog-action-area.linked .button:checked:hover:last-child,
.dialog-action-area.linked .button:insensitive:last-child {
    border-style: solid;
    border-width: 1px;
/*    border-left-width: 0;*/
    border-radius: 0 3px 3px 0;
    border-color: @borders;
    border-image: none;
}

.dialog-action-area.linked .button.default:last-child,
.dialog-action-area.linked .button.default:active:last-child,
.dialog-action-area.linked .button.default:checked:last-child,
.dialog-action-area.linked .button.default:insensitive:last-child,
.dialog-action-area.linked .button:focus:last-child {
    border-style: solid;
    border-width: 1px;
/*    border-left-width: 0;*/
    border-radius: 0 3px 3px 0;
    border-color: shade(@infobar_bg_color, 1.0);
    -GtkWidget-focus-line-width: 0;
}

/* single button */
.dialog-action-area.linked .button:only-child,
.dialog-action-area.linked .button:active:only-child,
.dialog-action-area.linked .button:active:hover:only-child,
.dialog-action-area.linked .button:checked:only-child,
.dialog-action-area.linked .button:checked:hover:only-child,
.dialog-action-area.linked .button:insensitive:only-child {
    padding-left:  6px;
    padding-right: 6px;
    border-width: 1px;
    border-radius: 3px;
    border-color: @borders;
    border-image: none;
}

.dialog-action-area.linked .button.default:only-child,
.dialog-action-area.linked .button.default:active:only-child,
.dialog-action-area.linked .button.default:checked:only-child,
.dialog-action-area.linked .button.default:insensitive:only-child,
.dialog-action-area.linked .button:focus:only-child {
    padding-left:  6px;
    padding-right: 6px;
    border-width: 1px;
    border-radius: 3px;
    border-color: shade(@infobar_bg_color, 1.0);
    -GtkWidget-focus-line-width: 0;
}

.dialog-action-area.linked .button.suggested-action,
.dialog-action-area.linked .button.suggested-action:active,
.dialog-action-area.linked .button.suggested-action:checked,
.dialog-action-area.linked .button.suggested-action:insensitive {
    box-shadow: none;
}

/***************
 * Search bars *
 ***************/

.search-bar {
	border-width: 0 0 1px;
	border-style: solid;
	border-color: @borders;
	background-image: linear-gradient(to bottom,
		shade(@theme_bg_color, 0.96),
		shade(@theme_bg_color, 1.0));
	box-shadow: inset 0 1px 0 0 alpha(@borders, 0.4);
}

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

/********************
 * Primary Toolbars *
 ********************/

/* applications using EggEditableToolbar usually set the primary-toolbar
 * hint on the containing vbox, so we need to handle both these cases here.
 */
.primary-toolbar .toolbar,
.primary-toolbar.toolbar {
	border-style: solid;
	border-width: 0 0 1px 0;
	border-color: alpha(@borders, 0.4);
	-GtkWidget-window-dragging: true;
	-GtkToolbar-button-relief: normal;
	text-shadow: 0 1px @button_text_shadow;
	padding-top: 3px;
	padding-bottom: 3px;
	box-shadow: inset 0 1px 0 0 alpha(@borders, 0.4);
}

.primary-toolbar .toolbar .separator,
.primary-toolbar.toolbar .separator {
	-GtkWidget-window-dragging: true;
}

.primary-toolbar .toolbar:insensitive,
.primary-toolbar.toolbar:insensitive {
	background-image: none;
	background-color: shade (@theme_bg_color, 0.97);

	border-color: shade (@theme_bg_color, 0.91);
	text-shadow: none;
}

/* progressbars on primary toolbar entries are special */
.primary-toolbar .toolbar .entry.progressbar,
.primary-toolbar.toolbar .entry.progressbar {
	background-image: linear-gradient(to bottom,
		@trough_bg_color_a,
		@trough_bg_color_b);
	border-width: 1px;
	border-radius: 2px;
	border-style: solid;
	border-color: shade(@internal_element_color, 1.10);
	border-image: none;

	color: @theme_text_color;
}

/*******************
 * Inline toolbars *
 *******************/

.inline-toolbar.toolbar {
	border-width: 1px;
	border-style: solid;
	border-color: @borders;

	-GtkToolbar-button-relief: normal;
	padding: 2px;
}

.inline-toolbar.toolbar:last-child {
	border-top-width: 0;
	border-radius: 0 0 3px 3px;
}

.inline-toolbar.toolbar.vertical:last-child {
	border-left-width: 0;
	border-radius: 0;
}

/***********
 * Sidebar *
 ***********/
.sidebar,
.sidebar .view {
    -gtk-icon-style: regular;
	background-color: @sidebar_bg;
}

.sidebar .frame {
	border-style: none;
}

/* dialog open */
GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame GtkListBox.sidebar.list,
GtkFileChooserWidget GtkPlacesSidebar.sidebar.frame .frame GtkListBox.sidebar.list,
GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row,
GtkFileChooserWidget GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row {
    background-color: @sidebar_bg;
}

GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row:hover,
GtkFileChooserWidget GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row:hover {
    background-color: shade (@theme_selected_bg_color, 1.15);
    color: shade (@theme_selected_bg_color, 0.35);
}

GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row:selected:hover,
GtkFileChooserWidget GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row:selected:hover {
    color: shade (@theme_selected_fg_color, 1.00);
}

GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row .sidebar-revealer .sidebar-icon,
GtkFileChooserWidget GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row .sidebar-revealer .sidebar-icon {
    padding: 4px 8px 4px 6px;
}

GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row .sidebar-revealer .sidebar-label,
GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row .sidebar-revealer .sidebar-label {
    padding: 4px 0px 4px 1px;
}

GtkFileChooserDialog GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row .sidebar-revealer .sidebar-button.image-button.button,
GtkFileChooserWidget GtkPlacesSidebar.sidebar.frame .frame .sidebar.list .list-row.activatable.sidebar-row .sidebar-revealer .sidebar-button.image-button.button {
    background-color: transparent;
    background-image: none;
    border-image:none;
    box-shadow: none;
    padding: 4px 12px 4px 0px;
}

/* workaround for broken first/last-child logic with linked buttons
   in pathbar with gtk+-3.18 */
.path-bar.linked .button.image-button,
.path-bar.linked .button.image-button:checked:hover,
.path-bar.linked .button.text-button {
	border-right-width: 1px;
	border-left-width: 1px;
	border-image-width: 3px 3px 4px 3px;
	border-radius: 3px;
    padding: 4px;
}

.sidebar row:hover {
	background-color: shade (@theme_selected_bg_color, 1.15);
	color: shade (@theme_selected_bg_color, 0.35);
}

.sidebar .scrollbar.trough {
	box-shadow: none;
	border-radius: 100px;
	border-style: solid;
	border-width: 2px;
	border-color: transparent;
}

.sidebar .scrollbar.trough {
	background-color: @sidebar_scrollbar_trough;
}

.sidebar .scrollbar.slider {
	background-color: @sidebar_bg;
}

.sidebar .scrollbar.slider:hover {
	background-color: mix (@sidebar_bg, @theme_base_color, 0.35);
}

.sidebar .scrollbar.slider:hover:active {
	background-color: @theme_base_color;
}

.sidebar .radio,
.sidebar .radio:focus,
.sidebar .radio:selected {
	background-image: none;
	background-color: transparent;
}

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

GtkOverlay.osd {
	background-color: transparent;
}

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

.osd.button,
.osd.button:active,
.osd.button:checked,
.osd .button,
.osd .button:active,
.osd .button:checked {
	border-width: 1px;
	border-style: solid;
	border-image: none;
	border-radius: 5px;
}

.osd .button {
	border-color: shade (@theme_selected_bg_color, 0.5);
}

.osd .button:insensitive {
	border-color: alpha(@osd_button_border,0.5);
}

.osd .button:active,
.osd .button:checked {
	border-color: @osd_button_border_active;
}

.osd.button,
.osd .button {
	padding: 4px;
	background-image: linear-gradient(to bottom,
		@osd_button_bg_a,
		@osd_button_bg_b 68%,
		@osd_button_bg_c
		);
	color: @osd_button_fg;
	text-shadow: 0 -1px @osd_button_shadow;
	icon-shadow: 0 -1px @osd_button_shadow;
}

.osd.button {
	padding: 8px;
}

.osd.button,
.osd.button:active,
.osd.button:checked {
	border-color: transparent;
}

.osd.button,
.osd.button:prelight,
.osd.button:active,
.osd.button:checked {
	background-color: shade(@osd_bg, 1.10);
}

.osd .button,
.osd .button:prelight,
.osd .button:active,
.osd .button:checked {
	background-color: transparent;
}

.osd.button:insensitive,
.osd .button:insensitive {
	background-image: none;
	background-color: @osd_button_bg_insensitive;
}

.osd.button:active:insensitive,
.osd .button:active:insensitive,
.osd.button:checked:insensitive,
.osd .button:checked:insensitive {
	background-image: none;
	background-color: @osd_button_bg_insensitive_active;
}

.osd.button:hover,
.osd .button:hover {
	color: @osd_button_fg_hover;
}

.osd.button:active,
.osd.button:hover:active,
.osd .button:active,
.osd .button:hover:active,
.osd.button:checked,
.osd.button:hover:checked,
.osd .button:checked,
.osd .button:hover:checked {
	color: @osd_button_fg_active;
}

.osd.button:insensitive,
.osd.button:active *:insensitive,
.osd.button:checked *:insensitive,
.osd .button:insensitive,
.osd .button:active *:insensitive,
.osd .button:checked *:insensitive {
	color: @osd_button_fg_insensitive;
	text-shadow: none;
	icon-shadow: none;
}

.osd.button:hover,
.osd .button:hover {
	background-image: linear-gradient(to bottom,
		@osd_button_bg_hover_a,
		@osd_button_bg_hover_b 68%,
		@osd_button_bg_hover_c
		);
}

.osd.button:active,
.osd.button:active:hover,
.osd .button:active,
.osd .button:active:hover,
.osd GtkMenuButton.menu-button:active,
.osd.button:checked,
.osd.button:checked:hover,
.osd .button:checked,
.osd .button:checked:hover,
.osd GtkMenuButton.menu-button:checked {
	background-image: linear-gradient(to bottom,
		@osd_button_bg_active_a,
		@osd_button_bg_active_b 20%,
		@osd_button_bg_active_c
		);
}

/* ie. gnome-weather */
.linked.stack-switcher.osd .button {
    border-width: 1px 1px 1px 0px;
    border-radius: 5px;
    color: @theme_fg_color;
    text-shadow: none;
}

.linked.stack-switcher.osd .button:checked {
	color: @osd_button_fg_active;
}

.linked.stack-switcher.osd .button:first-child {
    border-width: 1px;
    border-radius: 5px 0px 0px 5px;
}

.linked.stack-switcher.osd .button:last-child {
    border-width: 1px 1px 1px 0px;
    border-radius: 0px 5px 5px 0px;
}

/* left/right button box */
.osd.toolbar .horizontal.linked {
    background-image: linear-gradient(to left,
	                                  shade(@theme_selected_bg_color, 1.1),
	                                  shade(@theme_selected_bg_color, 0.95));
    border-radius: 5px;
}

/* button in osd-toolbar */
.osd .linked .button:active:first-child {
	border-left-width: 1px;
}

.osd .linked .button:active:last-child {
	border-right-width: 1px;
}

.osd.toolbar .flat.button.image-button {
    box-shadow: none;
}

.osd GtkMenuButton.menu-button:active {
	background-color: transparent;
	border-color: @osd_button_border;
}

.osd GtkMenuButton.menu-button:active {
	color: @osd_button_fg_active;
	text-shadow: 0 -1px @osd_button_shadow;
}

.osd.toolbar {
	color: @osd_fg;
	text-shadow: 0 1px @osd_text_shadow;
	padding: 10px;
	border-style: solid;
	border-width: 1px;
	border-color: shade (@theme_selected_bg_color, 0.5);
	border-radius: 7px;
	background-image: linear-gradient(to left,
	                                  alpha(shade(@theme_selected_bg_color, 1.0), 0.6),
	                                  alpha(shade(@theme_selected_bg_color, 0.65), 0.6));
	background-color: transparent;
	-GtkToolbar-button-relief: normal;
}

.osd.toolbar .button {
	padding: 4px;
	border-width: 1px;
	border-radius: 5px;
	box-shadow: inset @osd_button_inset;
}

.osd.toolbar .button:first-child {
	border-radius: 5px 0 0 5px;
	border-width: 1px 0 1px 1px;
	box-shadow: inset -1px 0 @osd_button_inset;
}

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

.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 {
	border-width: 1px;
	border-radius: 5px;
	border-style: solid;

	box-shadow: none;
}

.osd.toolbar .separator {
	color: shade(@osd_lowlight, 0.80);
}

/* used by gnome-settings-daemon's media-keys OSD */
.osd.trough {
	background-color: @osd_trough_bg;
	border-width: 0;
}

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

.osd .scale.trough {
	border: 1px solid rgba(0,0,0,0.1);
	border-image: none;
	/* this defines the bg color of the played segment */
	background-color: transparent;
}

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

.osd .scale.trough:insensitive,
.osd .scale.trough.highlight:insensitive {
	background-image: none;
	background-color: transparent;
}

.osd .scale-popup.popover.background {
	color: @osd_fg;
	border-style: solid;
	border-width: 1px;
	border-color: shade (@theme_selected_bg_color, 0.5);
	border-radius: 4px;
	background-image: linear-gradient(to bottom,
	                                  alpha(shade(@theme_selected_bg_color, 1.0), 0.6),
	                                  alpha(shade(@theme_selected_bg_color, 0.65), 0.6));
	background-color: transparent;
}

.osd .scale-popup.popover.background .button.flat.image-button {
    background-image: linear-gradient(to bottom,
	                                  alpha(shade(@theme_selected_bg_color, 0.90), 0.6),
	                                  alpha(shade(@theme_selected_bg_color, 0.75), 0.6));
	border-radius: 5px;
	border-width: 1px;
	padding: 2px;
}

.osd .scale-popup.popover.background .button.flat.image-button:insensitive {
    background-color: alpha (@osd_button_bg_insensitive, 0.5);
    background-image: none;
}

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

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

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

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

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

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

.osd .scrollbar.slider:hover {
	background-color: @osd_scrollbar_slider_prelight;
}

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

.osd GtkIconView.cell:selected,
.osd GtkIconView.cell:selected:focus {
	background-color: transparent;

	border-style: solid;
	border-radius: 15px;
	border-width: 3px;
	border-color: @osd_button_fg;

	outline-color: transparent;
}

/* used by Documents */
.osd .page-thumbnail {
	border-style: solid;
	border-width: 1px;
	border-color: @osd_lowlight;

	/* when there's no pixbuf yet */
	background-color: @osd_bg;
}

/****************************
 * Suggested action buttons *
 ****************************/
.toolbar .suggested-action.button,
.suggested-action.button {
	background-image: linear-gradient(to bottom,
		@suggested_action_button_a,
		@suggested_action_button_b);
	border-image: none;
	border-color: @suggested_action_button_border;
	border-width: 1px;

	color: @suggested_action_button_fg;
}

.toolbar .suggested-action.button:hover,
.suggested-action.button:hover {
	background-image: linear-gradient(to bottom,
		shade(@suggested_action_button_a, 1.10),
		shade(@suggested_action_button_b, 1.05));
}

.toolbar .suggested-action.button:active,
.toolbar .suggested-action.button:hover:active,
.suggested-action.button:active,
.suggested-action.button:hover:active,
.toolbar .suggested-action.button:checked,
.toolbar .suggested-action.button:hover:checked,
.suggested-action.button:checked,
.suggested-action.button:hover:checked {
	background-image: linear-gradient(to bottom,
		@suggested_action_button_b,
		@suggested_action_button_a);

	color: @suggested_action_button_fg;
}

.toolbar .suggested-action.button,
.suggested-action.button {
	text-shadow: 0 1px @suggested_action_button_shadow;
	icon-shadow: 0 1px @suggested_action_button_shadow;
}

.toolbar .suggested-action.button:active,
.toolbar .suggested-action.button:hover:active,
.suggested-action.button:active,
.suggested-action.button:hover:active,
.toolbar .suggested-action.button:checked,
.toolbar .suggested-action.button:hover:checked,
.suggested-action.button:checked,
.suggested-action.button:hover:checked {
	text-shadow: 0 1px shade(@suggested_action_button_shadow, 1.15);
	icon-shadow: 0 1px shade(@suggested_action_button_shadow, 1.15);
}

.suggested-action.button:insensitive,
.suggested-action.button:active *:insensitive,
.suggested-action.button:checked *:insensitive {
	icon-shadow: none;
	background-image: none;
	background-color: @insentitive_bg_color;
	border: 1px solid @insensitive_borders;
}

.suggested-action.button GtkLabel:insensitive {
	color: @insensitive_fg_color;
	text-shadow: none;
}

/******************************
 * Destructive action buttons *
 ******************************/
.destructive-action.button {
	background-image: linear-gradient(to bottom,
		@destructive_action_button_a,
		@destructive_action_button_b);

	color: @destructive_action_button_fg;
}

.destructive-action.button:hover {
	background-image: linear-gradient(to bottom,
		shade(@destructive_action_button_a, 1.10),
		shade(@destructive_action_button_b, 1.05));
}

.destructive-action.button:active,
.destructive-action.button:hover:active,
.destructive-action.button:checked,
.destructive-action.button:hover:checked {
	background-image: linear-gradient(to bottom,
		@destructive_action_button_b,
		@destructive_action_button_a);

	color: @destructive_action_button_fg;
}

.destructive-action.button {
	text-shadow: 0 1px @destructive_action_button_shadow;
	icon-shadow: 0 1px @destructive_action_button_shadow;
}

.destructive-action.button:active,
.destructive-action.button:hover:active,
.destructive-action.button:checked,
.destructive-action.button:hover:checked {
	text-shadow: 0 1px shade(@destructive_action_button_shadow, 1.15);
	icon-shadow: 0 1px shade(@destructive_action_button_shadow, 1.15);
}

/**************************
 * Selection Mode classes *
 **************************/
.selection-mode.header-bar,
.selection-mode.toolbar {
	color: @selection_toolbar_fg;
	background-image: linear-gradient(to bottom,
		@selection_toolbar_bg_a,
		@selection_toolbar_bg_b);
	background-color: transparent;

	border-color: @borders;
	border-style: solid;
	border-image: none;

	text-shadow: 0 1px @selection_toolbar_shadow;
}

.selection-mode.header-bar {
	border-top-color: @selection_toolbar_bg_a;
	border-bottom-color: @selection_toolbar_border;

	box-shadow: inset 0 -1px shade(@selection_toolbar_border, 1.20);
}

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

/* regular button */
.selection-mode.header-bar .button,
.selection-mode.toolbar .button,
.selection-mode.toolbar GtkToolButton .button {
	background-image: linear-gradient(to bottom,
		@selection_toolbar_button_a,
		@selection_toolbar_button_b);

	border-image: none;
	border-color: @selection_toolbar_button_border;
	border-width: 1px;

	box-shadow: inset 0 1px alpha(white, 0.1);

	color: @selection_toolbar_button_fg;
}

.selection-mode.header-bar .button:hover,
.selection-mode.toolbar .button:hover,
.selection-mode.toolbar GtkToolButton .button:hover {
	background-image: linear-gradient(to bottom,
		shade(@selection_toolbar_button_a, 1.05),
		shade(@selection_toolbar_button_b, 1.02));
}

.selection-mode.header-bar .button:active,
.selection-mode.header-bar .button:hover:active,
.selection-mode.toolbar .button:active,
.selection-mode.toolbar .button:hover:active,
.selection-mode.toolbar GtkToolButton .button:active,
.selection-mode.toolbar GtkToolButton .button:hover:active,
.selection-mode.header-bar .button:checked,
.selection-mode.header-bar .button:hover:checked,
.selection-mode.toolbar .button:checked,
.selection-mode.toolbar .button:hover:checked,
.selection-mode.toolbar GtkToolButton .button:checked,
.selection-mode.toolbar GtkToolButton .button:hover:checked {
	background-image: linear-gradient(to bottom,
		shade(@selection_toolbar_button_b, 0.95),
		shade(@selection_toolbar_button_a, 0.88));
	box-shadow: none;
}

.selection-mode.header-bar .button:active,
.selection-mode.toolbar .button:active,
.selection-mode.toolbar GtkToolButton .button:active,
.selection-mode.header-bar .button:checked,
.selection-mode.toolbar .button:checked,
.selection-mode.toolbar GtkToolButton .button:checked {
	color: @selection_toolbar_button_fg;
}

.selection-mode.header-bar .button,
.selection-mode.header-bar .button:active,
.selection-mode.header-bar .button:checked,
.selection-mode.toolbar .button,
.selection-mode.toolbar .button:active,
.selection-mode.toolbar .button:checked,
.selection-mode.toolbar GtkToolButton .button,
.selection-mode.toolbar GtkToolButton .button:active,
.selection-mode.toolbar GtkToolButton .button:checked {
	text-shadow: 0 1px @selection_toolbar_button_shadow;
	icon-shadow: 0 1px @selection_toolbar_button_shadow;
}

/* suggested button */
.selection-mode.header-bar .suggested-action.button,
.selection-mode.toolbar .suggested-action.button,
.selection-mode.toolbar GtkToolButton.suggested-action .button {
	background-image: linear-gradient(to bottom,
		@selection_toolbar_suggested_button_a,
		@selection_toolbar_suggested_button_b 40%,
		@selection_toolbar_suggested_button_c);

	border-image: none;
	border-color: @selection_toolbar_suggested_button_border;
	border-width: 1px;

	box-shadow: inset 0 2px alpha(@selection_toolbar_suggested_button_b, 0.2),
		inset 0 1px @selection_toolbar_suggested_button_a;
	color: @theme_text_color;
}

.selection-mode.header-bar .suggested-action.button:hover,
.selection-mode.toolbar .suggested-action.button:hover,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover {
	background-image: linear-gradient(to bottom,
		shade(@selection_toolbar_suggested_button_a, 1.15),
		shade(@selection_toolbar_suggested_button_b, 1.15) 40%,
		@selection_toolbar_suggested_button_c);
}

.selection-mode.header-bar .suggested-action.button:active,
.selection-mode.header-bar .suggested-action.button:hover:active,
.selection-mode.toolbar .suggested-action.button:active,
.selection-mode.toolbar .suggested-action.button:hover:active,
.selection-mode.toolbar GtkToolButton.suggested-action .button:active,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover:active,
.selection-mode.header-bar .suggested-action.button:checked,
.selection-mode.header-bar .suggested-action.button:hover:checked,
.selection-mode.toolbar .suggested-action.button:checked,
.selection-mode.toolbar .suggested-action.button:hover:checked,
.selection-mode.toolbar GtkToolButton.suggested-action .button:checked,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover:checked {
	background-image: linear-gradient(to bottom,
		shade(@selection_toolbar_suggested_button_c, 0.92),
		@selection_toolbar_suggested_button_b 40%,
		shade(@selection_toolbar_suggested_button_a, 0.92));
	box-shadow: none;
}

.selection-mode.header-bar .suggested-action.button:active,
.selection-mode.toolbar .suggested-action.button:active,
.selection-mode.toolbar GtkToolButton.suggested-action:active,
.selection-mode.header-bar .suggested-action.button:checked,
.selection-mode.toolbar .suggested-action.button:checked,
.selection-mode.toolbar GtkToolButton.suggested-action:checked {
	color: @theme_text_color;
}

.selection-mode.header-bar .suggested-action.button,
.selection-mode.header-bar .suggested-action.button:active,
.selection-mode.header-bar .suggested-action.button:checked,
.selection-mode.toolbar .suggested-action.button,
.selection-mode.toolbar .suggested-action.button:active,
.selection-mode.toolbar .suggested-action.button:checked,
.selection-mode.toolbar GtkToolButton.suggested-action .button,
.selection-mode.toolbar GtkToolButton.suggested-action:active,
.selection-mode.toolbar GtkToolButton.suggested-action:checked {
	text-shadow: 0 1px @button_text_shadow;
	icon-shadow: 0 1px @button_text_shadow;
}

/* menu button */
.selection-mode.header-bar .selection-menu.button,
.selection-mode.toolbar .selection-menu.button {
	background-image: none;
	border-image: none;
	border-color: transparent;
	border: 0px;
	box-shadow: none;

	color: @selection_menu_fg;
}

.selection-mode.toolbar .dim-label,
.selection-mode.toolbar .selection-menu.button .dim-label {
	color: @selection_menu_fg;
}

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

.selection-mode.header-bar .selection-menu.button:active,
.selection-mode.toolbar .selection-menu.button:active,
.selection-mode.header-bar .selection-menu.button:checked,
.selection-mode.toolbar .selection-menu.button:checked {
	border-color: transparent;
	border-radius: 3px;
	border-width: 1px;

	background-color: transparent;
}

.selection-mode.header-bar .selection-menu.button:active,
.selection-mode.toolbar .selection-menu.button:active,
.selection-mode.header-bar .selection-menu.button:checked,
.selection-mode.toolbar .selection-menu.button:checked {
	color: @selection_menu_active;
}

.selection-mode.header-bar .selection-menu.button,
.selection-mode.toolbar .selection-menu.button {
	text-shadow: 0 1px @selection_toolbar_shadow;
}

.selection-mode.header-bar .selection-menu.button .menuitem,
.selection-mode.toolbar .selection-menu.button .menuitem {
	text-shadow: none;
}

/****************
 * GtkAssistant *
 ****************/
GtkAssistant .sidebar .highlight {
	background-color: transparent;
	color: @theme_fg_color;
	font: bold;
}

GtkAssistant .sidebar {
	padding: 12px 18px 12px;

	border-width: 0 1px 0 0;
	border-radius: 0px;
	border-style: solid;
	border-color: @inactive_frame_color;

	color: mix (@theme_fg_color, @theme_bg_color, 0.40);

	background-color: shade (@theme_bg_color, 0.97);
	/* shall we make it like sidebars in general? */

}

/*************
 * GtkSwitch *
 *************/

GtkSwitch {
	border-radius: 8px;
	padding: 8px; /* 8px to avoid padding list-row issue if active */
	background-color: transparent;
}

GtkSwitch.trough,
GtkSwitch.trough:insensitive {
	border: none;
	border-image: none;
	color: transparent;
	box-shadow: none;
	background-color: transparent;
	background-size: /*48px 26px*/ 50px 28px; /* Size + 2 to adjust to the padding. */
	background-position: center center;
	background-repeat: no-repeat;
	text-shadow: none;
}

/* don't display on/off */
GtkSwitch.trough:hover,
GtkSwitch.trough:insensitive:hover {
	color: transparent;
}

GtkSwitch.slider,
GtkSwitch.slider:hover {
	background-color: transparent;
	border: none;
	border-image: none;
}

/************
 * Pathbars *
 ************/
.path-bar .button, .path-bar .header-bar .button.titlebutton, .header-bar .path-bar .button.titlebutton,
.path-bar .titlebar .button.titlebutton,
.titlebar .path-bar .button.titlebutton,
.path-bar GtkCalendar.header .button.titlebutton,
GtkCalendar.header .path-bar .button.titlebutton {
	padding: 5px 6px 6px;
}
.path-bar .button:first-child {
	padding-left: 8px;
}
.path-bar .button:last-child {
	padding-right: 8px;
}
.path-bar .button:only-child {
	padding-left: 12px;
	padding-right: 12px;
}
.path-bar .button .label:last-child {
	padding-left: 2px;
}
.path-bar .button .label:first-child {
	padding-right: 2px;
}
.path-bar .button .label:only-child {
	padding-right: 0;
	padding-left: 0;
}
.path-bar .button GtkImage, .path-bar .header-bar .button.titlebutton GtkImage, .header-bar .path-bar .button.titlebutton GtkImage,
.path-bar .titlebar .button.titlebutton GtkImage,
.titlebar .path-bar .button.titlebutton GtkImage,
.path-bar GtkCalendar.header .button.titlebutton GtkImage,
GtkCalendar.header .path-bar .button.titlebutton GtkImage {
	padding-top: 1px;
}

/***********************
 * Tree and Icon views *
 ***********************/
GtkTreeView {
	-GtkTreeView-vertical-separator: 0;

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

	outline-color: alpha(@theme_text_color, 0.6);
}

GtkTreeView.dnd {
	border-color: @internal_element_color;
	border-radius: 2px;
	border-width: 1px;
	border-style: solid;
}

GtkTreeView:selected:focus {
	outline-color: mix(@theme_selected_fg_color, @theme_selected_bg_color, 0.30);
}

GtkIconView,
GtkViewport {
    /* avoid resizing theme thumbnails in mate-appearance-properties */
    padding: 0px;
}

GtkIconView.cell:selected,
GtkIconView.cell:selected:focus {
	border-radius: 4px;

	/* FIXME: this probably needs to be better;
	 * see https://bugzilla.gnome.org/show_bug.cgi?id=644157
	 */
	outline-color: @treeview_focus_border;
	outline-style: solid;
	outline-offset: 3px;
}

GtkIconView.cell:hover,
GtkIconView.cell:hover:focus {
	border-radius: 4px;
}

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

.view:insensitive {
	background-color: @insensitive_bg_color;
	color: @insensitive_fg_color;
}

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

.view:hover {
	background-color: shade (@theme_selected_bg_color, 1.30);
	color: shade (@theme_selected_bg_color, 0.35);
}

.view:selected:backdrop {
	background-color: shade(@theme_unfocused_bg_color, 0.94);
	color: @theme_fg_color;
}

/* ie. filechooser dialog */
.view row:hover {
	background-color: shade (@theme_selected_bg_color, 1.30);
	color: shade (@theme_selected_bg_color, 0.35);
}

.view row:selected:hover {
	color: shade (@theme_selected_fg_color, 1.00);
}

.cell {
	/*color: @theme_text_color;*/ /* Don't use, seems to change hover effect on combobox menuitems */
	padding: 2px;
	text-shadow: none;
}

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

.cell:selected:backdrop,
.cell:selected:focus:backdrop {
	background-color: shade(@theme_unfocused_bg_color, 0.94);
	color: @theme_fg_color;
}

row:selected,
row:selected:focus {
	border-width: 1px 0 1px 0;
	border-style: solid;
	border-color: shade (@theme_selected_bg_color, 0.85);
	background-image: linear-gradient(to bottom,
		shade (@theme_selected_bg_color, 1.0),
		shade (@theme_selected_bg_color, 0.85));
	box-shadow: none;
}

row:selected:backdrop,
row:selected:focus:backdrop {
	border-width: 1px 0 1px 0;
	border-style: solid;
	border-color: shade (@theme_bg_color, 0.85);
	background-image: linear-gradient(to bottom,
		shade (@theme_bg_color, 1.0),
		shade (@theme_bg_color, 0.85));
	color: @theme_fg_color;
	text-shadow: none;
	box-shadow: none;
}

GtkTreeView row:nth-child(even),
GtkTreeView row:nth-child(odd) {
	background-color: shade (@theme_base_color, 1.0);
/* since gtk+-3.18, better no shadow */
/*	box-shadow: inset 0 -1px 0 0 alpha (@theme_bg_color, 0.4); */
	box-shadow: none;
}

GtkTreeView row:nth-child(odd):hover,
GtkTreeView row:nth-child(even):hover {
	background-color: shade (@theme_selected_bg_color, 1.30);
}

GtkTreeView row:nth-child(odd):backdrop:hover,
GtkTreeView row:nth-child(even):backdrop:hover {
	background-color: shade (@theme_base_color, 0.96);
}

.sidebar GtkTreeView row:backdrop:selected {
	background-color: @theme_selected_bg_color;
	border-style: solid;
	border-width: 1px 0 1px 0;
	border-top-color: @borders;
	border-bottom-color: shade (@theme_base_color, 0.96);
	box-shadow: inset 0 1px 0 alpha (@borders, 0.3), inset 0 -1px 0 @borders;
}

/* ie. pluma open dialog */
.sidebar GtkTreeView row:hover {
	background-color: shade (@theme_selected_bg_color, 1.15);
	color: shade (@theme_selected_bg_color, 0.35);
}

.sidebar GtkTreeView row:active:hover,
.sidebar GtkTreeView row:checked:hover,
.sidebar GtkTreeView row:selected:hover {
	color: shade (@theme_selected_fg_color, 1.00);
}

column-header.button,
column-header .button {
	color: @theme_fg_color;
}

column-header.button,
column-header .button,
column-header.button:insensitive,
column-header .button:insensitive,
column-header.button:hover,
column-header .button:hover {
	padding: 0 4px;
	text-shadow: none;
	icon-shadow: none;
	border-radius: 0;
}

column-header.button:insensitive,
column-header .button:insensitive {
	background-color: @insensitive_bg_color;
}

column-header.button:hover,
column-header .button:hover,
column-header.button:active,
column-header .button:active,
column-header.button:active:hover,
column-header .button:active:hover,
column-header.button:checked,
column-header .button:checked,
column-header.button:checked:hover,
column-header .button:checked:hover {
	color: @theme_fg_color;
	text-shadow: none;
	icon-shadow: none;
	border-radius: 0;
}

column-header .button.dnd {
	background-color: transparent;
	background-image: linear-gradient(to bottom,
		shade(@theme_base_color, 0.97),
		@theme_base_color);
	border-width: 0 1px;
	border-image-slice: 0 1;
}

/*********************
 * App Notifications *
 *********************/

.app-notification,
.app-notification.frame {
    color: @theme_fg_color;
    padding: 10px;
    border: none;
    border-radius: 0 0 4px 4px;
    background-color: rgba(172, 205, 138, 0.7);
    background-image: linear-gradient(to bottom,
                                      rgba(0, 0, 0, 0.2),
                                      transparent 2px);
    background-clip: padding-box;
}

.app-notification:backdrop,
.app-notification.frame:backdrop {
    background-image: none;
}

.app-notification .button,
.app-notification .header-bar .button.titlebutton,
.header-bar .app-notification .button.titlebutton,
.app-notification .titlebar .button.titlebutton,
.titlebar .app-notification .button.titlebutton,
.app-notification GtkCalendar.header .button.titlebutton,
GtkCalendar.header .app-notification .button.titlebutton,
.app-notification.frame .button {
    color: @theme_fg_color;
    border-color: rgba(89, 112, 75, 0.7);
    background-image: linear-gradient(to bottom,
                                      rgba(172, 205, 138, 0.7));
    background-clip: padding-box;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
    text-shadow: none;
    icon-shadow: 0 1px black;
    outline-color: rgba(238, 238, 236, 0.3);
    border-radius: 3px;
    padding: 0 0px 2px 0px;
}

.app-notification .button.flat,
.app-notification .header-bar .titlebutton.button,
.header-bar .app-notification .titlebutton.button,
.app-notification .titlebar .titlebutton.button,
.titlebar .app-notification .titlebutton.button,
.app-notification GtkCalendar.header .titlebutton.button,
GtkCalendar.header .app-notification .titlebutton.button,
.app-notification.frame .button.flat,
.app-notification.frame .header-bar .titlebutton.button,
.header-bar .app-notification.frame .titlebutton.button,
.app-notification.frame .titlebar .titlebutton.button,
.titlebar .app-notification.frame .titlebutton.button,
.app-notification.frame GtkCalendar.header .titlebutton.button,
GtkCalendar.header .app-notification.frame .titlebutton.button {
    icon-shadow: 0 1px black;
    text-shadow: 0 1px black;
}

.app-notification .button:hover,
.app-notification.frame .button:hover {
    color: white;
    border-color: rgba(0, 0, 0, 0.7);
    background-image: linear-gradient(to bottom,
                                      rgba(119, 158, 79, 0.7));
    background-clip: padding-box;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
    text-shadow: none;
    icon-shadow: 0 1px black;
    outline-color: rgba(238, 238, 236, 0.3);
    border-radius: 3px;
}

.app-notification .button:active,
.app-notification .button:checked,
.app-notification .button:backdrop:active,
.app-notification .button:backdrop:checked,
.app-notification.frame .button:active,
.app-notification.frame .button:checked,
.app-notification.frame .button:backdrop:active,
.app-notification.frame .button:backdrop:checked {
    color: white;
    border-color: rgba(0, 0, 0, 0.7);
    background-image: linear-gradient(to bottom,
                                      rgba(105, 175, 65, 0.7));
    background-clip: padding-box;
    box-shadow: none;
    text-shadow: none;
    icon-shadow: none;
    outline-color: rgba(238, 238, 236, 0.3);
    border-radius: 3px;
}

.app-notification .button:insensitive,
.app-notification .button:backdrop:insensitive,
.app-notification.frame .button:insensitive,
.app-notification.frame .button:backdrop:insensitive {
    color: #878989;
    border-color: rgba(0, 0, 0, 0.7);
    background-image: linear-gradient(to bottom,
                                      rgba(52, 57, 57, 0.5));
    background-clip: padding-box;
    box-shadow: none;
    text-shadow: none;
    icon-shadow: none;
    border-radius: 3px;
    padding: 0px;
}

.app-notification .button:backdrop,
.app-notification.frame .button:backdrop {
    color: #eeeeec;
    border-color: rgba(0, 0, 0, 0.7);
    background-image: linear-gradient(to bottom,
                                      rgba(172, 205, 138, 0.7));
    background-clip: padding-box;
    box-shadow: none;
    text-shadow: none;
    icon-shadow: none;
    border-radius: 3px;
    padding: 0px;
}

/*************
 * Expanders *
 *************/
GtkTreeView.view.expander {
	-gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
	color: @theme_fg_color;
}
GtkTreeView.view.expander:dir(rtl) {
	-gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); 
}
GtkTreeView.view.expander:hover {
	color: @theme_fg_color;
}
GtkTreeView.view.expander:selected {
	color: @theme_selected_fg_color;
}
GtkTreeView.view.expander:selected:hover {
	color: @theme_selected_fg_color;
}
GtkTreeView.view.expander:checked {
	-gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

GtkExpander {
    -gtk-icon-style: regular;
	-gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
}
GtkExpander:dir(rtl) {
	-gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl");
}
GtkExpander:hover {
	color: @internal_element_color;
}
GtkExpander:checked {
	-gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

.expander {
	color: @theme_fg_color;
	border-color: @theme_fg_color;
}

.expander:active {
	color: @theme_fg_color;
	border-color: @theme_fg_color;
}

.expander:hover {
	color: @internal_element_color;
	border-color: @internal_element_color;
}

.expander row:selected,
.expander row:selected:focus {
	color: @expander_row_selected_color;
	border-color: @expander_row_selected_color;
	border-width: 0;
	background-color: transparent;
	background-image: none;
	border-image: none;
	box-shadow: none;
}

.expander row:selected:hover,
.expander row:selected:focus:hover {
	color: @theme_selected_fg_color;
	border-color: @theme_selected_fg_color;
}

/**************
 * List boxes *
 **************/

.list {
	background-color: @list_box_bg;
}

.list-row {
    padding: 2px;
    transition: all 200ms ease-in;
    background-image: none;
    background-color: @theme_base_color;
}

.list-row:hover {
    background-image: none;
    background-color: shade (@theme_selected_bg_color, 1.55);
    color: shade (@theme_selected_bg_color, 0.35);
}

.list-row:selected,
.list-row:selected:hover {
    border-width: 0;
    border-style: solid;
    border-color: shade (@theme_selected_bg_color, 0.85);
    background-color: @theme_selected_bg_color;
    background-image: linear-gradient(to bottom,
                                      shade (@theme_selected_bg_color, 1.0),
                                      shade (@theme_selected_bg_color, 0.85));
    box-shadow: none;
    color: @theme_selected_fg_color;
}

.list-row:selected:backdrop,
.list-row:selected:backdrop:hover {
    border-width: 0;
    border-style: solid;
    border-color: shade (@theme_bg_color, 0.85);
    background-image: linear-gradient(to bottom,
                                      shade (@theme_selected_bg_color, 0.94),
                                      shade (@theme_selected_bg_color, 0.94));
    color: @theme_fg_color;
    text-shadow: none;
    box-shadow: none;
}

.list-row.button {
    border-color: transparent;
    background-color: @theme_base_color;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    icon-shadow: none;
    border-image: none;
    border-radius: 0;
    border: none;
}

.list-row.button:selected,
.list-row.button:selected:hover,
.list-row.button:active,
.list-row.button:checked,
.list-row.button:active:hover,
.list-row.button:checked:hover {
    background-color: @theme_selected_bg_color;
    background-image: linear-gradient(to bottom,
                                      shade (@theme_selected_bg_color, 1.0),
                                             shade (@theme_selected_bg_color, 0.85));
    color:  @theme_selected_fg_color;
    text-shadow: none;
    icon-shadow: none;
    border-radius: 0px;
    border-image: none;
    border-style: solid;
    border-width: 0px;
}

.list-row.button:hover {
    background-image: none;
    background-color: shade (@theme_selected_bg_color, 1.55);
    color: shade (@theme_selected_bg_color, 0.35);
    text-shadow: none;
    icon-shadow: none;
    border-image: none;
    border-radius: 0px;
    border-style: solid;
}

/**************
 * Calendar   *
 **************/

GtkCalendar {
	padding: 2px;
}

GtkCalendar.view {
	border-radius: 3px;
	border-style: solid;
	border-width: 1px;
	padding: 2px;
}

GtkCalendar.header {
	border-radius: 0;
	background-image: linear-gradient(to bottom,
		shade(@theme_bg_color, 1.04),
		shade(@theme_bg_color, 0.89));
	border-width: 0;
}

GtkCalendar.button,
GtkCalendar.button:insensitive {
	background-image: none;
	background-color: transparent;
}

.highlight,
GtkCalendar.highlight {
	background-color: @theme_selected_bg_color;
	color: @theme_selected_fg_color;
	border-radius: 0;
	padding: 0;
	border-width: 0;
}

/******************
 * GtkAboutDialog *
 ******************/

GtkAboutDialog.background .vertical.dialog-vbox  GtkGrid.vertical {
    background: transparent;
}

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

.info,
.question,
.warning,
.error {
	background-color: @infobar_bg_color;
	color: @infobar_fg_color;
	text-shadow: none;
	border-color: darker(@infobar_bg_color);
}

.info .button.close,
.warning .button.close,
.question .button.close,
.error .button.close {
	color: @theme_fg_color;
	icon-shadow: none;
}

.info .button.close:hover,
.warning .button.close:hover,
.question .button.close:hover,
.error .button.close:hover {
	background-image: linear-gradient(to bottom,
		alpha(white, 0.3),
		alpha(white, 0.2) 30%,
		alpha(black, 0.02));
}

.info .button.close:active,
.warning .button.close:active,
.question .button.close:active,
.error .button.close:active {
	color: @infobar_fg_color;
	background-image: linear-gradient(to bottom,
		alpha(black, 0.1),
		transparent);
}

.info .entry,
.info .entry:focus,
.info .button,
.info .button:insensitive,
.info .button:active,
.info .button:checked,
.warning .entry,
.warning .entry:focus,
.warning .button,
.warning .button:insensitive,
.warning .button:active,
.warning .button:checked,
.error .entry,
.error .entry:focus,
.error .button,
.error .button:insensitive,
.error .button:active,
.error .button:checked,
.question .entry,
.question .entry:focus,
.question .button,
.question .button:insensitive,
.question .button:active,
.question .button:checked {
	color: @theme_fg_color;
	border-color: darker(@infobar_bg_color);
	border-style: solid;
	border-width: 1px;
}

/**************
 * Dim labels *
 **************/
.view.dim-label,
.dim-label {
	color: alpha(currentColor, 0.55);
	text-shadow: none;
}

/*************
 * Popovers *
 *************/
.popover {
	background-clip: initial;
	margin: 10px;
	padding: 2px;
	border-color: @borders;
	border-width: 1px;
	border-style: solid;
	border-radius: 3px;
	background-color: @menu_bg_color;
	box-shadow: 0 1px 5px @wm_shadow;
	text-shadow: none;
	icon-shadow: none; 
}

.popover > .list, 
.popover > .view, 
.popover > .toolbar .popover.osd > .toolbar, 
.popover > .inline-toolbar .popover.osd > .toolbar, 
.popover > .search-bar .popover.osd > .toolbar, 
.popover > .location-bar .popover.osd > .toolbar,
.popover > .toolbar .popover.osd > .inline-toolbar, 
.popover > .inline-toolbar .popover.osd > .inline-toolbar, 
.popover > .search-bar .popover.osd > .inline-toolbar, 
.popover > .location-bar .popover.osd > .inline-toolbar,
.popover > .toolbar .popover.osd > .search-bar, 
.popover > .inline-toolbar .popover.osd > .search-bar, 
.popover > .search-bar .popover.osd > .search-bar,
.popover > .location-bar .popover.osd > .search-bar,
.popover > .toolbar .popover.osd > .location-bar,
.popover > .inline-toolbar .popover.osd > .location-bar, 
.popover > .search-bar .popover.osd > .location-bar, 
.popover > .location-bar .popover.osd > .location-bar {
	border-style: none;
	background-color: transparent;
}

.popover .separator {
	font-size: 80%;
	font-weight: bold;
	color: alpha(@theme_fg_color,0.1);
	text-shadow: none;
	background-color: transparent;
	icon-shadow: none;
	border: 0;
}

.popover.osd {
	background-image: none;
	background-color: alpha(shade(#3D3E40, 0.85), 0.75);
	border: 1px solid black;
	box-shadow: none;
	color: @theme_selected_fg_color;
}
.popover.osd .toolbar {
	background-image: none;
	background-color: transparent;
	border: none;
	box-shadow: none;
}
.popover.osd .button {
	text-shadow: 0 -1px @osd_text_shadow;
	icon-shadow: 0 -1px @osd_text_shadow;
}
.popover.osd .button:active,
.popover.osd .button:checked {
        box-shadow: none;
}
.popover.osd .button:insensitive {
	color: alpha(@theme_selected_fg_color, 0.4);
}

.popover .list {
	background-color: @theme_base_color;
}

GtkModelButton.button {
	color: @theme_fg_color;
	border-radius: 0;
}

GtkModelButton.button:checked,
GtkModelButton.button:active,
GtkModelButton.button:insensitive,
GtkModelButton.button:active:insensitive,
GtkModelButton.button:checked:insensitive,
GtkModelButton.button,
GtkModelButton.button:focus,
GtkModelButton.button:active:focus,
GtkModelButton.button:checked:focus,
GtkModelButton.button.flat:checked,
GtkModelButton.button.flat:active,
GtkModelButton.button.flat:insensitive,
GtkModelButton.button.flat:active:insensitive,
GtkModelButton.button.flat:checked:insensitive,
GtkModelButton.button.flat,
GtkModelButton.button.flat:focus,
GtkModelButton.button.flat:active:focus,
GtkModelButton.button.flat:checked:focus {
	background-color: @menu_bg_color;
	background-image: none;
	border-color: transparent;
	border-image: none;
	border-style: none;
	box-shadow: none;
	border-radius: 2px;
}

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

/* middle button*/
.linked GtkModelButton.button:hover,
.linked GtkModelButton.button:active:hover,
.linked GtkModelButton.button:checked:hover {
    border-right-width: 0px;
    border-left-width:  0px;
    border-radius: 0;
}

/* left button*/
.linked GtkModelButton.button:hover:first-child,
.linked GtkModelButton.button:active:hover:first-child,
.linked GtkModelButton.button:checked:hover:first-child {
    border-right-width: 0px;
    border-radius: 3px 0 0 3px;
}

/* right button*/
.linked GtkModelButton.button:hover:last-child,
.linked GtkModelButton.button:active:hover:last-child,
.linked GtkModelButton.button:checked:hover:last-child {
    border-left-width:  0px;
    border-radius: 0 3px 3px 0;
}

.popover .button.default.suggested-action.text-button {
    background-color: @menu_bg_color;
    color: @theme_fg_color;
    background-image: none;
    text-shadow:none;
    border-image: none;
    border-style: none;
    box-shadow: none;
    border-radius: 2px;
}

.popover .button.default.suggested-action.text-button:hover {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

.entry.cursor-handle,
.cursor-handle {
	background-color: transparent;
	background-image: none;
	box-shadow: none;
	border-style: none;
}

.entry.cursor-handle.top,
.cursor-handle.top {
	-gtk-icon-source: -gtk-icontheme("selection-start-symbolic");
}

.entry.cursor-handle.bottom,
.cursor-handle.bottom {
	-gtk-icon-source: -gtk-icontheme("selection-end-symbolic");
}

/*******
 * CSD *
 *******/
.titlebar {
    text-shadow: 0 1px @wm_title_shadow;
    background-image: linear-gradient(to bottom,
                                      @wm_bg_a,
                                      @wm_bg_b);
    border-radius: 6px 6px 0px 0px;
    box-shadow: inset 0 -1px alpha(@theme_base_color, 0.4);
    border-color: @borders;
}

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

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

/* 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;
    box-shadow: none;
}

.titlebar .title {
    font: Bold 10;
}

.titlebar:backdrop {
    color: @theme_unfocused_fg_color;
}

.titlebar .titlebutton {
    color: @wm_title;
    padding: 4px 5px;
/*    border: none;
    border-image: none;*/
}

.titlebar .titlebutton {
    color: @wm_title;
    padding: 2px 6px 3px 3px;
    border: none;
    border-image: none;
    /* fake request for hardcoded icons,
     to avoid usage of regular window-close button*/
    -gtk-icon-style: requested;
}

.titlebar .titlebutton:hover {
    border: none;
    border-image: none;
}

.titlebar .titlebutton:active,
.titlebar .titlebutton:checked,
.titlebar .titlebutton:checked:checked {
    border: none;
    border-image: none;
}

.titlebar .titlebutton:backdrop {
    color: @wm_unfocused_title;
    icon-shadow: none;
}

/* workaround to avoid unwanted black frames if switching compositor on/off */
.background .window-frame  {
    box-shadow: none;
}

.background.csd .window-frame {
    border-radius: 6px 6px 0px 0px;
    border-width: 0px;
    box-shadow: 0 0 0 1px @wm_border, 0 2px 8px 3px @wm_shadow;
    /* this is used for the resize cursor area */
    margin: 10px;
}

/* workaround to avoid unwanted black frames if switching compositor on/off */
.window-frame:backdrop {
/*    box-shadow: 0 0 0 1px shade(@wm_border,1.1), 0 2px 5px 1px @wm_shadow;*/
    box-shadow: none;
}

.window-frame.tiled {
    border-radius: 0;
    background-color: @theme_bg_color;
}

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

.window-frame.solid-csd {
    border-radius: 0;
    margin: 2px;
    background-color: @wm_bg_a;
    border: solid 1px @wm_csd_solid_border_color;
    box-shadow: none;
}

.window-frame.csd.popup {
    border-radius: 0;
    box-shadow: none;
}

.window-frame.csd.tooltip {
    border-radius: 5px;
    box-shadow: 0 1px 5px @wm_shadow;
}

.window-frame.csd.message-dialog {
    border-radius: 7px;
    box-shadow: 0 1px 5px @wm_shadow;
}

/* print dialog */
GtkPrintUnixDialog.background .vertical.view.dialog-vbox {
    background-color: shade (@theme_bg_color, 1.1)
}

/* Various hacks and shit */
/* FIXME - BELOW: Some stuff that can probably be done better or in another way */

/* Floating Bar */
.floating-bar {
	background-image: linear-gradient(to bottom, 
		@theme_base_color 20%, 
		shade(@theme_base_color, 0.9));
	background-color: @theme_base_color;
	border-color: @borders;

	color: @theme_text_color;
	text-shadow: 0 1px @button_text_shadow;

	border-radius: 0px;
	border-width: 1px;
	border-style: solid;
	box-shadow: inset 1px 1px @inset_light_color, -1px -1px @inset_light_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-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.floating-bar.bottom.right {
	box-shadow: inset 1px 1px @inset_light_color;
}

.floating-bar.bottom.left {
	box-shadow: inset -1px 1px @inset_light_color;
}

.floating-bar .button {
	background-color: alpha (@theme_base_color, 0.0);
	background-image: none;

	border-style: none;
	border-image: none;

	-GtkButton-image-spacing: 0;
	-GtkButton-inner-border: 0;
}

