* {
    padding: 0;
    background-clip: padding-box;
    -GtkToolButton-icon-spacing: 4;
    -GtkTextView-error-underline-color: @error_color;
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkToolItemGroup-expander-size: 11;
    -GtkIMHtml-hyperlink-color: @link_color;
    -GtkHTML-link-color: @link_color;
    -WnckTasklist-fade-overlay-rect: 0;
    outline-color: @focus_border_color;
    outline-style: dashed;
    outline-offset: -3px;
    outline-width: 1px;
    -gtk-outline-radius: 2px;
    -gtk-icon-style: regular; /* disable symbolic icons */
}

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

window {
    color: @theme_fg_color;
}

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

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

*:disabled {
/*    background-color: @insensitive_bg_color;*/
    color: @insensitive_fg_color;
    text-shadow: 1px 1px @insensitive_text_shadow_color;
    border-color: @insensitive_border_color;
}

/* Fix for applications that have issues finding a default monospace font */
.monospace {
  font-family: Monospace;
}

image,
image:disabled,
/*label,
label:disabled,*/
box,
box:disabled,
grid,
grid:disabled {
    background-color: transparent;
}

/************
 * Tooltips *
 ************/

tooltip,
tooltip.background,
.tooltip,
.tooltip.background {
    padding: 4px;
    border-style: solid;
    border-width: 1px;
    border-color: @theme_tooltip_border_color;
    border-radius: 2px;
    background-color: @theme_tooltip_bg_color;
    color: @theme_tooltip_fg_color;
    text-shadow: none;
}

tooltip *,
.tooltip * {
    text-shadow: none;
}

/* needed for override CSD setting */
tooltip decoration,
.tooltip decoration,
tooltip.csd decoration,
.tooltip.csd decoration,
tooltip.ssd decoration,
.tooltip.ssd decoration,
tooltip.solid-csd decoration,
.tooltip.solid-csd decoration,
tooltip.background.csd decoration,
.tooltip.background.csd decoration,
tooltip.background.ssd decoration,
.tooltip.background.ssd decoration,
tooltip.background.solid-csd decoration,
.tooltip.background.solid-csd decoration {
    border-radius: 0px;
    box-shadow: 0 1px 5px @wm_shadow;
}

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

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

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

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

spinner:active:disabled {
    opacity: 0.5;
}

button spinner:checked {
    color: @theme_fg_color;
}

/*****************
 * Miscellaneous *
 *****************/

.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: @border_color;
    border-radius: 3px;
    border-width: 1px;
    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: alpha (@theme_base_color, 0.0);
    background-image: none;
    border-style: none;
    border-image: none;
}

.view.rubberband,
.rubberband,
view rubberband,
rubberband {
    background-color: alpha (@theme_selected_bg_color, 0.35);
    background-image: linear-gradient(to bottom,
                                      alpha (@theme_selected_bg_color, 0.35),
                                      alpha (@theme_selected_bg_color, 0.35));
    border-color: @theme_selected_bg_color;
    border-style: solid;
    border-width: 1px;
    border-radius: 2px;
}

statusbar label,
statusbar frame {
    color: @theme_fg_color;
    font-size: smaller;
}

statusbar frame {
    padding: 2px 0px;
    border-width: 0;
}

statusbar frame button.flat {
    padding: 2px 0px 0px 0px;
}

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

/*Keep treeviews from jumping, separators drawn at 0 by default until hovered*/
treeview.view.separator {
    min-height: 2px;
}

treeview.view separator,
treeview.view .separator,
treeview separator,
separator,
separator:hover,
.separator,
.separator:hover {
    color: shade(@border_color, 1.30);
    background-color: shade(@border_color, 1.30);
}

/*********
 * Paned *
 *********/

/* the small line between sidebar and view */
paned > separator {
    min-width: 3px;
    min-height: 3px;
    border-style: none;
    background-color: @theme_bg_color;
    background-size: 1px 1px;
 }

paned > separator:hover,
paned > separator:selected {
    background-color: @theme_bg_color;
}

paned > separator:backdrop {
}

paned > separator.wide {
    margin: 0;
    padding: 0;
    min-width: 5px;
    min-height: 5px;
    background-size: 1px 1px, 1px 1px;
}

paned > separator.wide:backdrop {
}

/************************
 * 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% 20%, 100% 100%;
    background-repeat: no-repeat;
    background-position: center top;
    background-color: transparent;
    border-style: 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% 20%;
    background-repeat: no-repeat;
    background-position: center top;
    background-color: transparent;
    border-style: 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% 20%, 100% 100%;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-color: transparent;
    border-style: 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% 20%;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-color: transparent;
    border-style: 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: 20% 100%, 100% 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-color: transparent;
    border-style: 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: 20% 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-color: transparent;
    border-style: 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: 20% 100%, 100% 100%;
    background-repeat: no-repeat;
    background-position: right center;
    background-color: transparent;
    border-style: 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: 20% 100%;
    background-repeat: no-repeat;
    background-position: right center;
    background-color: transparent;
    border-style: 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: 4px;
    color: @entry_text_color;
    background-color: @theme_base_color;
}

entry progressbar {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

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

entry:disabled {
    color: @insensitive_fg_color;
}

/* Entry background */
entry {
    background-color: @entry_bg_color;
    background-image: linear-gradient(to bottom,
                      @entry_inner_border_color 1px,
                      @entry_bg_color 2px);
}

/* disabled entry background */
entry:disabled {
    background-image: linear-gradient(to bottom,
                      @entry_insensitive_inner_border_color 2px,
                      @entry_insensitive_bg_color 3px);
}


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

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

/*******************
 * Symbolic images *
 *******************/

image {
    color: @internal_element_color;
}

image:hover {
    color: @internal_element_hover_color;
}

image:selected {
    color: @theme_selected_fg_color;
}

/*****************
 * Color Chooser *
 *****************/

colorswatch,
colorswatch:selected {
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    border-color: @color_swatch_border_color;
    background-color: transparent;
    background-clip: border-box;
}

colorswatch:hover,
colorswatch:selected:hover {
    border-color: @color_swatch_hover_border_color;
}

colorchooser #add-color-button:hover,
colorchooser #add-color-button:selected:hover {
}

.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: @color_active_badge_light_border_color;
    color: @color_active_badge_light_color;
}

.color-active-badge.color-dark,
.color-active-badge.color-dark:hover {
    border-color: @color_active_badge_dark_border_color;
    color: @color_active_badge_dark_color;
}

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

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

progressbar {
    border-radius: 3px;
    padding: 0;
}

progressbar.horizontal {
    min-height: 16px;
}

progressbar.vertical {
    min-width: 16px;
}

/* progress component */
progressbar.horizontal trough,
progressbar.horizontal progress {
    min-height: 16px;
    border-radius: 3px;
}

progressbar.vertical trough,
progressbar.vertical progress {
    min-width: 16px;
    border-radius: 3px;
}

