* {
    -GtkRange-stepper-size: 2;
    -GtkScale-slider-length: 28;
    -GtkRange-slider-width: 28;
    -GtkTreeView-expander-size: 12; /* arrow size in list/tree views */
    -GtkWidget-cursor-color: @theme_cursor_color;
    -GtkWidget-cursor-aspect-ratio: 0.08;
    -GtkWidget-focus-padding: 1;
    /* disable focusline on active notebook tabs if focused*/
    -GtkWidget-focus-line-width: 0;
    -GtkWidget-focus-line-pattern: "\002\002";
    -GtkMenu-horizontal-padding: 0;
    -GtkMenu-vertical-padding: 0;
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 1;
    -GtkComboBox-arrow-scaling: 0.9;
    -GtkButton-default-border: 0;
    -GtkWindow-resize-grip-width: 15;
    -GtkWindow-resize-grip-height: 15;
    -GtkStatusbar-shadow-type: none;
    background-clip: padding-box;
    outline-width: 0px; /* disable ugly focus-line */
    -gtk-icon-style: regular; /* disable symbolic icons */
}

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

/* FIXME: why do we still need this? */
GtkClutterOffscreen {
    background-color: @theme_base_color;
}

*:insensitive {
    background-color: @theme_button_insensitive_bg;
    border-color: @theme_button_insensitive_active_bg;
    color: @theme_insensitive_color;
}

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

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

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

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

.gtkstyle-fallback:insensitive {
    background-color: @theme_insensitive_bg;
    color: @theme_insensitive_color;
}

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

/********
 * Misc *
 ********/
GtkCheckButton:selected,
GtkCheckButton:selected:focus {
    background-color: @theme_internal_bg;
    color: @theme_fg_color;
}

.image {
    color: @theme_selected_bg_color;
}

.image:hover {
    color: @theme_fg_color;
}

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

.tooltip,
.tooltip.background {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
    border-color: @theme_fg_color;
    border-style: solid;
    border-width: 1px;
}

.view.rubberband,
.rubberband {
    border-color: @theme_fg_color;
    border-style: solid;
    border-width: 1px;

    background-color: alpha(@theme_internal_bg, 0.35);
}

.grip {
	background-color: transparent;
	background-image: url("resize-grip.svg");
}

.separator {
    color: @theme_insensitive_border;
}

.floating-bar {
    background-color: @theme_insensitive_bg;
    border-width: 1px;
    border-radius: 3px;
    border-style: solid;
}

.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 .button {
    background-color: transparent;
    border-style: none;
}

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

GtkColorSwatch {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_fg_color;
}

/******************
 * Colored states *
 ******************/
.info {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

.warning {
    background-color: @warning_bg_color;
    color: @warning_fg_color;
}

.question {
    background-color: @question_bg_color;
    color: @question_fg_color;
}

.error {
    background-color: @error_bg_color;
    color: @error_fg_color;
}

/*************
 * 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;
}

.level-bar.fill-block {
    padding: 2px;

    border-width: 1px;
    border-style: solid;

    background-color: @theme_highlight_color;
}

.level-bar.fill-block.level-high {
    background-color: @success_color;
    border-color: darker(@success_color);
}

.level-bar.fill-block.level-low {
    background-color: @warning_bg_color;
    border-color: darker(@warning_bg_color);
}

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

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

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

/*********************
 * 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;
}

/***********
 * Buttons *
 ***********/
.button {
    border-width: 2px;
    border-style: solid;
    border-color: @theme_button_fg;
    border-radius: 3px;
    background-color: @theme_button_bg;
    padding: 1px 4px;
    color: @theme_button_fg;
}

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

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

/* ie. mate-control-center */
.button.flat {
    padding: 0px;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    color: @theme_fg_color;
    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 {
    border-radius: 3px;
}

.button:active,
.button:checked {
    background-color: @theme_button_active_bg;
    color: @theme_selected_fg_color;
    border-color: @theme_button_fg;
}

.button:insensitive {
    background-color: @theme_button_insensitive_bg;
    border-color: @theme_button_insensitive_border;
}

.button:insensitive:active,
.button:insensitive:checked {
    background-color: @theme_button_insensitive_active_bg;
    border-color: @theme_button_insensitive_active_border;
}

.button *:insensitive {
    color: @theme_button_insensitive_fg;
}

.button:active *:insensitive {
    color: @theme_button_insensitive_active_fg;
}

.button:hover {
    background-color: @theme_fg_color;
    border-color: @theme_fg_color;
    color: @theme_selected_fg_color;
}

.button:hover:active,
.button:hover:checked {
    background-color: @theme_fg_color;
    border-color: @theme_fg_color;
}

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

GtkComboBox *:insensitive {
    color: @theme_button_insensitive_fg
}

/***********
 * Entries *
 ***********/
.entry {
    border-width: 2px;
    border-style: solid;
    border-color: @theme_button_fg;
    border-radius: 3px;
    background-color: @theme_entry_bg;
    padding: 4px 4px 5px 4px;
}

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

/* needed for webkit/GtkStyle compatibility */
.entry:active {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

.entry:focus {
    border-width: 2px;
    border-color: @theme_highlight_color;
}

.entry:insensitive {
    border-color: @theme_insensitive_border;
    background-color: @theme_insensitive_bg;
    color: @theme_insensitive_color;
}

/**************
 * Comboboxes *
 **************/
GtkComboBox *:hover {
    color: @theme_insensitive_bg;
}

GtkComboBox .separator {
    color: transparent;
}

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

.combobox-entry .button,
.toolbar .combobox-entry .button {
    background-color: @theme_entry_bg;
    color: @theme_fg_color;
    border-width: 2px;
    border-color: @theme_button_fg;
}

.combobox-entry .button:hover {
    background-color: @theme_fg_color;
}

.combobox-entry .button:active,
.combobox-entry .button:checked {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

.combobox-entry .button:insensitive {
    background-color: @theme_insensitive_bg;
    color: @theme_internal_bg;
    border-color: @theme_insensitive_border;
}

.combobox-entry .entry:first-child {
    border-right-width: 0px;
    border-radius: 3px 0px 0px 3px;
}

.combobox-entry .entry:last-child {
    border-left-width: 0px;
    border-radius: 0px 3px 3px 0px;
}

.combobox-entry .button:first-child {
    border-radius: 3px 0px 0px 3px;
}

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

/***************************
 * Trough and progressbars *
 ***************************/
.trough {
    background-color: @theme_trough_bg;
    color: @theme_trough_fg;

    border-width: 1px;
    border-style: solid;
    border-color: @theme_trough_fg;
    border-radius: 3px;
}

.trough:insensitive {
    border-color: @theme_trough_insensitive_border;
    background-color: @theme_trough_insensitive_bg;
    color: @theme_trough_insensitive_fg;
}

.trough:insensitive:active {
    background-color: @theme_insensitive_bg;
}

GtkProgressBar {
	/* FIXME - Not working 3.14 */
	-GtkProgressBar-min-horizontal-bar-height: 20;
	-GtkProgressBar-min-vertical-bar-width: 20;
	border-radius: 6px;
}

.progressbar {
    background-color: @theme_highlight_color;
    border-width: 1px;
    border-color: @theme_highlight_border;
    border-radius: 3px;
    border-style: solid;
}

/***************
 * Spinbuttons *
 ***************/
.spinbutton .button {
    padding: 2px 6px;
    color: @theme_selected_bg_color;

    border-width: 1px;
    border-radius: 0;
    background-color: @theme_entry_bg;
    background-clip: border-box;

    border-color: @theme_internal_border;
}

.spinbutton .button:hover {
    background-color: @theme_selected_bg_color;
    color: @theme_insensitive_bg;
    border-color: @theme_selected_bg_color;
}

.spinbutton .button:insensitive {
    color: @theme_insensitive_color;
    background-color: @theme_insensitive_bg;
    border-color: @theme_insensitive_border;
}

.spinbutton .button:focus {
    border-color: @theme_highlight_color;
}

.spinbutton .button:first-child,
.spinbutton .button:last-child {
    border-color: transparent;
}

.spinbutton .button:first-child:focus {
    border-color: @theme_highlight_color;
    border-right-color: transparent;
}

.spinbutton .button:last-child:focus {
    border-color: @theme_highlight_color;
    border-left-color: transparent;
}

.spinbutton .button:first-child {
    border-radius: 2px 0 0 2px;
}

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

/*vertical */

.vertical.entry.spinbutton.entry {
    border-image: none;
    border-color: @theme_border_color;
    border-radius: 0px;
    border-width: 0px 2px 0px 2px;
    background-image: none;
    padding: 4px;
}

.vertical.entry.spinbutton .button:first-child,
.vertical.entry.spinbutton .button:hover:first-child,
.vertical.entry.spinbutton .button:focus:first-child,
.vertical.entry.spinbutton .button:active:first-child,
.vertical.entry.spinbutton .button:checked:first-child,
.vertical.entry.spinbutton .button:active:hover:first-child,
.vertical.entry.spinbutton .button:checked:hover:first-child {
    border-color: @theme_border_color;
    border-radius: 3px 3px 0px 0px;
    border-width: 2px;
}

.vertical.entry.spinbutton .button:last-child,
.vertical.entry.spinbutton .button:hover:last-child,
.vertical.entry.spinbutton .button:focus:last-child,
.vertical.entry.spinbutton .button:active:last-child,
.vertical.entry.spinbutton .button:checked:last-child,
.vertical.entry.spinbutton .button:active:hover:last-child,
.vertical.entry.spinbutton .button:checked:hover:last-child {
    border-color: @theme_border_color;
    border-width: 2px;
    border-radius: 0px 0px 3px 3px;
}

.vertical.entry.spinbutton.entry:insensitive,
.vertical.entry.spinbutton .button:insensitive,
.vertical.entry.spinbutton .button:insensitive:first-child
.vertical.entry.spinbutton .button:insensitive:last-child {
    border-color: @theme_insensitive_border;
}

/*********
 * Menus *
 *********/
.menu {
    border-style: solid;
    border-color: @theme_fg_color;
    border-width: 1px;

    color: @theme_fg_color;
}

.menuitem,
.menu .menuitem {
    color: @theme_fg_color;
    background-color: transparent;
}

.menuitem:insensitive,
.menu .menuitem:insensitive {
    color: @theme_button_insensitive_fg;
}

.menubar .menuitem:hover {
    color: @theme_fg_color;
    background-color: @theme_selected_bg_color;
}

.menu .menuitem:hover {
    color: @theme_fg_color;
    background-color: @theme_selected_bg_color;
    border-style: solid;
    border-left-width: 1px;
    border-right-width: 1px;
    border-left-color: @theme_fg_color;
    border-right-color: @theme_fg_color;
}

.menu .menuitem {
    padding: 4px;
}

.menubar .menuitem {
    padding: 3px 5px;
}

.menuitem.separator,
.menu .menuitem.separator {
    -GtkMenuItem-horizontal-padding: 0;
}

/************
 * Toolbars *
 ************/
.toolbar {
    padding: 4px;
    border-width: 1px 0;
    border-style: solid;
    border-color: @theme_border_color;

    background-color: @theme_toolbar_bg;
}

.toolbar .button {
    background-color: transparent;
    padding: 1px;
}

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

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

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

.primary-toolbar .button:insensitive {
    background-color: transparent;
    color: @theme_insensitive_color ;
}

.raised .button,
.raised.button {
    background-color: @theme_button_bg;
}

.raised .button:insensitive,
.raised.button:insensitive {
    border-color: @theme_button_insensitive_border;
    background-color: @theme_button_insensitive_bg;
    color: @theme_button_insensitive_fg;
}

.raised .button:active,
.raised.button:active,
.primary-toolbar .button:active,
.toolbar .button:active {
    background-color: @theme_button_active_bg;
    border-color: @theme_button_active_border;
}

.raised .button:hover,
.raised.button:hover,
.primary-toolbar .button:hover,
.toolbar .button:hover {
    background-color: @theme_fg_color;
    border-color: @theme_fg_color;
}

.raised .button:active:insensitive,
.raised.button:active:insensitive,
.primary-toolbar .button:active:insensitive,
.toolbar .button:active:insensitive {
    border-color: @theme_button_insensitive_active_bg;
    background-color: @theme_button_insensitive_active_bg;

    color: @theme_selected_fg_color;
}

/*******************
 * Inline toolbars *
 *******************/
.inline-toolbar {
    border-width: 0 1px 1px;
    -GtkToolbar-button-relief: normal;
}

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

.inline-toolbar .button {
    color: @theme_inline_toolbar_button_fg;
    background-color: @theme_inline_toolbar_button_bg;

    border-radius: 0;
    border-width: 1px 0;
    border-color: @theme_button_linked_border;
    box-shadow: inset -1px 0 @theme_inline_toolbar_button_side;
}

.inline-toolbar .button:hover {
    color: @theme_selected_fg_color;
    border-color: @theme_button_linked_border;
    box-shadow: none;
}

.inline-toolbar .button:active {
    color: @theme_selected_fg_color;
    border-color: @theme_button_linked_border;
}

.inline-toolbar .button:insensitive {
    border-color: @theme_button_linked_border;

    background-color: @theme_button_linked_insensitive_bg;
    color: @theme_button_linked_insensitive_fg;
}

.inline-toolbar .button:insensitive:active {
    border-color: @theme_button_linked_border;
}

.inline-toolbar .button:first-child,
.inline-toolbar GtkToolButton:first-child .button {
    border-radius: 3px 0 0 3px;
    border-left-width: 1px;
}

.inline-toolbar .button:last-child,
.inline-toolbar GtkToolButton:last-child .button {
    border-radius: 0 3px 3px 0;
    border-right-width: 1px;
    box-shadow: none;
}

.primary-toolbar.toolbar,
.primary-toolbar .toolbar,
.menubar.toolbar {
    -GtkToolbar-button-relief: normal;
}

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

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

.primary-toolbar .button.raised,
.primary-toolbar .raised .button {
    border-color: @theme_button_fg;
}

/******************
 * Linked buttons *
 ******************/

.button,
.button.menuitem.menubar,
GtkColorButton.button,
GtkComboBox.combobox-entry .button {
	padding: 4px;
}

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

/* 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,
.osd .button,
.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-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,
.osd .button:first-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-radius: 3px;
	border-right-width: 0;
	border-left-width: 2px;
	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,
.osd .button: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-radius: 3px;
	border-right-width: 2px;
	border-left-width: 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,
.osd .button: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-radius: 3px;
}

/* Middle button (vertical) */
.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: 0;
	border-bottom-width: 0;
	border-radius: 0;
}

/* Top button (vertical) */
.linked.vertical .entry:first-child,
.linked.vertical .button:first-child,
.linked.vertical .button:active:first-child,
.linked.vertical .button:active:hover:first-child,
.linked.vertical .button:checked:first-child,
.linked.vertical .button:checked:hover:first-child,
.linked.vertical .button:insensitive:first-child {
	border-bottom-width: 0;
	border-radius: 3px 3px 0 0;
}

/* Bottom button (vertical) */
.linked.vertical .entry:last-child,
.linked.vertical .button:last-child,
.linked.vertical .button:active:last-child,
.linked.vertical .button:active:hover:last-child,
.linked.vertical .button:checked:last-child,
.linked.vertical .button:checked:hover:last-child,
.linked.vertical .button:insensitive:last-child {
	border-top-width: 0;
	border-radius: 0 0 3px 3px;
}

/* Linked single button (vertical) */
.linked.vertical .entry:only-child,
.linked.vertical .button:only-child,
.linked.vertical .button:active:only-child,
.linked.vertical .button:active:hover:only-child,
.linked.vertical .button:checked:only-child,
.linked.vertical .button:checked:hover:only-child,
.linked.vertical .button:insensitive:only-child {
	border-top-width: 1px;
	border-bottom-width: 1px;
	border-radius: 3px;
}

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

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

/* 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-left-style: none;
	border-radius: 0;
    border-width: 2px;
    border-right-width: 2px;
    border-left-width:  0px;
	border-color: @theme_button_fg;
	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-left-style: none;
	border-radius: 0;
    border-width: 0 2px 2px;
    border-right-width: 2px;
    border-left-width:  0px;
	border-color: @theme_highlight_border;
	-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: 2px;
	border-radius: 3px 0 0px 3px;
	border-color: @theme_button_fg;
	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: 2px;
	border-radius: 3px 0 0px 3px;
	border-color: @theme_highlight_border;
	-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-left-style: none;
    border-width: 2px;
    border-left-width: 0;
	border-radius: 0 3px 3px 0;
	border-color: @theme_button_fg;
	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-left-style: none;
    border-width: 2px;
    border-left-width: 0;
	border-radius: 0 3px 3px 0;
	border-color: @theme_highlight_border;
	-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: 2px;
    border-radius: 3px;
	border-color: @theme_button_fg;
	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: 2px;
    border-radius: 3px;
	border-color: @theme_highlight_border;
	-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;
}

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

.scale,
.scale.scale-has-marks-above.scale-has-marks-below {
    -GtkScale-slider-length: 28;
    -GtkRange-slider-width: 28;
    -GtkRange-trough-border: 2;
}

.scale.fine-tune.trough,
.scale.scale-has-marks-above.scale-has-marks-below.fine-tune.trough {
    border-radius: 4px;
}

.scale.slider,
.scale.scale-has-marks-above.scale-has-marks-below.slider {
    border-width: 2px;
    border-style: solid;
    background-color: @theme_button_bg;
    padding: 1px 4px;
    color: @theme_button_fg;
    border-radius: 50%;
    border-color: darker(@theme_border_color);
    box-shadow: inset 0 1px white,
                inset 0 -2px @theme_bg_color,
                inset 0 -1px mix(@theme_bg_color,@theme_border_color, 0.5);
}

.scale.slider:hover,
.scale.scale-has-marks-above.scale-has-marks-below.slider:hover {
    border-width: 2px;
    border-style: solid;
    background-color: @theme_selected_bg_color;
    padding: 1px 4px;
    color: @theme_button_fg;
    border-color: darker(@theme_border_color);
    border-radius: 50%;
    box-shadow: inset 0 1px white,
                inset 0 -2px white,
                inset 0 -1px mix(@theme_bg_color,@theme_border_color, 0.5);
}

.scale.slider:insensitive,
.scale.scale-has-marks-above.scale-has-marks-below.slider:insensitive {
    border-style: solid; /* needed for double marks scales or they'll get overridden */
    border-color: @theme_button_insensitive_border;
    border-radius: 50%;
    background-image: linear-gradient(to bottom, @theme_insensitive_bg);
    box-shadow: none;
}

.scale.slider:active,
.scale.scale-has-marks-above.scale-has-marks-below.slider:active {
      border: 1px solid darker(@theme_selected_borders_color);
}

.scale.trough,
.scale.scale-has-marks-above.scale-has-marks-below.trough.vertical {
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    border-color: @theme_border_color;
    background-color: shade(@theme_button_bg, 0.8);
    box-shadow: inset 1px 1px transparentize(black, 0.9);
    margin: 12px 0px 12px 0px;
}

.scale.trough.vertical,
.scale.scale-has-marks-above.scale-has-marks-below.trough.vertical {
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    border-color: @theme_border_color;
    background-color: shade(@theme_button_bg, 0.8);
    box-shadow: inset 1px 1px transparentize(black, 0.9);
    margin:  0 12px 0 12px;
}

.scale.trough.highlight,
.scale.scale-has-marks-above.scale-has-marks-below.trough.highlight,
.scale.vertical.scale-has-marks-above.scale-has-marks-below.trough.highlight {
      border-color: @theme_selected_borders_color;
      background-color: @theme_highlight_color;
}

.scale.trough.highlight.vertical,
.scale.trough.vertical.highlight,
.scale.scale-has-marks-above.scale-has-marks-below.trough.highlight.vertical,
.scale.vertical.scale-has-marks-above.scale-has-marks-below.trough.highlight.vertical,
.scale.scale-has-marks-above.scale-has-marks-below.trough.vertical.highlight,
.scale.vertical.scale-has-marks-above.scale-has-marks-below.trough.vertical.highlight {
      border-color: @theme_selected_borders_color;
      background-color: @theme_highlight_color;
}

.scale.trough:insensitive,
.scale.trough.vertical:insensitive,
.scale.scale-has-marks-above.scale-has-marks-below.trough:insensitive,
.scale.vertical.scale-has-marks-above.scale-has-marks-below.trough:insensitive,
.scale.trough .highlight:insensitive,
.scale.trough.vertical .highlight:insensitive,
.scale.scale-has-marks-above.scale-has-marks-below.trough .highlight:insensitive,
.scale.vertical.scale-has-marks-above.scale-has-marks-below.trough .highlight:insensitive {
      border-color: @theme_insensitive_border;
      background-color: @theme_insensitive_bg;
      box-shadow: none;
}

.scale.trough:insensitive {
    margin: 12px 2px 12px 2px;
}

.scale.trough.vertical:insensitive {
    margin: 2px 12px 2px 12px ;
}

.scale.scale-has-marks-below.trough {
   margin: 12px 1px 12px 1px;
}

.scale.slider ,
.scale.vertical.slider,
.scale.horizontal.slider,
.scale.vertical.slider:insensitive,
.scale.horizontal.slider:insensitive,
.scale.scale-has-marks-below.slider,
.scale.scale-has-marks-below.slider {
   margin: 0px;
}

.scale.fine-tune.slider ,
.scale.fine-tune.vertical.slider,
.scale.fine-tune.horizontal.slider {
   margin: 4px;
}

/**********
 * Switch *
 **********/
GtkSwitch {
    font: bold;
}

GtkSwitch.slider {
    padding: 2px;
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    border-color: @theme_switch_slider_border;
    background-color: @theme_switch_slider_bg;
    background-clip: border-box;
}

GtkSwitch.slider:insensitive {
    background-color: @theme_switch_slider_insensitive_bg;
    border-color: @theme_switch_slider_insensitive_border;
}

GtkSwitch.slider:active {
    border-color: @theme_switch_slider_active_bg;
    background-color: @theme_button_active_bg;
}

GtkSwitch.slider:active:insensitive {
    border-color: @theme_switch_slider_active_insensitive_bg;
    background-color: @theme_switch_slider_active_insensitive_bg;
}

GtkSwitch.trough {
    color: @theme_button_fg;
    border-radius: 3px;
}

GtkSwitch.trough:active {
    color: @theme_switch_slider_active_bg;
    background-color: @theme_highlight_color;
    border-color: @theme_highlight_alt;
}

GtkSwitch.trough:active:insensitive {
    background-color: alpha(@theme_highlight_color, 0.30);
    border-color: alpha(@theme_highlight_alt, 0.30);
    color: @theme_trough_insensitive_fg;
}

/************
 * Notebook *
 ************/
.notebook {
    padding: 0;
    background-clip: border-box;
    border-style: solid;
    border-color: @theme_border_color;
    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;
}

.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.76),
                                      shade(@theme_bg_color, 0.8));
    border-width: 0px;
 }