progressbar progress.left {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

progressbar progress.right {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

progressbar progress.top {
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
}

progressbar progress.bottom {
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

treeview.view.progressbar,
treeview.view.progressbar:hover,
progressbar.horizontal progress,
row progressbar progress,
row:hover progressbar progress,
row:selected progressbar progress,
row:selected:focus progressbar progress {
    background-color: @progressbar_bg_color;
    background-image: linear-gradient(to bottom,
                          alpha (@progressbar_gradient_a, 0.7),
                          alpha (@progressbar_gradient_b, 0.7) 50%,
                          alpha (@progressbar_gradient_c, 0.7) 50%,
                          alpha (@progressbar_gradient_d, 0.7)),
                      repeating-linear-gradient(135deg,
                          alpha (@progressbar_pattern_color, 0.0),
                          alpha (@progressbar_pattern_color, 0.0) 12px,
                          alpha (@progressbar_pattern_color, 0.5) 12px,
                          alpha (@progressbar_pattern_color, 0.5) 24px);
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: @progressbar_border_color;
}

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

progressbar.vertical progress {
    background-image: linear-gradient(to right,
                          alpha (@progressbar_gradient_a, 0.7),
                          alpha (@progressbar_gradient_b, 0.7) 50%,
                          alpha (@progressbar_gradient_c, 0.7) 50%,
                          alpha (@progressbar_gradient_d, 0.7)),
                      repeating-linear-gradient(45deg,
                          alpha (@progressbar_pattern_color, 0.0),
                          alpha (@progressbar_pattern_color, 0.0) 12px,
                          alpha (@progressbar_pattern_color, 0.5) 12px,
                          alpha (@progressbar_pattern_color, 0.5) 24px);
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: @progressbar_border_color;
}

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

row:selected progressbar trough,
row:selected:focus progressbar trough {
    background-image: -gtk-gradient (linear,
                      left top, left bottom,
                      from (mix (@trough_gradient_a, @theme_selected_bg_color, 0.25)),
                      to (mix (@trough_gradient_b, @theme_selected_bg_color, 0.25)));
}

treeview.view.trough,
treeview.view.trough:hover,
treeview.view.trough:selected {
    background-image: -gtk-gradient (linear,
                      left top, left bottom,
                      from (mix (@trough_gradient_a, @theme_selected_bg_color, 0.25)),
                      to (mix (@trough_gradient_b, @theme_selected_bg_color, 0.25)));
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: @progressbar_border_color;
    padding: 0px;
}

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

scale.vertical {
    min-width: 10px;
}

scale.horizontal {
    min-height: 10px;
}

scale.horizontal trough {
    min-height: 3px;
    margin: 8px 0;
    margin-left: 10px;
    margin-right: 10px;
}

scale.horizontal.marks-after trough {
    min-height: 3px;
}

scale.vertical trough {
    min-width: 3px;
    margin: 0 6px;
    margin-top: 10px;
    margin-bottom: 10px;
}

scale trough {
    border-color: @scale_trough_border_color;
    background-color: @scale_trough_bg_color;
}

scale trough,
scale trough highlight,
scale.vertical trough,
scale trough:disabled {
    border-image: none;
    border-style: solid;
    border-width: 1px;
    border-radius: 1px;
    background-image: none;
}

scale trough highlight {
    border-color: @scale_trough_highlight_border_color;
    background-color: @scale_trough_highlight_bg_color;
}

scale trough:disabled {
    border-color: @scale_trough_insensitive_border_color;
    background-color: @scale_trough_insensitive_highlight_bg_color;
}

scale trough highlight:disabled {
    border-color: @scale_trough_highlight_insensitive_border_color;
    background-color: @scale_trough_highlight_insensitive_bg_color;
}

scale marks indicator {
    color: @scale_mark_color;
}

/* this makes marks visible */
scale.horizontal indicator,
scale.horizontal.fine-tune indicator {
    min-height: 8px;
    min-width: 1px;
}

scale.vertical indicator,
scale.vertical.fine-tune indicator {
    min-height: 1px;
    min-width: 8px;
}

scale slider,
scale slider:hover,
scale slider:disabled {
    border-radius: 0;
    border-style: none;
    background-color: transparent;
}

scale.horizontal slider {
    min-width: 21px;
    margin: -6px 0px -9px 0px;
}

scale.vertical slider {
    min-height: 21px;
    margin: 0px -7px 0px -6px;
}

scale.horizontal.marks-after slider {
    margin-top: -6px;
    background-repeat: no-repeat;
    min-height: 16px;
}

scale.vertical slider,
scale.horizontal slider {
    background-repeat: no-repeat;
    background-position: top;
}

scale.vertical.fine-tune slider,
scale.horizontal.fine-tune slider,
scale.horizontal.marks-after.fine-tune slider {
	background-size: 80%;
}

scale.horizontal.color.marks-before trough {
    min-height: 16px;
    margin: 0px 0px 0px 0px;
    padding: 0px;
    border-radius: 3px;
}

scale.horizontal.color.marks-before slider {
    min-height: 20px;
    min-width: 30px;
    background-size: 90%;
}

scale.horizontal.color.marks-before slider:hover,
scale.vertical.color.marks-after slider:hover {
    background-size: 95%;
}

scale.horizontal.color.marks-before.fine-tune slider,
scale.vertical.color.marks-after.fine-tune slider {
    background-size: 80%;
}

scale.vertical.color.marks-after trough {
    min-width: 16px;
    padding: 0px;
    border-radius: 3px;
}

scale.vertical.color.marks-after slider {
    background-size: 90%;
}

scale progressbar {
    background-color: @scale_progressbar_bg_color;
}

/**********
 * Frames *
 **********/

.frame {
    border-width: 1px;
    border-color: @border_color;
    border-style: solid;
    border-radius: 3px;
    background-color: @notebook_bg_color;
    padding: 0;
}

/* Style the Search and Location entry boxes for Firefox 49 */
/* why frame and not entry ? FIXME */
frame {
    border-style: solid;
    border-color: @border_color;
}

/* Override the Firefox 49 frame styling where is absolutely shouldn't be applied */
/* maybe we should add more here */
box > frame, /* mate-tweak */
statusbar > frame, /* caja, etc. */
statusbar > widget > frame, /* pluma */
GvcMixerDialog frame { /* Mate Mixer dialog */
    border-style: none;
}

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

.sidebar,
scrolledwindow,
scrolledwindow.frame {
    border-style: solid;
    border-color: @border_color;
    border-width: 1px;
    border-radius: 2px;
    padding: 0;
}

#pathbarbox,
filechooser scrolledwindow,
scrolledwindow viewport {
    background-color: @theme_bg_color;
}

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

/***********
 * Buttons *
 ***********/

button {
    min-height: 16px;
    min-width: 16px;
    outline-style: none;
}

button,
button.menuitem.menubar,
.titlebar .linked.raised button,
.titlebar .linked.raised button:hover,
.titlebar .linked.raised button:focus,
.titlebar .linked.raised button:checked,
.titlebar .linked.raised button:disabled,
.titlebar .linked.raised button:backdrop,
.titlebar .linked.raised button:focus:hover,
.titlebar .linked.raised button:focus:hover:active {
    padding: 5px 5px 6px; /* larger values makes the button arrow smaller*/
}

toolbar.inline-toolbar button,
toolbar.inline-toolbar button.image-button,
toolbar.inline-toolbar button.text-button,
toolbar.inline-toolbar button:checked,
toolbar.inline-toolbar button.image-button:checked,
toolbar.inline-toolbar button.text-button:checked {
    padding: 3px;
}

toolbar.inline-toolbar button box.horizontal,
toolbar.inline-toolbar button.image-button box.horizontal,
toolbar.inline-toolbar button.text-button box.horizontal,
toolbar.inline-toolbar button box.horizontal image,
toolbar.inline-toolbar button.image-button box.horizontal image,
toolbar.inline-toolbar button.text-button box.horizontal  image {
    border-image: none;
}

toolbar.horizontal button,
toolbar.horizontal button:checked,
toolbar.primary-toolbar.horizontal button,
toolbar.primary-toolbar.horizontal button:checked {
    padding: 4px 3px;
    min-height: 16px;
    min-width: 26px;
}

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;
    -gtk-icon-shadow: none;
    border-image: none;
}

button.flat.hover {
    border-radius: 3px;
}

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

combobox button.combo,
toolbar.horizontal combobox button.combo {
    padding: 4px;
}

.path-bar button,
.linked.path-bar > button,
.path-bar button image,
.path-bar button label {
    padding: 4px 3px;
}

.path-bar button {
    border-width: 1px;
}

.linked.path-bar > button.toggle,
.linked.path-bar > button.toggle:checked:hover, /* this is really weird */
.linked.path-bar > button.image-button,
.linked.path-bar > button.toggle.image-button,
.linked.path-bar > button.toggle.text-button {
    border-width: 1px 1px 1px 0px;
}

.linked.path-bar > button.toggle:first-child,
.linked.path-bar > button.image-button:first-child,
.linked.path-bar > button.toggle.image-button:first-child,
.linked.path-bar > button.toggle.text-button:first-child,
.linked.path-bar > button.slider-button:first-child {
    border-width: 1px;
}

.linked.path-bar > button.toggle:last-child,
.linked.path-bar > button.image-button:last-child,
.linked.path-bar > button.toggle.image-button:last-child,
.linked.path-bar > button.toggle.text-button:last-child,
.linked.path-bar > button.slider-button:last-child {
    border-width: 1px 1px 1px 0px;
}

.linked.raised button:first-child,
.linked.raised button:first-child:hover:active {
    border-right-width: 0px;
}

button {
    color: @theme_text_color;
    border-style: solid;
    border-color: transparent;
}

/* We want anything inside the buttons to use their background */
button * {
    background-color: transparent;
}

button:disabled image,
.button:disabled image,
button:active:disabled image,
.button:active:disabled image{
	 opacity: 0.5;
}

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

toolbar.primary-toolbar button {
    border-image: none;
    border-style: solid;
    border-width: 1px 1px 2px 1px;
    border-color: transparent;
}

toolbar.primary-toolbar button:checked,
toolbar.inline-toolbar button:checked,
button:checked,
button:checked:focus,
button:focus {
    color: @button_active_text_color;
}

button:disabled,
button:checked:disabled {
    color: @insensitive_fg_color;
}

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

/* linked buttons and entries */

/* Middle button */
.linked entry,
.linked button,
.linked button:hover,
.linked button:focus,
.linked button:focus:hover,
.linked button:focus:hover:active,
.linked button:checked,
.linked button:checked:hover,
.linked button:checked:hover:active,
.linked button:disabled {
    border-image: none;
    border-radius: 0;
    border-color: @border_color;
    border-width: 1px;
    padding: 4px 3px;
}

.linked entry {
    padding: 4px;
}

/* Leftmost button */
.linked entry:first-child,
.linked button:first-child,
.linked button:hover:first-child,
.linked button:focus:first-child,
.linked button:focus:hover:first-child,
.linked button:focus:hover:active:first-child,
.linked button:checked:first-child,
.linked button:checked:hover:first-child,
.linked button:checked:hover:active:first-child,
.linked button:disabled:first-child {
    border-image: none;
    border-radius: 3px 0 0 3px;
    border-color: @border_color;
    border-width: 1px 0px 1px 1px;
    padding: 4px 3px;
}

.linked entry:first-child {
    padding: 4px;
    border-width: 1px;
}

/* Rightmost button */
.linked entry:last-child,
.linked button:last-child,
.linked button:hover:last-child,
.linked button:focus:last-child,
.linked button:focus:hover:last-child,
.linked button:focus:hover:active:last-child,
.linked button:checked:last-child,
.linked button:checked:hover:last-child,
.linked button:checked:hover:active:last-child,
.linked button:disabled:last-child {
    border-image: none;
    border-radius: 0 3px 3px 0;
    border-color: @border_color;
    border-width: 1px 1px 1px 0px;
    padding: 4px 3px;
}

.linked entry:last-child {
    padding: 4px;
}

/* Single button */
.linked entry:only-child,
.linked button:only-child,
.linked button:hover:only-child,
.linked button:focus:only-child,
.linked button:focus:hover:only-child,
.linked button:focus:hover:active:only-child,
.linked button:checked:only-child,
.linked button:checked:hover:only-child,
.linked button:checked:hover:active:only-child,
.linked button:disabled:only-child {
    border-image: none;
    border-radius: 3px;
    border-color: @border_color;
    border-width: 1px;
    padding: 4px 3px;
}

.linked entry:only-child {
    padding: 4px;
}

/* vertical */

/* Middle button */
.linked.vertical button.image-button,
.linked.vertical button.image-button:hover,
.linked.vertical button.image-button:focus,
.linked.vertical button.image-button:focus:hover,
.linked.vertical button.image-button:focus:hover:active,
.linked.vertical button.image-button:checked,
.linked.vertical button.image-button:checked:hover,
.linked.vertical button.image-button:checked:hover:active,
.linked.vertical button.image-button:disabled {
    border-image: none;
    border-radius: 0;
    border-color: @border_color;
    border-width: 0px 1px 0px 1px;
    padding: 5px 5px;
}

/* top button */
.linked.vertical button.image-button:first-child,
.linked.vertical button.image-button:hover:first-child,
.linked.vertical button.image-button:focus:first-child,
.linked.vertical button.image-button:focus:hover:first-child,
.linked.vertical button.image-button:focus:hover:active:first-child,
.linked.vertical button.image-button:checked:first-child,
.linked.vertical button.image-button:checked:hover:first-child,
.linked.vertical button.image-button:checked:hover:active:first-child,
.linked.vertical button.image-button:disabled:first-child {
    border-image: none;
    border-radius: 3px 3px 0px 0px;
    border-color: @border_color;
    border-width: 1px 1px 0px 1px;
    padding: 5px 5px;
}

/* bottom button */
.linked.vertical button:last-child,
.linked.vertical button:hover:last-child,
.linked.vertical button:focus:last-child,
.linked.vertical button:focus:hover:last-child,
.linked.vertical button:focus:hover:active:last-child,
.linked.vertical button:checked:last-child,
.linked.vertical button:checked:hover:last-child,
.linked.vertical button:checked:hover:active:last-child,
.linked.vertical button:disabled:last-child {
    border-image: none;
    border-radius: 0px 0px 3px 3px;
    border-color: @border_color;
    border-width: 0px 1px 1px 1px;
    padding: 5px 5px;
}

/* Dialog Action Area */

/* Middle button */
.dialog-action-area.linked button,
.dialog-action-area.linked button:hover,
.dialog-action-area.linked button:focus,
.dialog-action-area.linked button:focus:hover,
.dialog-action-area.linked button:focus:hover:active,
.dialog-action-area.linked button:checked,
.dialog-action-area.linked button:checked:hover,
.dialog-action-area.linked button:checked:hover:active,
.dialog-action-area.linked button:disabled {
    padding: 4px 6px;
    border-width: 1px 1px 1px 0px;
}

.dialog-action-area.linked button.default,
.dialog-action-area.linked button:focus {
    border-color: @button_default_border_color;
    box-shadow: inset  0px  1px @button_default_box_shadow_color,
                inset  1px  0px @button_default_box_shadow_color,
                inset -1px  0px @button_default_box_shadow_color,
                inset  0px -1px @button_default_box_shadow_color;
}

/* Leftmost button */
.dialog-action-area.linked button:first-child,
.dialog-action-area.linked button:hover:first-child,
.dialog-action-area.linked button:focus:first-child,
.dialog-action-area.linked button:focus:hover:first-child,
.dialog-action-area.linked button:focus:hover:active:first-child,
.dialog-action-area.linked button:checked:first-child,
.dialog-action-area.linked button:checked:hover:first-child,
.dialog-action-area.linked button:checked:hover:active:first-child,
.dialog-action-area.linked button:disabled:first-child {
    padding: 4px 6px;
    border-width: 1px 1px 1px 1px;
}

.dialog-action-area.linked button.default:first-child,
.dialog-action-area.linked button:focus:first-child {
    border-color: @button_default_border_color;
    box-shadow: inset  0px  1px @button_default_box_shadow_color,
                inset  1px  0px @button_default_box_shadow_color,
                inset -1px  0px @button_default_box_shadow_color,
                inset  0px -1px @button_default_box_shadow_color;
}

/* Rightmost button */
.dialog-action-area.linked button:last-child,
.dialog-action-area.linked button:hover:last-child,
.dialog-action-area.linked button:focus:last-child,
.dialog-action-area.linked button:focus:hover:last-child,
.dialog-action-area.linked button:focus:hover:active:last-child,
.dialog-action-area.linked button:checked:last-child,
.dialog-action-area.linked button:checked:hover:last-child,
.dialog-action-area.linked button:checked:hover:active:last-child,
.dialog-action-area.linked button:disabled:last-child {
    padding: 4px 6px;
    border-width: 1px 1px 1px 0px;
}

.dialog-action-area.linked button.default:last-child,
.dialog-action-area.linked button:focus:last-child {
    border-color: @button_default_border_color;
    box-shadow: inset  0px  1px @button_default_box_shadow_color,
                inset  1px  0px @button_default_box_shadow_color,
                inset -1px  0px @button_default_box_shadow_color,
                inset  0px -1px @button_default_box_shadow_color;
}

/* Single button */
.dialog-action-area.linked button:only-child,
.dialog-action-area.linked button:hover:only-child,
.dialog-action-area.linked button:focus:only-child,
.dialog-action-area.linked button:focus:hover:only-child,
.dialog-action-area.linked button:focus:hover:active:only-child,
.dialog-action-area.linked button:checked:only-child,
.dialog-action-area.linked button:checked:hover:only-child,
.dialog-action-area.linked button:checked:hover:active:only-child,
.dialog-action-area.linked button:disabled:only-child {
    padding: 4px 6px;
    border-width: 1px;
}

.dialog-action-area.linked button.default:only-child,
.dialog-action-area.linked button:focus:only-child {
    border-color: @button_default_border_color;
    box-shadow: inset  0px  1px @button_default_box_shadow_color,
                inset  1px  0px @button_default_box_shadow_color,
                inset -1px  0px @button_default_box_shadow_color,
                inset  0px -1px @button_default_box_shadow_color;
}

/*****************
 * GtkSpinButton *
 *****************/

spinbutton,
spinbutton:focus {
    background-color: transparent;
    padding: 0px;
    border-width: 1px;
    border-radius: 3px;
    border-style: solid;
    border-color: @spinbutton_border_color;
}

spinbutton:focus {
    border-color: shade (@theme_selected_bg_color, 1.0);
}

spinbutton.horizontal > entry,
spinbutton.horizontal > entry:focus {
    padding: 0px 10px 0px 3px;
    box-shadow: none;
    border-radius: 3px 0px 0px 3px;
    border-style: none;
    border-image: none;
}

spinbutton > button,
spinbutton > button:focus,
spinbutton > button:focus:active {
    background-color: transparent;
    color: @internal_element_color;
    padding: 6px;
    border-radius: 0;
    border-width: 0 0 0 1px;
    border-style: solid;
    border-color: @spinbutton_border_color;
    border-image: none;
}

spinbutton > button.default,
spinbutton > button:focus {
    box-shadow: none;
}

spinbutton > button:disabled {
    color: @internal_element_insensitive_color;
    border-color: @insensitive_border_color;
    border-image: none;
    border-radius: 0;
}

spinbutton > button:checked,
spinbutton > button:focus:checked,
spinbutton > button:hover {
    color: @internal_element_hover_color;
}

spinbutton.horizontal > button {
    border-width: 0 0 0 1px;
}

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

/*vertical */
spinbutton.vertical > entry,
spinbutton.vertical > entry:focus {
    border-image: none;
    border-color: @spinbutton_border_color;
    border-radius: 0px;
    border-width: 1px 0px 1px 0px;
    padding: 6px 2px;
}

spinbutton.vertical > button,
spinbutton.vertical > button:focus,
spinbutton.vertical > button:focus:active,
spinbutton.vertical > button:last-child,
spinbutton.vertical > button:focus:last-child,
spinbutton.vertical > button:focus:active:last-child {
    padding: 6px 2px;
    border-width: 0px;
}

spinbutton.vertical > button,
spinbutton.vertical > button:focus,
spinbutton.vertical > button:focus:active {
    border-radius: 3px 3px 0px 0px;
}

spinbutton.vertical > button:last-child,
spinbutton.vertical > button:focus:last-child,
spinbutton.vertical > button:focus:active:last-child {
    border-radius: 0px 0px 3px 3px;
}

/* linked */
.linked.vertical > spinbutton.horizontal {
    padding: 0px;
    border-radius: 0px ;
    border-width: 0px 1px 1px 1px;
}

.linked.vertical > spinbutton.horizontal > entry,
.linked.vertical > spinbutton.horizontal > entry:focus {
    padding: 0px 10px 0px 3px;
    border-radius: 0px ;
    border-style: none;
    border-image: none;
    box-shadow: none;
}

.linked.vertical > spinbutton.horizontal > button,
.linked.vertical > spinbutton.horizontal > button:focus,
.linked.vertical > spinbutton.horizontal > button:hover,
.linked.vertical > spinbutton.horizontal > button:focus:active,
.linked.vertical > spinbutton.horizontal > button:focus:hover {
    border-radius: 0px;
    border-width: 0 0 0 1px;
    border-image: none;
    border-color: @spinbutton_border_color;
    padding: 6px;
}


/*********************
 * Button background *
 *********************/

/* Button background */
button,
spinbutton button,
combobox button.combo,
toolbar button.raised,
toolbar button,
toolbar .raised button,
toolbar button.raised:focus,
toolbar .raised button:focus,
toolbar combobox button.combo,
toolbar combobox button.combo:focus,
toolbar.primary-toolbar combobox button.combo,
.titlebar .titlebutton:hover,
colorchooser #add-color-button {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@button_gradient_a),
                      to (@button_gradient_d));
    background-color: transparent;
}