.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 {
    padding: 6px 3px 4px 12px;
}

.notebook tab.bottom {
    padding: 4px 3px 6px 12px;
}

.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_selected_bg_color, 0.2),
                                      alpha(@theme_selected_bg_color, 0.5));
    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_selected_bg_color, 0.0),
                                      alpha(@theme_selected_bg_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 3px 5px 12px;
}

.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_selected_bg_color, 0.0),
                                      alpha(@theme_selected_bg_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_selected_bg_color, 0.0),
                                      alpha(@theme_selected_bg_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_selected_bg_color, 0.0),
                                      alpha(@theme_selected_bg_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_selected_bg_color, 0.6);
    icon-shadow: 0 1px @button_text_shadow;
}

.notebook tab .button:hover {
    color: @theme_selected_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;
}

/*******************************
 * Frames and scrolled windows *
 *******************************/
.frame {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_border_color;
}

.frame.flat {
    border-width: 1px;
    border-style: none;
    border-color: @theme_border_color;
}

.frame.action-bar {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_border_color;
    padding: 6px;
    border-width: 1px 0 0;
}

GtkScrolledWindow.frame {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_border_color;
}

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

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

.scrollbar {
    -GtkRange-slider-width: 17;
    -GtkRange-stepper-size: 17;
    -GtkRange-trough-border: 0;
    -GtkScrollbar-has-backward-stepper: true;
    -GtkScrollbar-has-forward-stepper: true;
    -GtkScrollbar-min-slider-length: 64;
}

.scrollbars-junction {
    background-image: linear-gradient(to bottom,
                                      shade (@theme_internal_bg, 1.0),
                                      shade (@theme_internal_bg, 1.0));
    background-color: @theme_internal_bg;
    border-width: 0px;
    border-color: @theme_internal_bg;
    border-radius: 0px;
    border-image: linear-gradient(to bottom,
                                  shade (@theme_internal_bg, 1.0),
                                  shade (@theme_internal_bg, 1.0));
    box-shadow: none;
}

.scrollbar.trough,
.scrollbar.trough.vertical,
.sidebar .scrollbar.trough,
.osd .scrollbar.trough {
    background-color: @theme_internal_bg;
    border-width: 0;
    border-color: transparent;
    border-radius: 0;
}

.scrollbar.trough.horizontal {
    background-color: @theme_internal_bg;
    border-width: 0;
    border-color: transparent;
    border-radius: 0;
}

.scrollbar.slider,
.sidebar .scrollbar.slider,
.osd .scrollbar.slider {
    background-color: @theme_slider_bg;
    border-style: solid;
    border-radius: 12px;
    border-width: 3px;
    border-color: transparent;
}

.scrollbar.slider:hover,
.scrollbar.slider:active:hover,
.scrollbar.slider.vertical:hover,
.scrollbar.slider.vertical:active:hover,
.scrollbar.slider.horizontal:hover,
.scrollbar.slider.horizontal:active:hover,
.sidebar .scrollbar.slider:hover,
.sidebar .scrollbar.slider:hover:active,
.osd .scrollbar.slider:hover,
.osd .scrollbar.slider:active {
    background-color: @theme_fg_color;
    border-width: 3px;
    border-color: transparent;
}