/* Pushed button background */
button:checked,
button:checked:hover,
button:hover:active,
menuitem button:hover,
spinbutton button:active,
spinbutton button:active:hover,
combobox button.combo:checked,
toolbar button:checked,
toolbar button:checked:hover,
toolbar button:hover:active,
toolbar button.raised:checked,
toolbar .raised button:checked,
toolbar button.raised:hover:active,
toolbar button.raised:checked:hover,
toolbar .raised button:hover:active,
toolbar .raised button:checked:hover,
toolbar.primary-toolbar combobox button.combo:checked,
toolbar.primary-toolbar button:checked,
toolbar.primary-toolbar button:hover:active,
toolbar.primary-toolbar button:focus:active,
toolbar.primary-toolbar button:focus:hover:active,
toolbar.inline-toolbar button:checked,
toolbar.inline-toolbar button:hover:active {
    background-image: linear-gradient(to bottom,
                      @button_active_gradient_a,
                      @button_active_gradient_b 3px,
                      @button_active_gradient_c 4px,
                      @button_active_gradient_d 50%,
                      @button_active_gradient_e 50%,
                      @button_active_gradient_f);
    background-color: transparent;
}

trough,
trough highlight,
trough row,
trough row:hover {
    background-image: linear-gradient(to bottom,
                      @trough_gradient_a,
                      @trough_gradient_b 4px);
}

/* Flipped pushed button background for vertical progressbar through and the like */
trough.vertical {
    background-image: linear-gradient(to right,
                      @trough_gradient_a,
                      @trough_gradient_b 4px);
}

/* Prelight button background */
button:hover,
spinbutton button:hover,
combobox button.combo:hover,
toolbar button:hover,
toolbar button.raised:hover,
toolbar .raised button:hover,
toolbar combobox button.combo:hover,
toolbar.primary-toolbar button:hover,
toolbar.primary-toolbar combobox button.combo:hover,
toolbar.primary-toolbar combobox button.combo:focus:hover,
colorchooser #add-color-button:hover {
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                      @button_hover_gradient_a 5%,
                      @button_hover_gradient_b 95%,
                      @button_hover_gradient_c);
}

/* disabled button background */
button:disabled,
combobox button.combo:disabled,
toolbar combobox button.combo:disabled {
    background-image: none;
    background-color: transparent;
    color: @insensitive_fg_color;
}

/* Pushed + disabled button background */
button:checked:disabled,
toolbar button:checked:disabled,
toolbar combobox button.combo:checked:disabled {
    background-image: linear-gradient(to bottom,
                      @button_active_insensitive_gradient_a,
                      @button_active_insensitive_gradient_b 3px,
                      @button_active_insensitive_gradient_c 4px,
                      @button_active_insensitive_gradient_d 50%,
                      @button_active_insensitive_gradient_e 50%,
                      @button_active_insensitive_gradient_f);
    background-color: transparent;
}

/* Focused primary toolbar button background */
toolbar button:focus,
toolbar.primary-toolbar button:focus,
toolbar.primary-toolbar combobox button.combo:focus {
    background-image: linear-gradient(to bottom,
                      @pt_button_focus_gradient_a,
                      @pt_button_focus_gradient_b 50%,
                      @pt_button_focus_gradient_c 50%,
                      @pt_button_focus_gradient_d);
}

/* Focused + prelit primary toolbar button background */
toolbar button:focus:hover,
toolbar.primary-toolbar button:focus:hover {
    background-image: linear-gradient(to bottom,
                      @pt_button_focus_hover_gradient_a,
                      @pt_button_focus_hover_gradient_b 50%,
                      @pt_button_focus_hover_gradient_c 50%,
                      @pt_button_focus_hover_gradient_d);
}

/* Stack switcher */
stackswitcher > button > label,
headerbar stackswitcher > button.titlebutton > label,
headerbar.titlebar stackswitcher > button.titlebutton > label,
calendar.header stackswitcher > button.titlebutton > label {
	padding-left: 6px;
	padding-right: 6px;
}

stackswitcher > button > image,
headerbar stackswitcher > button.titlebutton > image,
headerbar.titlebar stackswitcher > button.titlebutton > image,
calendar.header stackswitcher > button.titlebutton > image {
	padding-left: 6px;
	padding-right: 6px;
	padding-top: 3px;
	padding-bottom: 3px;
}

stackswitcher > button.text-button {
	padding: 5px 10px 6px;
}

stackswitcher > button.image-button,
headerbar stackswitcher > button.titlebutton,
headerbar.titlebar stackswitcher > button.titlebutton,
calendar.header stackswitcher > button.titlebutton {
	padding: 5px 2px;
}

stackswitcher > button.needs-attention > label,
stackswitcher > button.needs-attention > image {
	background-color: @theme_bg_color; /* FIXME: ? */
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	background-position: right 3px, right 4px;
}

stackswitcher > button.needs-attention > label:backdrop,
stackswitcher > button.needs-attention > image:backdrop {
	background-size: 6px 6px, 0 0;
}

stackswitcher > button.needs-attention > label:dir(rtl),
stackswitcher > button.needs-attention > image:dir(rtl) {
	background-position: left 3px, left 4px;
}

stackswitcher > button.needs-attention:active > label,
stackswitcher > button.needs-attention:active > image,
stackswitcher > button.needs-attention:checked > label,
stackswitcher > button.needs-attention:checked > image {
	animation: none;
	background-image: none;
}

stackswitcher  > button:dir(ltr).text-button.radio,
stackswitcher  > button:dir(ltr).text-button.radio:focus,
stackswitcher  > button:dir(ltr).text-button.radio:hover,
stackswitcher  > button:dir(ltr).text-button.radio:hover:active,
stackswitcher  > button:dir(ltr).text-button.radio:checked,
stackswitcher  > button:dir(ltr).text-button.radio:checked:hover,
stackswitcher  > button:dir(ltr).text-button.radio:checked:hover:active  {
    padding: 5px 10px 6px;
    border-width: 1px 0px 1px 0px;
    border-image-width: 3px 0px 4px 0;
    border-style: solid;
    border-color: @border_color;
    border-image: none;
    border-radius: 0px;
}