.scrollbar.slider.fine-tune:prelight:active {
    background-image: none;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 5px;
}

/******************
 * Column headers *
 ******************/
column-header .button,
column-header.button {
    font: bold;

    border-width: 1px;

    border-top-width: 0;
    border-right-width: 0;
    border-radius: 0;
}

column-header .button:hover {
    background-color: @theme_fg_color;
    color: @theme_selected_fg_color;
    border-color: @theme_fg_color;
}

column-header:first-child .button {
    border-left-width: 0;
}

/*******************
 * Checks & Radios *
 *******************/
.check,
.radio {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_check_radio_border;
    color: @theme_selected_bg_color;

    background-color: @theme_check_radio_bg;
}

.check:insensitive,
.radio:insensitive {
    border-color: @theme_button_insensitive_border;
    color: @theme_button_insensitive_fg;
    background-color: @theme_button_insensitive_bg;
}

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

.menuitem.radio:checked,
.menuitem.check:checked,
.menuitem.radio:active,
.menuitem.check:active,
.menuitem.radio:inconsistent,
.menuitem.check:inconsistent {
    color: @theme_selected_bg_color;
}

.menuitem.radio:checked:hover,
.menuitem.check:checked:hover,
.menuitem.radio:active:hover,
.menuitem.check:active:hover,
.menuitem.radio:inconsistent:hover,
.menuitem.check:inconsistent:hover {
    color: @theme_selected_fg_color;
}

.menuitem.radio:checked:insensitive,
.menuitem.check:checked:insensitive,
.menuitem.radio:active:insensitive,
.menuitem.check:active:insensitive,
.menuitem.radio:inconsistent:insensitive,
.menuitem.check:inconsistent:insensitive {
    color: @theme_button_insensitive_fg;
}

/*********
 * Views *
 *********/
.expander row:selected:focus {
    color: @theme_selected_fg_color;
}

GtkViewport {
    background-color: @theme_view_bg;
}

.view {
    background-color: @theme_view_bg;
    color: @theme_fg_color;
}

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

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

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

GtkIconView.view.cell {
    border-radius: 4px;
}

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

.list,
.list-row {
    background-color: @base_color;
    border-color: @borders_color;
}

.list:backdrop,
.list-row:backdrop {
    background-color: @backdrop_base_color;
    border-color: @backdrop_borders_color;
}

.list-row,
.grid-child {
    padding: 2px;
}

.list-row.button {
    background-color: @base_color;
    border-style: none;
    border-radius: 0px;
    box-shadow: none;
}

.list-row.button:hover,
.list-row.button:backdrop:hover,
.list-row.button:selected:hover {
    background-color: @theme_selected_bg_color;
    color: @theme_fg_color;
    border-radius: 4px;
    box-shadow: inset  0px  1px shade (@theme_fg_color, 1.3),
                inset  1px  0px shade (@theme_fg_color, 1.3),
                inset -1px  0px shade (@theme_fg_color, 1.3),
                inset  0px -1px shade (@theme_fg_color, 1.3);
}