stackswitcher  > button:dir(ltr).text-button.radio:first-child,
stackswitcher  > button:dir(ltr).text-button.radio:hover:first-child,
stackswitcher  > button:dir(ltr).text-button.radio:hover:active:first-child,
stackswitcher  > button:dir(ltr).text-button.radio:checked:first-child,
stackswitcher  > button:dir(ltr).text-button.radio:checked:hover:first-child,
stackswitcher  > button:dir(ltr).text-button.radio:checked:hover:active:first-child {
    border-width: 1px 0px 1px 1px;
    border-image-width: 3px 0 4px 3px;
    border-radius: 3px 0px 0px 3px;
}

stackswitcher  > button:dir(ltr).text-button.radio:last-child,
stackswitcher  > button:dir(ltr).text-button.radio:hover:last-child,
stackswitcher  > button:dir(ltr).text-button.radio:hover:active:last-child,
stackswitcher  > button:dir(ltr).text-button.radio:checked:last-child,
stackswitcher  > button:dir(ltr).text-button.radio:checked:hover:last-child,
stackswitcher  > button:dir(ltr).text-button.radio:checked:hover:active:last-child {
    border-width: 1px 1px 1px 0px;
    border-image-width: 3px 3px 4px 0;
    border-radius: 0px 3px 3px 0px;
}

stackswitcher  > button:dir(ltr).text-button.radio,
stackswitcher  > button:dir(ltr).text-button.radio:focus  {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@button_gradient_a),
                      to (@button_gradient_d));
    background-color: transparent;
}

stackswitcher  > button:dir(ltr).text-button:hover  {
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                      @button_hover_gradient_a 5%,
                      @button_hover_gradient_b 95%,
                      @button_hover_gradient_c);
}

stackswitcher  > button:dir(ltr).text-button:checked,
stackswitcher  > button:dir(ltr).text-button:checked:focus,
stackswitcher  > button:dir(ltr).text-button:checked:hover  {
    background-image: linear-gradient(to bottom,
                      @button_active_gradient_a,
                      @button_active_gradient_b 3px,
                      @button_active_gradient_c 4px,
                      @button_active_gradient_d 50%,
                      @button_active_gradient_e 50%,
                      @button_active_gradient_f);
    background-color: transparent;
}

/*****************
 * Notebooks and *
 * tabs          *
 *****************/

notebook {
    padding: 0;
    background-clip: border-box;
}

notebook.frame {
    background-color: @notebook_bg_color;
    background-clip: border-box;
    border-color: @border_color;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px 3px 0px 0px;
}

/* pavu-control */
window.background > box.vertical > notebook:not(.frame),
window.background.csd > box.vertical > notebook:not(.frame),
window.background.ssd > box.vertical > notebook:not(.frame),
window.background.solid-csd > box.vertical > notebook:not(.frame) {
    margin: 0px;
    background-color: @notebook_bg_color;
    background-clip: border-box;
    border-radius: 3px 3px 0px 0px;
}

window.background > box.vertical > notebook:not(.frame) > stack > box,
window.background.csd > box.vertical > notebook:not(.frame) > stack > box,
window.background.ssd > box.vertical > notebook:not(.frame) > stack > box,
window.background.solid-csd > box.vertical > notebook:not(.frame) > stack > box {
    margin: 0px;
    border-style: solid;
    border-width: 0px 0.4px 0.4px 0.4px;
    border-color: @notebook_border;
}

window.background > box.vertical > notebook:not(.frame) > header.top,
window.background.csd > box.vertical > notebook:not(.frame) > header.top,
window.background.ssd > box.vertical > notebook:not(.frame) > header.top,
window.background.solid-csd > box.vertical > notebook:not(.frame) > header.top {
    margin: 0px;
    border-style: solid;
    border-width: 0px 0px 0px 0.1px;
    border-color: @theme_bg_color;
}

printdialog > box.view.vertical.dialog-vbox > box.vertical > notebook {
    margin: 5px;
    background-color: @notebook_bg_color;
    border-radius: 3px 0px 0px 0px;
    border-style: solid;
    border-color: @border_color;
    border-width: 0px 1px 1px 1px;
}

dialog.background.csd > box.vertical.dialog-vbox > notebook, /* meld preferences */
dialog.background.ssd > box.vertical.dialog-vbox > notebook,
dialog.background.solid-csd > box.vertical.dialog-vbox > notebook {
    background-color: @notebook_bg_color;
}

/* view areas, ie. pluma-, caja-tabs */
paned.horizontal notebook {
    border-style: none;
}

paned.horizontal notebook header {
    box-shadow: none;
}

notebook header.top {
    margin: -1px -1px 0px 0px;
    border-width: 0px 0px 1px 0px;
    border-radius: 3px 3px 0px 0px;
    background-color: @theme_bg_color;
    box-shadow: inset  0px -1px 0 0 @border_color;
}

paned.horizontal notebook header.top {
    margin: 0px;
    border-width: 0px 0px 0px 0.1px;
    border-style: solid;
    border-color: @theme_bg_color;
}

printdialog > box.view.vertical.dialog-vbox > box.vertical > notebook > header.top {
    border-radius: 0px;
}

notebook header.bottom {
    margin: 0px -1px -1px 0px;
    border-width: 1px 1px 0px 0px;
    background-color: @theme_bg_color;
    box-shadow: inset  0px  1px 0 0 @border_color;
}

notebook header.left {
    margin: 0px 0px -1px -1px;
    border-width: 0px 1px 0px 0px;
    background-color: @theme_bg_color;
    box-shadow: inset -1px  0px 0 0 @border_color;
}

notebook header.right {
    margin: 0px -1px -1px 0px;
    border-width: 0px 0px 0px 1px;
    background-color: @theme_bg_color;
    box-shadow: inset  1px  0px 0 0 @border_color;
}

/* tabs in view areas, ie. pluma-, caja-tabs */
paned.horizontal notebook header.top tab {
    padding: 4px 2px 4px 2px;
    border-width: 1px 1px 0px 1px;
}

paned.horizontal notebook header.top tab:checked {
    padding: 4px 2px 4px 2px;
    border-width: 1px 1px 0px 1px;
}

notebook header tab {
    border-color: @border_color;
    border-style: solid;
    border-width: 1px;
    background-color: transparent;
}

notebook header.top tab {
    margin: 0px 0px 0px -1px;
    padding: 4px 6px 4px 6px;
    border-width: 1px;
    border-radius: 3px 3px 0px 0px;
    background-image: linear-gradient(to bottom,
                      @notebook_tab_gradient_a,
                      @notebook_tab_gradient_d);
}

notebook header.top tab:checked {
    border-top-color: @notebook_active_tab_border;
    border-left-color: @notebook_active_tab_border;
    border-right-color: @notebook_active_tab_border;
    border-width: 1px 1px 0px 1px;
    background-image: linear-gradient(to bottom,
                      @notebook_active_tab_strip_gradient_b 1px,
                      @notebook_active_tab_gradient_b 8px);
}

notebook header.right tab {
    margin: -1px 0px 0px 0px;
    padding: 6px 4px 6px 4px;
    border-width: 1px;
    border-radius: 0px 3px 3px 0px;
    background-image: linear-gradient(to left,
                      @notebook_tab_gradient_a,
                      @notebook_tab_gradient_d);
}

notebook header.right tab:checked {
    border-width: 1px 1px 1px 0px;
    border-right-color: @notebook_active_tab_border;
    border-top-color: @notebook_active_tab_border;
    border-bottom-color: @notebook_active_tab_border;
    background-image: linear-gradient(to left,
                      @notebook_active_tab_strip_gradient_b 1px,
                      @notebook_active_tab_gradient_b 8px);
}

notebook header.bottom tab {
    margin: 0px 0px 0px -1px;
    padding: 4px 6px 4px 6px;
    border-width: 1px;
    border-radius: 0px 0px 3px 3px;
    background-image: linear-gradient(to top,
                      @notebook_tab_gradient_a,
                      @notebook_tab_gradient_d);
}

notebook header.bottom tab:checked {
    border-width: 0px 1px 1px 1px;
    border-bottom-color: @notebook_active_tab_border;
    border-left-color: @notebook_active_tab_border;
    border-right-color: @notebook_active_tab_border;
    background-image: linear-gradient(to top,
                      @notebook_active_tab_strip_gradient_b 1px,
                      @notebook_active_tab_gradient_b 8px);
}

notebook header.left tab {
    margin: -1px 0px 0px 0px;
    padding: 6px 4px 6px 4px;
    border-width: 1px;
    border-radius: 3px 0px 0px 3px;
    background-image: linear-gradient(to right,
                      @notebook_tab_gradient_a,
                      @notebook_tab_gradient_d);
}

notebook header.left tab:checked {
    border-width: 1px 0px 1px 1px;
    border-left-color: @notebook_active_tab_border;
    border-top-color: @notebook_active_tab_border;
    border-bottom-color: @notebook_active_tab_border;
    background-image: linear-gradient(to right,
                      @notebook_active_tab_strip_gradient_b 1px,
                      @notebook_active_tab_gradient_b 8px);
}

/* outlines */
notebook header tab:checked {
    outline-color: @button_default_border_color;
}

notebook header.top tab:checked {
    -gtk-outline-top-left-radius: 4px;
    -gtk-outline-top-right-radius: 4px;
    -gtk-outline-bottom-left-radius: 0px;
    -gtk-outline-bottom-right-radius: 0px;
}

notebook header.bottom tab:checked {
    -gtk-outline-top-left-radius: 0px;
    -gtk-outline-top-right-radius: 0px;
    -gtk-outline-bottom-left-radius: 4px;
    -gtk-outline-bottom-right-radius: 4px;
}

notebook header.left tab:checked {
    -gtk-outline-top-left-radius: 4px;
    -gtk-outline-top-right-radius: 0px;
    -gtk-outline-bottom-left-radius: 4px;
    -gtk-outline-bottom-right-radius: 0px;
}

notebook header.right tab:checked {
    -gtk-outline-top-left-radius: 0px;
    -gtk-outline-top-right-radius: 4px;
    -gtk-outline-bottom-left-radius: 0px;
    -gtk-outline-bottom-right-radius: 4px;
}

/* close button styling */
paned.horizontal notebook button.flat,
notebook button.flat.small-button {
    border-image: none;
    border-radius: 3px;
    border-style: solid;
    border-color: transparent;
    border-width: 1px;
    background-image: none;
    background-color: transparent;
    padding: 0;
}

paned.horizontal notebook button.flat:hover,
notebook button.flat.small-button:hover{
    color: @theme_fg_color;
    border-color: alpha(black, 0.1);
}

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

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

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

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

notebook header tabs arrow {
    color: @theme_fg_color;
}

notebook header tabs arrow:hover,
notebook header tabs arrow:active {
    color: @theme_selected_bg_color;
}

notebook header tabs arrow:disabled {
    color: rgba(141, 144, 145, 0.3);
}

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

notebook header tabs arrow:backdrop:disabled {
    color: #c7c7c7;
}

/**************
 * ComboBoxes *
 **************/

combobox {
    padding: 0;
}

combobox arrow {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
    color: @theme_fg_color;
    min-height: 16px;
    min-width: 16px;
}

combobox entry.combo,
combobox button.combo {
    color: @internal_element_color;
    padding: 4px
}

combobox entry.combo:disabled,
combobox button.combo:disabled {
    color: @insensitive_fg_color;
}

combobox separator {
    /* always disable separators */
    -GtkWidget-horizontal-separator: 0;
    -GtkWidget-vertical-separator: 0;
}

combobox > .linked > entry.combo,
combobox > .linked > button.combo,
combobox > .linked > button.combo:focus,
combobox > .linked > button.combo:hover,
combobox > .linked > button.combo:checked,
combobox > .linked > button.combo:focus:hover,
combobox > .linked > button.combo:disabled {
    border-image-width: 3px 3px 4px 3px;
    border-radius: 0px;
    border-width: 1px 0px 1px 0px;
}

combobox > .linked > entry.combo:first-child,
combobox > .linked > button.combo:first-child,
combobox > .linked > button.combo:focus:first-child,
combobox > .linked > button.combo:hover:first-child,
combobox > .linked > button.combo:checked:first-child,
combobox > .linked > button.combo:focus:hover:first-child,
combobox > .linked > button.combo:disabled:first-child {
    border-image-width: 3px 0 4px 3px;
    border-radius: 3px 0 0 3px;
    border-width: 1px 0px 1px 1px;
}

combobox > .linked > entry.combo:last-child,
combobox > .linked > button.combo:last-child,
combobox > .linked > button.combo:focus:last-child,
combobox > .linked > button.combo:hover:last-child,
combobox > .linked > button.combo:checked:last-child,
combobox > .linked > button.combo:focus:hover:last-child,
combobox > .linked > button.combo:disabled:last-child {
    border-image-width: 3px 3px 4px 3px;
    border-radius: 0 3px 3px 0;
    border-width: 1px 1px 1px 1px;
}

combobox > .linked > entry.combo:only-child,
combobox > .linked > button.combo:only-child,
combobox > .linked > button.combo:focus:only-child,
combobox > .linked > button.combo:hover:only-child,
combobox > .linked > button.combo:checked:only-child,
combobox > .linked > button.combo:focus:hover:only-child,
combobox > .linked > button.combo:disabled:only-child {
    border-image-width: 3px 3px 4px 3px;
    border-radius: 3px;
    border-width: 1px;
}

toolbar.primary-toolbar combobox > .linked > entry.combo,
toolbar.primary-toolbar combobox > .linked > button.combo {
    border-image-width: 4px 0px 4px 0px;
}

toolbar.primary-toolbar combobox > .linked > entry.combo:first-child,
toolbar.primary-toolbar combobox > .linked > button.combo:first-child {
    border-image-width: 4px 0 4px 4px;
}

toolbar.primary-toolbar combobox > .linked > entry.combo:last-child,
toolbar.primary-toolbar combobox > .linked > button.combo:last-child {
    border-image-width: 4px 4px 4px 0;
}

toolbar.primary-toolbar combobox > .linked > entry.combo:only-child,
toolbar.primary-toolbar combobox > .linked > button.combo:only-child {
    border-image-width: 4px 4px 4px 4px;
}

/* linked combobox */

/* Middle button */
.linked > combobox > .linked > button.combo,
.linked > combobox > .linked > button.combo:hover,
.linked > combobox > .linked > button.combo:focus,
.linked > combobox > .linked > button.combo:focus:hover,
.linked > combobox > .linked > button.combo:checked,
.linked > combobox > .linked > button.combo:disabled {
    border-image: none;
    border-radius: 0;
    border-color: @border_color;
    border-width: 1px 0px 1px 0px;
    border-width: 1px;
    padding: 4px 2px;
}

/* Leftmost button */
.linked > combobox:first-child > .linked > button.combo:first-child,
.linked > combobox:first-child > .linked > button.combo:hover:first-child,
.linked > combobox:first-child > .linked > button.combo:focus:first-child,
.linked > combobox:first-child > .linked > button.combo:focus:hover:first-child,
.linked > combobox:first-child > .linked > button.combo:checked:first-child,
.linked > combobox:first-child > .linked > button.combo:disabled:first-child {
    border-radius: 3px 0 0 3px;
    border-width: 1px 0px 1px 1px;
}

/* Rightmost button */
.linked > combobox:last-child > .linked > button.combo:last-child,
.linked > combobox:last-child > .linked > button.combo:hover:last-child,
.linked > combobox:last-child > .linked > button.combo:focus:last-child,
.linked > combobox:last-child > .linked > button.combo:focus:hover:last-child,
.linked > combobox:last-child > .linked > button.combo:checked:last-child,
.linked > combobox:last-child > .linked > button.combo:disabled:last-child {
    border-radius: 0 3px 3px 0;
    border-width: 1px 1px 1px 0px;
}

/* vertical */

/* Middle button */
.linked.vertical > combobox > .linked > button.combo,
.linked.vertical > combobox > .linked > button.combo:hover,
.linked.vertical > combobox > .linked > button.combo:focus,
.linked.vertical > combobox > .linked > button.combo:focus:hover,
.linked.vertical > combobox > .linked > button.combo:checked,
.linked.vertical > combobox > .linked > button.combo:disabled {
    border-image: none;
    border-radius: 0;
    border-color: @border_color;
    border-width: 0px 1px 0px 1px;
    padding: 5px 5px;
}

/* top button */
.linked.vertical > combobox:first-child > .linked > button.combo:first-child,
.linked.vertical > combobox:first-child > .linked > button.combo:hover:first-child,
.linked.vertical > combobox:first-child > .linked > button.combo:focus:first-child,
.linked.vertical > combobox:first-child > .linked > button.combo:focus:hover:first-child,
.linked.vertical > combobox:first-child > .linked > button.combo:checked:first-child,
.linked.vertical > combobox:first-child > .linked > button.combo:disabled:first-child {
    border-radius: 3px 3px 0px 0px;
    border-width: 1px 1px 1px 1px;
}

/* bottom button */
.linked.vertical > combobox:last-child > .linked > button.combo:last-child,
.linked.vertical > combobox:last-child > .linked > button.combo:hover:last-child,
.linked.vertical > combobox:last-child > .linked > button.combo:focus:last-child,
.linked.vertical > combobox:last-child > .linked > button.combo:focus:hover:last-child,
.linked.vertical > combobox:last-child > .linked > button.combo:checked:last-child,
.linked.vertical > combobox:last-child > .linked > button.combo:disabled:last-child {
    border-radius: 0px 0px 3px 3px;
    border-width: 0px 1px 1px 1px;
}

/* ie. filechooser dialog */
combobox .popup menu menuitem:hover cellview {
    color: @theme_selected_fg_color;
}

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

scrollbar {
    background-image: none;
    border-style: solid;
    border-color: @scrollbar_trough_border_color;
    -GtkScrollbar-has-backward-stepper: true;
    -GtkScrollbar-has-forward-stepper: true;
    box-shadow: none;
    border-image: none;
}

scrollbar.vertical {
    border-width: 0px 0px 0px 1px;
    min-width: 14px;
}

scrollbar.horizontal {
    border-width: 1px 0px 0px 0px;
    min-height: 14px;
}

scrollbar trough {
    border-style: solid;
    border-color: @scrollbar_trough_border_color;
}

scrolledwindow junction {
    background-image: none;
    background-color: @scrollbars_junction_bg_color;
}

scrollbar.horizontal trough {
    min-height: 14px;
    border-radius: 0px;
    border-width: 0px 1px 0px 1px;
    border-image: none;
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      color-stop (0, @scrollbar_trough_gradient_a),
                      color-stop (0.5, @scrollbar_trough_gradient_b));
}

scrollbar.vertical trough {
    min-width: 14px;
    border-radius: 0px;
    border-width: 1px 0px 1px 0px;
    border-image: none;
    background-image: -gtk-gradient (linear,
                      left top,
                      right top,
                      color-stop (0, @scrollbar_trough_gradient_a),
                      color-stop (0.5, @scrollbar_trough_gradient_b));
}

/* Buttons */
scrollbar.vertical button,
scrollbar.vertical .button {
    min-width: 14px;
    min-height: 16px;
    padding: 1px 0px;
}

scrollbar.horizontal button,
scrollbar.horizontal .button {
    min-width: 16px;
    min-height: 14px;
    padding: 0px 1px;
}

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

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

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

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

scrollbar button,
scrollbar .button {
    border-image: none;
    border-style: none;
    border-width: 0px;
    border-radius: 0px;
    background-image: none;
    background-color: transparent;
}

scrollbar button:hover,
scrollbar .button:hover {
    border-image: none;
    border-style: none;
    border-width: 0px;
    border-radius: 0px;
}

scrollbar button:disabled,
scrollbar .button:disabled {
    color: @scrollbar_button_insensitive_color;
    border-image: none;
    border-style: none;
    border-width: 0px;
    border-radius: 0px;
}

scrollbar.horizontal button,
scrollbar.horizontal .button {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@scrollbar_button_gradient_a),
                      to (@scrollbar_button_gradient_d));
}

scrollbar.horizontal button:hover,
scrollbar.horizontal .button:hover {
    background-image: -gtk-gradient (linear,
                      left bottom,
                      left top,
                      from (@scrollbar_button_hover_gradient_a),
                      to (@scrollbar_button_hover_gradient_d));
}

scrollbar.horizontal button:hover:active,
scrollbar.horizontal .button:hover:active {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@scrollbar_button_active_gradient_a),
                      to (@scrollbar_button_active_gradient_d));
}

scrollbar.vertical button,
scrollbar.vertical .button {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@scrollbar_button_gradient_a),
                      to (@scrollbar_button_gradient_d));
}

scrollbar.vertical button:hover,
scrollbar.vertical .button:hover {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@scrollbar_button_hover_gradient_d),
                      to (@scrollbar_button_hover_gradient_a));
}

scrollbar.vertical button:hover:active,
scrollbar.vertical .button:hover:active {
    background-image: -gtk-gradient (linear,
                      left top,
                      right top,
                      from (@scrollbar_button_active_gradient_a),
                      color-stop (0.50, @scrollbar_button_active_gradient_b),
                      color-stop (0.50, @scrollbar_button_active_gradient_c),
                      to (@scrollbar_button_active_gradient_d));
}

scrollbar.vertical slider,
scrollbar.vertical .slider {
    min-width: 14px;
    min-height: 42px;
    margin: 0px -1px 0px -1px;
}

scrollbar.horizontal slider,
scrollbar.horizontal .slider {
    min-width: 42px;
    min-height: 14px;
    margin: -1px 0px -1px 0px;
}

scrollbar slider,
scrollbar .slider {
    background-color: @scrollbar_slider_bg_color;
    background-image: none;
    border-radius: 0;
    border-style: solid;
    border-image: none;
    border-color: @scrollbar_slider_border_color;
    border-width: 1px;
}

scrollbar slider:hover,
scrollbar .slider:hover {
    background-color: @scrollbar_slider_hover_bg_color;
}

/*********
 * Menus *
 *********/

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

treemenu menuitem {
    padding: 2px;
}

/* Decouple the font of context menus from their entry/textview */
.context-menu {
        font: initial;
        text-shadow: none;
}

menu,
.menu {
    font-weight: normal;
    background-color: @menu_bg_color;
    color: @menu_fg_color;
    padding: 1px;
    border-style: solid;
    border-width: 1px;
    border-color: @menu_border_color;
}

menu button,
.menu button {
    background-image: none;
    background-color: @menu_bg_color;
    color: @internal_element_color;
    border-image: none;
    border-style: none;
}

menu button:hover,
.menu button:hover {
    background-image: none;
    background-color: @theme_base_color;
    color: @theme_text_color;
    border-image: none;
    border-style: none;
}

menu button:disabled,
.menu button:disabled {
    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,
.menubar {
    border-style: none;
    padding: 1px;
    -GtkWidget-window-dragging: true;
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@menubar_gradient_a),
                      color-stop (0.50, @menubar_gradient_b),
                      to (@menubar_gradient_c));
}

menubar menuitem,
.menubar menuitem {
    border-style: solid;
    border-width: 1px 1px 0px;
    border-color: transparent;
    padding: 3px 5px;
    background-color: transparent;
    color: @menu_fg_color;
    text-shadow: none;
}

menubar menuitem:hover,
.menubar menuitem:hover,
menuitem button.flat:hover,
menuitem button.flat:active {
    background-color: @menu_bg_color;
    border-style: solid;
    border-width: 1px 1px 0px;
    border-color: @menubar_menuitem_hover_border_color;
    border-radius: 3px 3px 0 0;
    color: @menubar_menuitem_hover_color;
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@menubar_menuitem_hover_gradient_a),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_b),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_c),
                      to (@menubar_menuitem_hover_gradient_d));
}