.list-row.button:active {
    box-shadow: inset 0 2px 2px -2px transparentize(black,0.8);
}

.list-row.button:selected,
.list-row.button:selected:active {
    background-color: @theme_fg_color;
    color: @theme_selected_fg_color;
    box-shadow: inset 0 2px 3px -1px transparentize(black,0.5);
    border-radius: 4px;
    border-style: none;
}

.list-row:selected {
    background-color: @theme_button_bg;
    color: @theme_fg_color;
    border-style: solid;
    border-radius: 4px;
}

.list-row:selected:backdrop {
   color: @backdrop_base_color;
}

/*******
 * OSD *
 *******/

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

GtkOverlay.osd {
    background-color: transparent;
}

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

.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_bg_color, 0.4);
}
.osd .button:insensitive {
    border-color: alpha(@osd_button_border,0.5);
}

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

.osd.button,
.osd .button {
    padding: 6px;
    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);
}

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

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

.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: 12px 8px;
    border-style: solid;
    border-width: 1px;
    border-color: shade (@theme_fg_color, 1.0);
    border-radius: 2px;
    background-image: linear-gradient(to bottom,
                                      @osd_toolbar_bg_a,
                                      @osd_toolbar_bg_b 63%,
                                      @osd_toolbar_bg_c);
    background-color: transparent;
    -GtkToolbar-button-relief: normal;
}

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

.osd.toolbar .button,
.osd.toolbar .button:hover,
.osd.toolbar .button:active,
.osd.toolbar .button:checked,
.osd.toolbar .button:active:hover,
.osd.toolbar .button:insensitive,
.osd.toolbar .linked .button,
.osd.toolbar .linked .button:hover,
.osd.toolbar .linked .button:active,
.osd.toolbar .linked .button:checked,
.osd.toolbar .linked .button:active:hover,
.osd.toolbar .linked .button:insensitive {
    border-color: shade (@theme_fg_color, 1.0);
    border-style: solid;
    border-image: none;
    padding: 12px;
    border-radius: 0px;
}

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

.osd.toolbar .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.toolbar .button:first-child,
.osd.toolbar .button:hover:first-child,
.osd.toolbar .button:active:first-child,
.osd.toolbar .button:active:hover:first-child {
    border-radius: 3px 0 0 3px;
    border-width: 1px 0 1px 1px;
    box-shadow: inset -1px 0 @osd_button_inset;
}

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

.osd.toolbar .button:only-child,
.osd.toolbar .button:hover:only-child,
.osd.toolbar .button:active:only-child,
.osd.toolbar .button:active:hover: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: 3px;
    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-color: shade (@theme_fg_color, 1.0);
    border-image: none;
    /* this defines the bg color of the played segment */
    background-color: @osd_scale_trough_bg_color;
}

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

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

.osd .scale.slider {
    margin: 0px;
}

.osd .scale.fine-tune.slider {
    margin: 2px;
}

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


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

GtkCalendar {
	padding: 2px;
}

GtkCalendar.view {
    border-color: @theme_selected_bg_color;
	border-radius: 0px;
	border-style: solid;
	border-width: 1px;
	padding: 2px;
}

GtkCalendar.header {
	border-radius: 0;
	background-color: @theme_button_bg;
	border-width: 0;
}

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

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