menuitem button.flat:hover {
    border-width: 1px;
    border-radius: 3px;
}

menuitem button.flat:focus {
    color: @theme_text_color;
}

menubar menuitem:hover,
.menubar menuitem:hover {
    border-width: 1px 1px 0px;
    color: @menubar_menuitem_hover_color;
}

menu > menuitem,
.menu > menuitem {
    border-width: 1px 0px;
    border-style: solid;
    border-color: transparent;
    padding: 4px;
}

menu > menuitem,
.menu > menuitem {
    background-color: @menu_bg_color;
    color: @theme_text_color;
}

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

treemenu menuitem:hover,
menu menuitem:hover,
.menu menuitem:hover {
    border-style: solid;
    border-width: 1px 0px;
    border-color: @menubar_menuitem_hover_border_color;
}

treemenu menuitem:hover,
combobox menuitem:hover,
menu menuitem:hover,
.menu menuitem:hover {
    color: @menubar_menuitem_hover_color;
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@menubar_menuitem_hover_gradient_a),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_b),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_c),
                      to (@menubar_menuitem_hover_gradient_d));
}

menu menuitem:disabled,
.menu menuitem:disabled {
    background-color: @menu_bg_color;
    color: mix (@menu_fg_color, @menu_bg_color, 0.6);
    border-color: transparent;
}

menuitem:disabled image,
.menuitem:disabled image,
menuitem:active:disabled image,
.menuitem:active:disabled image{
	 opacity: 0.5;
}

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

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

menu > menuitem:hover accelerator,
.menu > menuitem:hover accelerator {
    color: @menubar_menuitem_hover_color;
}

menuitem > arrow {
    min-height: 16px;
    min-width: 16px;
    margin-left: 10px;
}

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

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

menu arrow.top,
.menu arrow.top {
    -gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
}

menu arrow.bottom,
.menu arrow.bottom {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

/* settings for 4 menu level, this is needed to override the menuitem:hover
   state from previous menu level, as GtkArrow itself don't support states.
   thanks gtk+ devs for this madness */
menu > menuitem > arrow.right,
menu > menuitem:hover menu > menuitem > arrow.right,
menu > menuitem:hover menu > menuitem:hover menu > menuitem > arrow.right,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem > arrow.right,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem > arrow.right,
menu > menuitem > arrow.left,
menu > menuitem:hover menu > menuitem > arrow.left,
menu > menuitem:hover menu > menuitem:hover menu > menuitem > arrow.left,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem > arrow.left,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem > arrow.left,
.menu > menuitem > arrow.right,
.menu > menuitem:hover .menu > menuitem > arrow.right,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem > arrow.right,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem > arrow.right,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem > arrow.right,
.menu > menuitem > arrow.left,
.menu > menuitem:hover .menu > menuitem > arrow.left,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem > arrow.left,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem > arrow.left,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem > arrow.left  {
    color: @theme_text_color;
}

menu > menuitem:hover > arrow.right,
menu > menuitem:hover menu > menuitem:hover arrow.right,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover arrow.right,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover arrow.right,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover arrow.right,
menu > menuitem:hover > arrow.left,
menu > menuitem:hover menu > menuitem:hover arrow.left,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover arrow.left,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover arrow.left,
menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover menu > menuitem:hover arrow.left,
.menu > menuitem:hover > arrow.right,
.menu > menuitem:hover .menu > menuitem:hover arrow.right,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover arrow.right,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover arrow.right,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover arrow.right,
.menu > menuitem:hover > arrow.left,
.menu > menuitem:hover .menu > menuitem:hover arrow.left,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover arrow.left,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover arrow.left,
.menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover .menu > menuitem:hover arrow.left {
    color: @theme_text_color;
}

menu > menuitem:disabled > arrow,
.menu > menuitem:disabled > arrow {
    color: mix (@menu_fg_color, @menu_bg_color, 0.6);
   -gtk-icon-shadow: none;
}

/* scroll arrows */
menu > arrow,
.menu > arrow {
    border-width: 0px;
    border-style: none;
    border-radius: 0px;
    background-color: transparent;
    background-image: none;
    min-height: 16px;
    min-width: 16px;
    padding: 2px 4px;
    color: @theme_fg_color;
}

menu > arrow.top,
.menu > arrow.top {
    margin-top: -2px;
    margin-left: -1px;
    margin-right: -1px;
}

menu > arrow.bottom,
.menu > arrow.bottom {
    margin-bottom: -2px;
    margin-left: -1px;
    margin-right: -1px;
}

menu > arrow:hover,
.menu > arrow:hover {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@menubar_menuitem_hover_gradient_a),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_b),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_c),
                      to (@menubar_menuitem_hover_gradient_d));
    color: @theme_text_color;
}

menu > arrow:disabled,
.menu > arrow:disabled {
    color: mix (@menu_fg_color, @menu_bg_color, 0.6);
    background-color: transparent;
    background-image: none;
}