/***************
 * Header bars *
 ***************/
.header-bar {
    border-width: 0 0 1px;
    border-style: solid;
    border-color: @theme_border_color;

    background-color: @theme_base_color;

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

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

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

.header-bar .title {
    font: Bold 11;
}

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

/*************
 * Popovers *
 *************/

.popover {
	background-clip: initial;
	margin: 10px;
	padding: 2px;
	border-color: shade(@theme_bg_color, 0.8);
	border-width: 1px;
	border-style: solid;
	border-radius: 6px;
	background-color: shade(@theme_selected_bg_color, 0.8);
	background-image: linear-gradient(to bottom,
	                                  shade(@theme_base_color, 1.0),
	                                  shade(@theme_base_color, 0.85));
	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.5);
	text-shadow: none;
	background-color: transparent;
	icon-shadow: none;
	border: 0;
}

.popover.osd {
	background-image: none;
	background-color: alpha(shade(#3E403D, 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: 3px;
}

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 {
	color: @theme_fg_color;
	background-color: transparent;
	background-image: none;
	border-color: transparent;
	border-image: none;
	border-style: none;
	box-shadow: none;
	border-radius: 3px;
}

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

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

/*******
 * CSD *
 *******/
.titlebar {
    background-color: @theme_base_color;
    border-radius: 7px 7px 0px 0px;
}

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

.titlebar .title {
    font: Bold 11;
}

.titlebar .titlebutton {
    color: @theme_button_fg;
    background-color: transparent;
    padding: 5px;

    border-color: transparent;
}

.titlebar .titlebutton:hover {
    background-color: @theme_button_bg;
    border-color: @theme_button_fg;
    color: @theme_button_fg;
}

.titlebar .titlebutton:active {
    background-color: @theme_button_active_bg;
    color: @theme_selected_fg_color;
}

/****************************************************************************************
* Give and take related to recent gtk3.3.14 development,                                *
* to achieve full size of the icon menu of some of the applications whose notification  *
* icons appear in the system tray, the "shadow" is disabled.                            *
* same affect in mate-panel main menu, csd apps, header-bars apps                       *
* if compositor is disable !!!!!                                                        *
*****************************************************************************************/
/*
.window-frame {
    border-color: darker(@theme_bg_color);
    border-radius: 7px 7px 0 0;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 2px 8px 3px alpha(white, 0.7);*/
    /* this is used for the resize cursor area */
/*    margin: 10px;
}

.window-frame:backdrop {
    box-shadow: 0 2px 5px 1px alpha(white, 0.7);
}
*/

/******************
 * Dialog Windows *
 ******************/

/* ie. mate-keyboard-properties option window */
GtkDialog GtkScrolledWindow.frame GtkViewport .vertical {
    background-color: @theme_view_bg;
}

GtkDialog GtkScrolledWindow.frame {
    border-color: @theme_border_color;
    border-style: solid;
    border-width: 2px;
    border-radius: 3px;
}

GtkDialog GtkScrolledWindow.frame GtkViewport .vertical GtkExpander .vertical {
    background-color: shade (@theme_bg_color, 1.00);
    border-radius: 5px;
    border-color: @theme_border_color;
    border-style: solid;
    border-width: 2px;
}

/****************
 * App-specific *
 ****************/
TerminalScreen {
    background-color: @theme_base_color;
    color: @theme_fg_color;
}

.nautilus-cluebar-label {
    color: @theme_selected_fg_color;
    font: bold;
}

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

NautilusNotebook.notebook {
    border-right-width: 0;
    border-left-width: 0;
    border-bottom-width: 0;
}

NautilusNotebook .frame {
    border-width: 0;
}

NautilusWindow .pane-separator {
    border-width: 0 1px 0 0;
    border-style: solid;
    border-color: @theme_border_color;
}

.nautilus-desktop.nautilus-canvas-item {
    color: @theme_selected_fg_color;
    text-shadow: 1px 1px white;
}

.nautilus-desktop.nautilus-canvas-item:selected {
    color: @theme_selected_fg_color;
}

.nautilus-desktop.nautilus-canvas-item:backdrop {
    background-color: @theme_fg_color;
}

.nautilus-desktop.nautilus-canvas-item:active,
.nautilus-desktop.nautilus-canvas-item:prelight,
.nautilus-desktop.nautilus-canvas-item:selected {
    text-shadow: none;
}

.documents-icon-bg {
    background-color: @theme_internal_bg;
    color: @theme_fg_color;
    border-radius: 3px;
}

.documents-collection-icon {
    background-color: @theme_internal_bg;
    border-radius: 6px;
}

.documents-selection-mode.toolbar {
    background-color: @theme_internal_bg;
}