menu separator,
.menu separator,
menuitem separator {
    color: @menu_separator_color;
    min-height: 1px;
    border-image: -gtk-gradient (linear,
                                 left top, right top,
                                 from (alpha (#000, 0.00)),
                                 color-stop (0.25, alpha (#000, 0.03)),
                                 color-stop (0.85, alpha (#000, 0.03)),
                                 to (alpha (#000, 0.00))) 1;
}

/* style classes are for firefox */

menuitem check,
menuitem check:hover,
menuitem check:checked,
menuitem check:disabled,
menu menuitem .check,
menu menuitem .check:hover,
menu menuitem .check:checked,
menu menuitem .check:disabled {
    margin: 0px 0px 0px 3px;
    background-image: none;
    background-color: transparent;
    min-height: 13px;
    min-width: 13px;
}

menuitem radio,
menuitem radio:hover,
menuitem radio:checked,
menuitem radio:disabled,
menu menuitem .radio,
menu menuitem .radio:hover,
menu menuitem .radio:checked,
menu menuitem .radio:disabled {
    margin: 1px 0px 0px 4px;
    background-image: none;
    background-color: transparent;
    min-height: 14px;
    min-width: 14px;
}

/***************
 * Menu Button *
 ***************/

menuitem button.flat:active {
    color: @theme_text_color;
    background-image: none;
    background-color: @menu_bg_color;
    border-radius: 5px 5px 0 0;
    border-image: none;
    border-width: 1px 1px 0 1px;
    border-color: shade(@border_color, 1.30);
    border-style: solid;
}

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

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

check,
radio,
menuitem check,
menuitem radio,
menu menuitem check,
menu menuitem radio {
    padding: 0px 6px 0px 0px;
    background-repeat: no-repeat;
    background-position: center;
}

check row:selected:disabled,
check row:selected:focus:disabled {
    background-color: transparent;
}

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

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

/************
 * Toolbars *
 ************/

toolbar {
    border-style: none;
    border-color: darker (@theme_bg_color);
    padding: 3px;
}

toolbar button {
    padding: 2px 5px;
}

toolbar:disabled {
    color: alpha (@theme_fg_color, 0.6);
}

/********************
 * Menubar Toolbars *
 ********************/

toolbar menubar {
    border-style: none;
    -GtkToolbar-button-relief: normal;
    padding-left: 4px;
    padding-right: 4px;
}

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

/* applications using EggEditableToolbar usually set the primary-toolbar
 * hint on the containing vbox, so we need to handle both these cases here.
 */
toolbar.primary-toolbar {
    border-width: 1px 0 1px 0;
    border-radius: 0;
    border-style: solid;
    border-top-color: @toolbar_border_top_color;
    border-bottom-color: @toolbar_border_bottom_color;
    -GtkWidget-window-dragging: true;
    -GtkToolbar-button-relief: normal;
}

toolbar.primary-toolbar:disabled {
    background-image: none;
    background-color: shade (@theme_bg_color, 0.97);
    border-color: shade (@theme_bg_color, 0.91);
}

/* progressbars on primary toolbar entries are special */
toolbar.primary-toolbar entry progress {
    background-image: -gtk-gradient (linear,
                      left top, left bottom,
                      from (@trough_gradient_a),
                      to (@trough_gradient_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 *
 *******************/

toolbar.inline-toolbar {
    border-width: 1px;
    border-radius: 0;
    border-style: solid;
    -GtkToolbar-button-relief: normal;
    padding: 2px;
}

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

/* Primary and inline toolbars background */
toolbar.primary-toolbar,
toolbar.inline-toolbar  {
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                      @toolbar_gradient_a 2px,
                      @toolbar_gradient_b 50%,
                      @toolbar_gradient_c 50%,
                      @toolbar_gradient_d);
}

/***********
 * Sidebar *
 ***********/

.sidebar,
.sidebar .view,
placessidebar .view {
    background-color: @sidebar_bg_color;
}

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

/* dialog open, nautilus */
placessidebar.sidebar.frame viewport.frame list,
placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row,
dialog filechooser placessidebar.sidebar.frame viewport.frame list,
dialog filechooser placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row {
    background-color: @theme_base_color;
}

placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row:selected,
placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row:selected:hover,
dialog filechooser placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row:selected,
dialog filechooser placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row:selected:hover {
    border-style: none;
    color: @theme_selected_fg_color;
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@menubar_menuitem_hover_gradient_a),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_b),
                      color-stop (0.50, @menubar_menuitem_hover_gradient_c),
                      to (@menubar_menuitem_hover_gradient_d));
}

placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row:hover,
dialog filechooser placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row:hover {
    background-image: linear-gradient(to bottom,
                      shade(@button_active_gradient_a, 1.20),
                      shade(@button_active_gradient_b, 1.20) 3px,
                      shade(@button_active_gradient_c, 1.20) 4px,
                      shade(@button_active_gradient_d, 1.20) 50%,
                      shade(@button_active_gradient_e, 1.20) 50%,
                      shade(@button_active_gradient_f, 1.20));
    background-color: transparent;
}

placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row revealer.sidebar-revealer image.sidebar-icon,
dialog filechooser placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row revealer.sidebar-revealer image.sidebar-icon {
    padding: 4px 8px 4px 6px;
}

placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row revealer.sidebar-revealer label.sidebar-label,
dialog filechooser placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row revealer.sidebar-revealer label.sidebar-label {
    padding: 4px 0px 4px 1px;
}

placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row revealer.sidebar-revealer button.image-button.sidebar-button,
dialog filechooser placessidebar.sidebar.frame viewport.frame list row.activatable.sidebar-row revealer.sidebar-revealer button.image-button.sidebar-button {
    background-color: transparent;
    background-image: none;
    border-image:none;
    box-shadow: none;
    border-width: 0px;
    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.text-button {
    border-right-width: 1px;
    border-left-width: 1px;
    border-radius: 2px;
    padding: 4px;
}
*/

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

/* other locations nautilus, filechooser */
placesview actionbar,
placesview stack frame,
.nautilus-window headerbar.titlebar {
    border-width: 0px;
    border-style: none;
}

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

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

overlay.osd {
    background-color: transparent;
}

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

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

.osd .horizontal > button {
    padding: 4px 6px;
    margin: 0px 1px;
}

.osd button {
    border-color: shade (@theme_bg_color, 0.4);
}
.osd button:disabled {
    border-color: alpha(@osd_button_border,0.5);
}

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

.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;
    -gtk-icon-shadow: 0 -1px @osd_button_shadow;
}

button.osd {
    padding: 8px;
}

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

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

button.osd {
    background-image: none;
    border-image: none;
}

button.osd:focus:hover:active {
    border-image: none;
}

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

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

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

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

button.osd:disabled,
button.osd:checked:disabled,
.osd button:disabled,
.osd button:checked:disabled {
    color: @osd_button_fg_insensitive;
    text-shadow: none;
    -gtk-icon-shadow: none;
}

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

button.osd:checked,
button.osd:checked:hover,
button.osd:focus:hover:active,
.osd button:checked,
.osd button:checked:hover,
.osd button.popup: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:checked:first-child {
    border-left-width: 1px;
}

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

.osd button.popup:checked {
    background-color: transparent;
    border-color: @osd_button_border;
    color: @osd_button_fg_active;
    text-shadow: 0 -1px @osd_button_shadow;
}

toolbar.osd {
    color: @osd_fg;
    text-shadow: 0 1px @osd_text_shadow;
    padding: 5px;
    border-style: solid;
    border-width: 1px;
    border-color: shade (@theme_bg_color, 0.4);
    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;
}

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

toolbar.osd button,
toolbar.osd button:hover,
toolbar.osd button:focus,
toolbar.osd button:focus.hover,
toolbar.osd button:focus.hover:active,
toolbar.osd button:checked,
toolbar.osd button:hover:active,
toolbar.osd button:disabled,
toolbar.osd .linked button,
toolbar.osd .linked button:hover,
toolbar.osd .linked button:focus,
toolbar.osd .linked button:focus:hover,
toolbar.osd .linked button:focus:hover:active,
toolbar.osd .linked button:checked,
toolbar.osd .linked button:hover:active,
toolbar.osd .linked button:disabled {
    border-color: shade (@theme_bg_color, 0.4);
    border-style: solid;
    border-image: none;
    padding: 8px;
    border-radius: 0px;
}

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

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

toolbar.osd button:first-child,
toolbar.osd button:hover:first-child,
toolbar.osd button:checked:first-child,
toolbar.osd button:hover:active:first-child,
toolbar.osd button:focus:hover:active:first-child {
    border-radius: 3px 0 0 3px;
    border-width: 1px 0 1px 1px;
    box-shadow: inset -1px 0 @osd_button_inset;
}

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

toolbar.osd button:only-child,
toolbar.osd button:hover:only-child,
toolbar.osd button:checked:only-child,
toolbar.osd button:hover:active:only-child,
toolbar.osd button:focus:hover:active:only-child,
toolbar.osd toolbutton button,
toolbar.osd toolbutton:only-child button,
toolbar.osd toolbutton:last-child button,
toolbar.osd toolbutton:first-child button {
    border-width: 1px;
    border-radius: 3px;
    border-style: solid;
    box-shadow: none;
}

toolbar.osd 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,
.osd progressbar {
    background-color: @osd_fg;
}

.osd scale trough {
    border-color: shade (@theme_bg_color, 0.4);
    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_selected_bg_color;
    background-color: @osd_scale_trough_highlight_bg_color;
}

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

.osd popover.background.scale-popup {
    color: @osd_fg;
    border-style: solid;
    border-width: 1px;
    border-color: shade (@theme_bg_color, 0.4);
    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;
    padding: 2px;
}

.osd popover.background.scale-popup button.flat.image-button {
    background-image: linear-gradient(to bottom,
                                      @osd_button_bg_a,
                                      @osd_button_bg_b 68%,
                                      @osd_button_bg_c);
    border-radius: 3px;
    border-width: 1px;
    padding: 3px;
}

.osd popover.background.scale-popup button.flat.image-button:hover {
    background-image: linear-gradient(to bottom,
                                      @osd_button_bg_hover_a,
                                      @osd_button_bg_hover_b 78%,
                                      @osd_button_bg_hover_c);
    box-shadow: none;
}

.osd popover.background.scale-popup button.flat.image-button:disabled {
    border-color: alpha (shade(@theme_bg_color, 0.4), 0.0);
    background-image: none;
    background-color: transparent;
}

/* spinbuttons in color selection */
.osd.popover spinbutton button {
    border-radius: 0px;
    border-width: 0px;
    border-image: none;
    padding: 6px;
}

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

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

.osd .progressbar,
.osd progressbar,
progressbar .osd {
    padding: 0;
    min-height: 3px;
}

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

.osd .progressbar,
.osd progressbar,
progressbar .osd {
    border-style: none;
	background-color: alpha(shade(@theme_selected_bg_color, 1.0), 0.9);
    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 iconview.cell:selected,
.osd iconview.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;
}

/****************
 * GtkAssistant *
 ****************/

assistant .sidebar .highlight {
    color: @theme_fg_color;
    font-weight: bold;
}

assistant .sidebar {
    padding: 12px;
    border-width: 1px;
    border-radius: 2px;
    border-style: solid;
    border-color: @gtkassistant_sidebar_border_color;
    color: mix (@theme_fg_color, @theme_bg_color, 0.40);
    background-color: @sidebar_bg_color;
}

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

switch {
    color: @switch_color;
}

scale progressbar,
switch:checked {
    color: @switch_trough_active_color;
}

switch:checked,
switch:backdrop:checked {
    background-image: -gtk-gradient (linear,
                      left top, left bottom,
                      from (@switch_trough_active_gradient_a),
                      to (@switch_trough_active_gradient_b));
}

switch:disabled,
switch:backdrop:disabled {
    background-image: none;
    background-color: @insensitive_bg_color;
    color: mix(@insensitive_bg_color, @insensitive_fg_color, 0.5);
}

switch slider {
    background-color: @switch_slider_bg_color;
    border-width: 1px;
    border-radius: 2px;
    border-style: solid;
    border-color: @switch_slider_border_color;
    padding: 4px;
    outline-color: @curent_color;
}

switch slider:disabled {
    background-color: @switch_slider_insensitive_bg_color;
    border-color: @insensitive_border_color;
}

/**************************
 * GtkIconview GtkViewport*
 **************************/

iconview,
viewport {
    border-radius: 3px;
    padding: 0;
    background-color: @theme_base_color;
}

iconview.view.cell:selected,
iconview.view.cell:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
    border-radius: 4px;
}

iconview.cell:selected:focus {
    border-radius: 3px;
    border-color: alpha(@theme_text_color, 0.6);
    border-width: 1px;
    border-style: dashed;
}

list,
view,
.view, 
view text,
.view text,
iconview text,
textview text
treeview {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

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

view:disabled,
.view:disabled,
treeview:disabled {
    background-color: @insensitive_bg_color;
    color: @insensitive_fg_color;
}

/* for firefox and probably other apps */
label:selected,
label selection,
label selection:focus,
label selection:hover {
  background-color: @theme_selected_bg_color;
  color: @theme_selected_fg_color;
}

label:disabled:selected,
label selection:disabled {
	color: @insensitive_fg_color;
}

label:backdrop:selected,
label selection:backdrop {
	color: @theme_fg_color;
}

label:backdrop:disabled:selected,
label selection:backdrop:disabled {
	color: @insensitive_fg_color;
}

/***************
 * GtkTreeview *
 ***************/

treeview {
    -GtkTreeView-vertical-separator: 0;
    -GtkTreeView-expander-size: 13;
    outline-color: alpha(currentColor, 0.6);
}

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

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

/* column-headers */
treeview header button {
    color: @internal_element_color;
}

treeview header button,
treeview header button:disabled,
treeview header button:hover,
treeview header button:focus:hover {
    background-color: @theme_base_color;
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@column_header_button_gradient_a),
                      color-stop (0.50, @column_header_button_gradient_b),
                      color-stop (0.50, @column_header_button_gradient_c),
                      to (@column_header_button_gradient_d));
    padding: 0 4px;
    font-weight: normal;
}

treeview header button:disabled {
    background-color: @insensitive_bg_color;
}

treeview header button:hover,
treeview header button:focus:hover,
treeview header button:focus:hover:active,
treeview header button:hover:active,
treeview header button:checked,
treeview header button:checked:hover {
    color: @internal_element_hover_color;
}

treeview header button:checked,
treeview header button:checked:hover,
treeview header button:checked:hover:focus {
    background-color: @entry_bg_color;
    background-image: none;
}

treeview header button,
treeview header button:focus,
treeview header button:checked,
treeview header button:checked:hover,
treeview header button:focus:checked,
treeview header button:focus:hover:active {
    border-image: none;
    border-width: 1px;
    border-radius: 0;
    border-style: solid;
    border-color: @column_header_border_top_color @column_header_border_right_color
                  @column_header_border_bottom_color @column_header_border_left_color;

}

treeview header button:last-child,
treeview header button:last-child:focus,
treeview header button:last-child:checked,
treeview header button:last-child:hover:active,
treeview header button:last-child:active:focus {
    border-right: none;
}

row,
row:focus {
   min-height: 22px;
}

row:hover,
row:disabled,
row:selected,
row:selected:focus {
    border-width: 0;
}

row:selected,
row:selected:focus,
.cell:selected,
row:selected:hover,
row:selected:focus:hover,
.cell:selected:hover {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (@menubar_menuitem_hover_gradient_a),
                      to (@menubar_menuitem_hover_gradient_d));
}

row:hover,
row:hover:focus,
.cell:hover {
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (shade(@menubar_menuitem_hover_gradient_a, 1.2)),
                      to (shade(@menubar_menuitem_hover_gradient_d, 1.3)));
}

.cell {
    color: @theme_text_color;
    padding: 2px;
    border-width: 0;
}

.cell:selected {
    color: @theme_selected_fg_color;
}

/* expander */
expander {
    border-style: solid;
    border-width: 1px;
    border-radius: 2px;
    border-color: @border_color;
    color: @theme_fg_color;
    background-color: shade(@theme_bg_color, 1.02);
}

treeview.view.expander {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
    color: @theme_fg_color;
}

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

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

treeview.view.expander:hover {
    color: @theme_selected_bg_color;
}

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

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

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

expander arrow:hover {
    color: @internal_element_color;
}

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

/* why this weird padding, possible issue with gtk+-3.18 ? */
expander arrow {
    min-width: 16px;
    min-height: 16px;
    padding: 0px 4px 0px 0px;
}

expander row {
    border-radius: 2px;
}

expander row:selected,
expander row:selected:focus {
    border-style: solid;
    border-width: 1px;
    border-color: @expander_row_selected_border_color;
    color: @expander_row_selected_color;
    background-color: @theme_selected_bg_color;
}

expander scrolledwindow.frame {
    border-radius: 0px;
    border-width: 1px 0px;
}

expander toolbar.inline-toolbar {
    border-width: 0px;
    border-style: none;
}

/* Calendars */
calendar {
    padding: 1px;
    border-style:none;
}

calendar.view {
    border-radius: 3px;
    border-style: solid;
    border-width: 1px;
    border-color: rgb(162,158,155);
}

calendar.header {
    border-radius: 3px 3px 0px 0px;
    background-image: -gtk-gradient (linear,
                      left top,
                      left bottom,
                      from (shade (@theme_bg_color, 1.04)),
                      to (shade (@theme_bg_color, 0.89)));
    border-width: 0;
}

calendar button,
calendar button:disabled {
    background-image: none;
    background-color: transparent;
}

calendar {
    color: @theme_fg_color;
    text-shadow: none;
}

calendar:indeterminate {
    color: alpha(@theme_fg_color, 0.4);
}

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

/* Use different button and entry borders on infobars */
infobar entry,
infobar entry:focus,
infobar button,
infobar button:disabled,
infobar button:checked,
infobar button:focus,
infobar button:focus:checked,
entry.info,
entry.info:focus,
.info button,
.info button:disabled,
.info button:checked,
.info button:focus,
.info button:focus:checked,
entry.warning,
entry.warning:focus,
.warning button,
.warning button:disabled,
.warning button:checked,
.warning button:focus,
.warning button:focus:checked,
entry.question,
entry.question:focus,
.question button,
.question button:disabled,
.question button:checked,
.question button:focus,
.question button:focus:checked,
entry.error,
entry.error:focus,
.error button,
.error button:disabled,
.error button:checked,
.error button:focus,
.error button:focus:checked {
    border-image: none;
    border-color: shade(@border_color, 0.9);
    border-style: solid;
    border-width: 1px;
}

infobar,
.info,
.warning,
.question,
.error {
    border-width: 1px;
    border-style: solid;
}

infobar {
    border-color: shade(@border_color, 0.9);
}

.info,
.info > * {
    background-color: @info_bg_color;
    color: @info_fg_color;
    border-color: darker(@info_bg_color);
}

.warning,
.warning > * {
    background-color: @warning_bg_color;
    color: @warning_fg_color;
    border-color: darker(@warning_bg_color);
}

.question,
.question > * {
    background-color: @question_bg_color;
    color: @question_fg_color;
    border-color: darker(@question_bg_color);
}

.error,
.error > * {
    background-color: @error_bg_color;
    color: @error_fg_color;
    border-color: darker(@error_bg_color);
}

.view.dim-label,
.dim-label,
.dim-label:hover,
.dim-label:focus {
    color: mix (@theme_fg_color, @theme_bg_color, 0.50);
}

.dim-label:selected,
.dim-label:selected:focus {
    color: mix (@theme_selected_fg_color, @theme_base_color, 0.50);
}

/**************
 * Header bar *
 **************/

/************
 * Titlebar *
 ************/

headerbar,
.titlebar {
    background-image: linear-gradient(to bottom,
                      @theme_base_color,
                      @theme_bg_color);
    background-color: transparent;
    border-radius: 7px 7px 0 0;
    border-bottom: 1px solid;
    border-color: shade(@border_color, 1.30);
    padding: 3px 4px;
}

.horizontal.titlebar headerbar:first-child,
paned.horizontal.titlebar headerbar:first-child {
	border-top-right-radius: 0px;
}

.horizontal.titlebar headerbar:last-child,
paned.horizontal.titlebar headerbar:last-child {
	border-top-left-radius: 0px;
}

paned.horizontal.titlebar separator,
.horizontal.titlebar separator.vertical.tilix-title-separator {
	background-color: transparent;
	background-image: none;
	color: transparent;
}

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

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

headerbar .title,
.titlebar .title {
    font-weight: bold;
}

headerbar button.titlebutton,
.titlebar button.titlebutton {
    background: none;
    border-image: none;
}

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

.background.csd decoration,
window.unified {
    border-width: 0px;
    border-radius: 7px 7px 0 0;
    border-style: solid;
    box-shadow: 0 0 0 1px @wm_border, 0 2px 8px 3px @wm_shadow;
    margin: 10px;
}

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

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

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

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

/* workaround to avoid unwanted black frames if switching compositor on/off */
.csd.popup decoration {
    border-radius: 0;
    box-shadow: none;
}

messagedialog.csd decoration {
    border-radius: 7px;
    box-shadow: 0 1px 5px @wm_shadow;
}

/**************
 * Action bar *
 **************/

actionbar {
    border-width: 1px 0px 0px 0px;
    border-style:solid;
    border-color: rgb(162,158,155);
    padding: 7px 7px 3px 7px;
}

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

popover.background {
    background-clip: initial;
    margin: 10px;
    padding: 2px;
    border-color: @border_color;
    border: 1px solid;
    border-radius: 2px;
    background-color: @theme_bg_color;
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.0),
                                      shade(@theme_bg_color, 0.85));
    box-shadow: 0 1px 5px @wm_shadow;
    text-shadow: none;
    -gtk-icon-shadow: none;
}

popover > list,
popover > .view,
popover > toolbar popover.osd > toolbar,
popover > .inline-toolbar popover.osd > toolbar,
popover > searchbar popover.osd > toolbar,
popover > .location-bar popover.osd > toolbar,
popover > toolbar popover.osd > .inline-toolbar,
popover > .inline-toolbar .popover.osd > .inline-toolbar,
popover > searchbar popover.osd > .inline-toolbar,
popover > .location-bar popover.osd > .inline-toolbar,
popover > toolbar popover.osd > searchbar,
popover > .inline-toolbar popover.osd > searchbar,
popover > searchbar popover.osd > searchbar,
popover > .location-bar popover.osd > searchbar
popover > .inline-toolbar popover.osd > .location-bar,
popover > searchbar 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;
    -gtk-icon-shadow: none;
    border: 0;
}

/* ie. colorchooser */
.popover.osd {
	background-image: none;
	background-color: alpha(shade(#3D3E40, 0.85), 0.35);
	border: 1px solid black;
    border-radius: 2px;
	box-shadow: none;
	color: @theme_base_color;
}

.popover.osd spinbutton,
.popover.osd spinbutton entry {
    background: transparent;
	color: @theme_base_color;
}

.popover.osd button {
    text-shadow: 0 -1px @osd_text_shadow;
    -gtk-icon-shadow: 0 -1px @osd_text_shadow;
}

.popover.osd button:checked {
        box-shadow: none;
}

.popover.osd button:disabled {
    color: alpha(@theme_selected_fg_color, 0.4);
}

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

modelbutton.flat {
    color: @theme_fg_color;
    border-radius: 3px;
}

modelbutton.flat,
.linked button.image-button.model {
  min-height: 24px;
}

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

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

modelbutton.flat:checked,
modelbutton.flat:active,
modelbutton.flat:disabled,
modelbutton.flat:active:disabled,
modelbutton.flat:checked:disabled,
modelbutton.flat,
modelbutton.flat:focus,
modelbutton.flat:active:focus,
modelbutton.flat:checked:focus {
    color: @theme_fg_color;
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    border-image: none;
    border-style: solid;
    border-width: 1px;
    box-shadow: none;
    border-radius: 3px;
}

modelbutton.flat:checked:hover,
modelbutton.flat:active:hover,
modelbutton.flat:hover,
modelbutton.flat:selected {
    color: @theme_selected_fg_color;
    background-image:  linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.1),
                                      shade(@theme_selected_bg_color, 0.8));
    text-shadow: none;
    border-color: @button_active_gradient_a;
    border-width: 1px;
    border-radius: 3px;
    border-style: solid;
}

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

popover button.default.text-button.suggested-action {
    background-color: transparent;
    background-image: none;
    text-shadow:none;
    border-style: none;
    border-image: none;
    box-shadow: none;
}

popover button.default.text-button.suggested-action:hover {
    color: @theme_selected_fg_color;
    background-image:  linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.1),
                                      shade(@theme_selected_bg_color, 0.8));
    text-shadow: none;
    border-color: @border_color;
    border-width: 2px;
    border-radius: 3px;
}

/************
 * GtkStack *
 ************/

stacksidebar.sidebar separator.horizontal {
/*    -GtkWidget-separator-height: 0px; */
}

stacksidebar.sidebar viewport.frame {
    border-color: @border_color;
    border-style: solid;
    border-width: 0 1px 0 0;
    /* FIXME radius > 0 doesn't work */
    border-radius: 0px 0px 0px 3px;
    background-color: @theme_base_color;
}

stacksidebar.sidebar list row.activatable:selected {
    border-style: none;
    border-width: 0px;
    box-shadow: inset  0px  1px shade (@theme_selected_bg_color, 0.8),
                inset  1px  0px shade (@theme_selected_bg_color, 0.8),
                inset -1px  0px shade (@theme_selected_bg_color, 0.8),
                inset  0px -1px shade (@theme_selected_bg_color, 0.8);
}

/* address entry */
stack .linked.vertical entry {
    padding: 4px;
}

.horizontal.titlebar.header-bar .horizontal.linked.stack-switcher button.text-button {
    padding: 4px;
}

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

.app-notification,
.app-notification.frame {
    color: @theme_fg_color;
    padding: 10px;
    border-style: none;
    border-radius: 0 0 4px 4px;
    background-color: rgba(180, 187, 163, 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 headerbar button.titlebutton,
headerbar .app-notification button.titlebutton,
.app-notification .titlebar button.titlebutton,
.titlebar .app-notification button.titlebutton,
.app-notification calendar.header button.titlebutton,
calendar.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(180, 187, 163, 0.7),
                                      rgba(180, 187, 163, 0.7));
    background-clip: padding-box;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
    text-shadow: none;
    -gtk-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 headerbar button.titlebutton,
headerbar .app-notification button.titlebutton,
.app-notification .titlebar button.titlebutton,
.titlebar .app-notification button.titlebutton,
.app-notification calendar.header button.titlebutton,
calendar.header .app-notification button.titlebutton,
.app-notification.frame button.flat,
.app-notification.frame headerbar button.titlebutton,
headerbar .app-notification.frame button.titlebutton,
.app-notification.frame .titlebar button.titlebutton,
.titlebar .app-notification.frame button.titlebutton,
.app-notification.frame calendar.header button.titlebutton,
calendar.header .app-notification.frame button.titlebutton {
    -gtk-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),
                                      rgba(119, 158, 79, 0.7));
    background-clip: padding-box;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
    text-shadow: none;
    -gtk-icon-shadow: 0 1px black;
    outline-color: rgba(238, 238, 236, 0.3);
    border-radius: 3px;
}

.app-notification button:checked,
.app-notification button:backdrop:checked,
.app-notification.frame button:checked,
.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),
                                      rgba(105, 175, 65, 0.7));
    background-clip: padding-box;
    box-shadow: none;
    text-shadow: none;
    -gtk-icon-shadow: none;
    outline-color: rgba(238, 238, 236, 0.3);
    border-radius: 3px;
}

.app-notification button:disabled,
.app-notification button:backdrop:disabled,
.app-notification.frame button:disabled,
.app-notification.frame button:backdrop:disabled {
    color: #878989;
    border-color: rgba(0, 0, 0, 0.7);
    background-image: linear-gradient(to bottom,
                                      rgba(52, 57, 57, 0.5),
                                      rgba(52, 57, 57, 0.5));
    background-clip: padding-box;
    box-shadow: none;
    text-shadow: none;
    -gtk-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(180, 187, 163, 0.7),
                                      rgba(180, 187, 163, 0.7));
    background-clip: padding-box;
    box-shadow: none;
    text-shadow: none;
    -gtk-icon-shadow: none;
    border-radius: 3px;
    padding: 0px;
}

/* hyperlinks */
/* ie. yelp */
*:link,
*:visited {
  color: @link_color;
}

button.flat.link.text-button,
button.flat.link.text-button:hover,
button.flat.link.text-button:checked,
button.flat.link.text-button:hover:active {
    text-shadow: none;
}

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

/* ie. mate-keyboard-properties option window */
dialog > .vertical.dialog-vbox > scrolledwindow.frame {
    border-color: @border_color;
    border-style: solid;
    border-width: 1px;
    border-radius: 2px;
}

dialog > .vertical.dialog-vbox > scrolledwindow.frame > viewport.view > box.vertical > expander {
    border-style: none;
    background-color: transparent;
}

/* credits in GtkAbout windows */
dialog .dialog-vbox scrolledwindow.frame > viewport.view.frame {
    background-color: shade (@theme_bg_color, 1.04);
}

dialog scrolledwindow.frame viewport .vertical expander .vertical {
    background-color: @theme_base_color;
    border-radius: 3px;
    border-color: @border_color;
    border-style: solid;
    border-width: 1px;
}

/* ie. caja fm-properties-window notes tab */
dialog > .vertical.dialog-vbox > notebook.frame > stack > scrolledwindow,
dialog > .vertical.dialog-vbox > notebook.frame > stack > scrolledwindow.frame {
    border-style: none;
}

/* print dialog */
printdialog.background > box.view.vertical.dialog-vbox {
    margin: 7px;
    background-color: shade (@theme_bg_color, 1.0);
}

printdialog.background paper {
    border-style: solid;
    border-width: 0.9px;
    border-radius: 0px;
    border-color: @border_color;
    background-color: @theme_base_color;
}

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

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