* {
    engine: adwaita;
    padding: 0;

    background-clip: padding-box;

    -GtkToolButton-icon-spacing: 4;

    -GtkTextView-error-underline-color: @error_color;

    -GtkPaned-handle-size: 5;

    -GtkCheckButton-indicator-size: 16;
    -GtkCheckMenuItem-indicator-size: 12;

    /* The size for scrollbars. The slider is 2px smaller, but we keep it
     * up so that the whole area is sensitive to button presses for the
     * slider. The stepper button is larger in both directions, the slider
     * only in the width
     */

    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 1;

    -GtkToolItemGroup-expander-size: 11;
    -GtkExpander-expander-size: 11;

    -GtkMenu-horizontal-padding: 0;
    -GtkMenu-vertical-padding: 0;

    -GtkWidget-link-color: @link_color;
    -GtkWidget-visited-link-color: @link_color;
    -GtkIMHtml-hyperlink-color: @link_color;
    -GtkHTML-link-color: @link_color;

    -WnckTasklist-fade-overlay-rect: 0;

    -GtkWidget-focus-padding: 2;
    -GtkWidget-focus-line-width: 1;
    -adwaita-focus-border-color: alpha(@theme_text_color, 0.3);
    -adwaita-focus-border-radius: 2;
    -adwaita-focus-border-dashes: 1;
    -GtkWindow-resize-grip-width: 0;
    -GtkWindow-resize-grip-height: 0;   
}

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

GtkWindow {
    color: @theme_fg_color;
}

GtkWindow:backdrop {
    color: @theme_unfocused_fg_color;
}

* {
    /* inherit the color from parent by default */
    color: inherit;
    background-color: @theme_bg_color;
}

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

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

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

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

*:backdrop {
    /* I want everything nice and flat in the unfocused window */
    text-shadow: none;
    icon-shadow: none;
    color: @theme_unfocused_fg_color;
}

*:insensitive:backdrop {
    /* I want everything nice and flat in the unfocused window */
    text-shadow: none;
    icon-shadow: none;
    color: @unfocused_insensitive_fg_color;
}

/************
 * Tooltips *
 ************/
.tooltip {
    padding: 4px;
    border-style: none;
    border-radius: 5px;

    background-color: alpha(@theme_tooltip_bg_color, 0.90);
    color: @theme_tooltip_fg_color;

    text-shadow: 1 1 black;
}

.tooltip * {
    background-color: alpha(@theme_tooltip_bg_color, 0.90);
}

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

.spinner:active {
    transition: 750ms linear loop;
}

.floating-bar {
    background-color: @info_bg_color;
    border-color: darker(@info_bg_color);

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

.floating-bar:backdrop {
    background-color: @theme_unfocused_base_color;
    border-color: shade(@theme_unfocused_base_color, 0.9);
}

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

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

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

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

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

GtkStatusbar {
    padding: 5px;
    color: @theme_fg_color;
    -GtkStatusbar-shadow-type: none;
}

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

GtkTreeView .separator,
.separator,
.separator:hover {
    color: @borders;
}

GtkTreeView .separator:backdrop,
.separator:backdrop,
.separator:hover:backdrop {
    color: @unfocused_insensitive_borders;
}

.pane-separator {
    color: shade (@inactive_frame_color, 0.80);
}

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

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

.pane-separator:backdrop,
.pane-separator:hover:backdrop {
    background-color: @theme_unfocused_bg_color;
}

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

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

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

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

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

    color: @entry_text_color;
    background-color: @theme_base_color;
}

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

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

    /* border-image defined in -assets variant */

    -adwaita-progressbar-pattern: none;
}

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

.entry:insensitive {
    color: @insensitive_fg_color;
}

.entry:backdrop {
    color: @theme_unfocused_text_color;
}

.entry:insensitive:backdrop {
    color: @unfocused_insensitive_fg_color;
}

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

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

.image:hover {
    color: @internal_element_prelight;
}


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

.spinbutton .button:backdrop {
    box-shadow: 1 0 inset @unfocused_entry_separators;
    box-shadow: none;
}

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

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

.spinbutton .button:insensitive:backdrop {
    color: mix(@internal_element_color, @theme_unfocused_base_color, 0.7);
}

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

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

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

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

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

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

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

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

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

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

}

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

}

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

GtkColorSwatch:backdrop,
GtkColorSwatch:backdrop:selected {
    box-shadow: none;
}

GtkColorSwatch:backdrop:hover {
    border-color: alpha(black, 0.3);
    background-image: none;
}

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

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

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

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

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

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

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

GtkColorChooserWidget #add-color-button:backdrop {
    border-color: mix(@unfocused_borders, @theme_unfocused_bg_color, 0.3);
    background-color: mix(@unfocused_borders, @theme_unfocused_bg_color, 0.3);
    color: @theme_unfocused_bg_color;
}


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

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

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

GtkColorEditor GtkColorSwatch {
    border-radius: 6px;
}

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


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

/* progress component */
.progressbar,
.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focus {
    background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from (@progressbar_background_a),
                                     color-stop (0.75, @progressbar_background_b),
                                     to (shade(@progressbar_background_a, 0.85)));

    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: @progressbar_border;
    box-shadow: 1 1 alpha(white, 0.2) inset, -1 -1 alpha(white, 0.1) inset;

    -adwaita-progressbar-pattern: -gtk-gradient (linear,
                                                 left top, right bottom,
                                                 from (alpha (@progressbar_pattern, 0.00)),
                                                 color-stop (0.49, alpha (@progressbar_pattern, 0.00)),
                                                 color-stop (0.50, alpha (@progressbar_pattern, 0.25)),
                                                 to (alpha (@progressbar_pattern, 0.25)));
}

.progressbar.vertical {
    background-image: -gtk-gradient (linear,
                                     left top, right top,
                                     from (@progressbar_background_a),
                                     color-stop (0.75, @progressbar_background_b),
                                     to (shade(@progressbar_background_a, 0.85)));

    -adwaita-progressbar-pattern: -gtk-gradient (linear,
                                                 left bottom, right top,
                                                 from (alpha (@progressbar_pattern, 0.00)),
                                                 color-stop (0.49, alpha (@progressbar_pattern, 0.00)),
                                                 color-stop (0.50, alpha (@progressbar_pattern, 0.25)),
                                                 to (alpha (@progressbar_pattern, 0.25)));
}

.progressbar:backdrop,
.progressbar row:backdrop,
.progressbar row:selected:backdrop,
.progressbar.vertical:backdrop,
.progressbar.vertical row:backdrop,
.progressbar.vertical row:selected:backdrop {
    -adwaita-progressbar-pattern: none;
    background-image: none;
    background-color: @progressbar_unfocused_background;
    border-color: @progressbar_unfocused_border;
    box-shadow: none;
    -adwaita-progressbar-pattern: none;
}

/* through component */
GtkProgressBar,
.trough row {
    padding: 0 0 1px 0;
    -GtkProgressBar-xspacing: 20;
    -GtkProgressBar-yspacing: 20;
}

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

GtkProgressBar:backdrop,
GtkProgressBar.vertical:backdrop,
.trough row:backdrop,
.trough.vertical row:backdrop {
    background-image: none;
    background-color: @unfocused_dark_bg;
}

/************
 * GtkScale *
 ************/
GtkScale {
    -GtkScale-slider-length: 16;
    -GtkRange-slider-width: 20;
    -GtkRange-trough-border: 0;
}

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

    color: alpha(@theme_base_color, 0.0); /* FIXME */
    background-color: transparent;

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

GtkScale.trough,
GtkScale.trough.highlight,
GtkScale.trough.vertical,
GtkScale.trough:backdrop {
    border-width: 1px;
    border-image: none;
    border-style: solid;
}

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

GtkScale.trough:backdrop {
    border-color: @unfocused_borders;
}

GtkScale.trough:insensitive {
    background-color: @insensitive_bg_color;
    border-color: @insensitive_borders;
    box-shadow: none;
    background-image: none;
}

GtkScale.progressbar {
    background-color: @scale_progress_fill;

    -adwaita-progressbar-pattern: none;
}

GtkScale.progressbar:backdrop {
    background-color: @unfocused_borders;

    -adwaita-progressbar-pattern: none;
}

GtkScale.mark {
    color: alpha(@theme_fg_color, 0.3);
}

GtkScale.trough.vertical {
    box-shadow: -1 0 inset @theme_bg_color;
}

GtkScale.trough {
    box-shadow: 0 -1 inset @theme_bg_color;
}

GtkScale.trough:backdrop {
    box-shadow: none;
    border-color: @unfocused_borders;
    background-color: @unfocused_dark_bg;
    background-image: none;
}

GtkScale.trough:insensitive:backdrop {
    background-color: @unfocused_insensitive_bg_color;
    border-color: @unfocused_insensitive_borders;
    box-shadow: none;
    background-image: none;
}

/**********
 * Frames *
 **********/
.frame {
    padding: 2px;
    border-width: 0;
    background-color: @theme_base_color;
}

GtkViewport.frame {
    padding: 0;
}

/* only render frames in a GtkScrolledWindow */
GtkScrolledWindow.frame {
    border-style: solid;
    border-color: @borders;
    border-width: 1px;
    border-radius: 2px;
    padding: 0;
}

GtkScrolledWindow.frame:backdrop {
    border-color: @unfocused_borders;
}

/***********
 * Buttons *
 ***********/
.button,
.button.menuitem.menubar,
GtkComboBox.combobox-entry .button {
    padding: 1px 4px;
}

.button {
    -GtkButton-image-spacing: 4;
    -GtkButton-interior-focus: true;
    -GtkButton-default-border: 0;
    -GtkButton-inner-boder: 3;

    color: @theme_text_color;

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

    text-shadow: @button_text_shadow 0 1;
}

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

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

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

    text-shadow: @primary_toolbar_button_text_shadow 0 1;
}

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

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

.button *:insensitive:backdrop {
    color: @unfocused_insensitive_fg_color;
}

.button *:active:backdrop,
.button *:active:insensitive:backdrop {
    color: @theme_unfocused_bg_color;
    text-shadow: none;
    icon-shadow: none;
}

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

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

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

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

/* linked buttons */

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

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

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

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

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

.linked .button:backdrop,
.toolbar .button.raised.linked:backdrop,
.toolbar .raised.linked .button:backdrop,
.inline-toolbar.toolbar .button:backdrop,
.inline-toolbar.toolbar GtkToolButton .button:backdrop {
    box-shadow: -1 0 inset @unfocused_borders;
}

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

.linked .button:insensitive:last-child:backdrop,
.toolbar .button.raised.linked:insensitive:last-child:backdrop,
.toolbar .raised.linked .button:insensitive:last-child:backdrop,
.inline-toolbar.toolbar .button:insensitive:last-child:backdrop,
.inline-toolbar.toolbar GtkToolButton:last-child .button:insensitive:backdrop {
    box-shadow: none;
}

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

/* Middle button */
.linked .entry,
.linked .button,
.linked .button:active,
.linked .button:active:hover,
.linked .button:focus,
.linked .button:focus:active,
.linked .button:insensitive {
    border-right-width: 0;
    border-left-width: 0;
    border-image-width: 3 0 4 0;
    border-radius: 0;
}

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

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

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

/* Linked buttons on primary toolbars */

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

/* Leftmost button */
.primary-toolbar .button.raised.linked:first-child,
.primary-toolbar .button.raised.linked:active:first-child,
.primary-toolbar .button.raised.linked:focus:first-child,
.primary-toolbar .button.raised.linked:focus:active:first-child,
.primary-toolbar .button.raised.linked:insensitive:first-child,
.primary-toolbar .button.raised.linked:backdrop:first-child,
.primary-toolbar .raised.linked .button:first-child,
.primary-toolbar .raised.linked .button:active:first-child,
.primary-toolbar .raised.linked .button:focus:first-child,
.primary-toolbar .raised.linked .button:focus:active:first-child,
.primary-toolbar .raised.linked .button:insensitive:first-child,
.primary-toolbar .raised.linked .button:backdrop:first-child,
.inline-toolbar.toolbar .button:first-child,
.inline-toolbar.toolbar .button:active:first-child,
.inline-toolbar.toolbar .button:focus:first-child,
.inline-toolbar.toolbar .button:focus:active:first-child,
.inline-toolbar.toolbar .button:insensitive:first-child,
.inline-toolbar.toolbar .button:backdrop:first-child,
.inline-toolbar.toolbar .button:backdrop:insensitive:first-child,
.inline-toolbar.toolbar GtkToolButton:first-child .button,
.inline-toolbar.toolbar GtkToolButton:first-child .button:active,
.inline-toolbar.toolbar GtkToolButton:first-child .button:focus,
.inline-toolbar.toolbar GtkToolButton:first-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:first-child .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:first-child .button:backdrop,
.inline-toolbar.toolbar GtkToolButton:first-child .button:backdrop:insensitive {
    border-left-width: 2px;
    border-right-width: 0;
    border-image-width: 4 0 4 4;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* Rightmost button */
.primary-toolbar .button.raised.linked:last-child,
.primary-toolbar .button.raised.linked:active:last-child,
.primary-toolbar .button.raised.linked:focus:last-child,
.primary-toolbar .button.raised.linked:focus:active:last-child,
.primary-toolbar .button.raised.linked:insensitive:last-child,
.primary-toolbar .button.raised.linked:backdrop:last-child,
.primary-toolbar .raised.linked .button:last-child,
.primary-toolbar .raised.linked .button:active:last-child,
.primary-toolbar .raised.linked .button:focus:last-child,
.primary-toolbar .raised.linked .button:focus:active:last-child,
.primary-toolbar .raised.linked .button:insensitive:last-child,
.primary-toolbar .raised.linked .button:backdrop:last-child,
.inline-toolbar.toolbar .button:last-child,
.inline-toolbar.toolbar .button:active:last-child,
.inline-toolbar.toolbar .button:focus:last-child,
.inline-toolbar.toolbar .button:focus:active:last-child,
.inline-toolbar.toolbar .button:insensitive:last-child,
.inline-toolbar.toolbar .button:backdrop:last-child,
.inline-toolbar.toolbar .button:backdrop:insensitive:last-child,
.inline-toolbar.toolbar GtkToolButton:last-child .button,
.inline-toolbar.toolbar GtkToolButton:last-child .button:active,
.inline-toolbar.toolbar GtkToolButton:last-child .button:focus,
.inline-toolbar.toolbar GtkToolButton:last-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:last-child .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:last-child .button:backdrop,
.inline-toolbar.toolbar GtkToolButton:last-child .button:backdrop:insensitive {
    border-left-width: 0;
    border-right-width: 2px;
    border-image-width: 4 4 4 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* Single button */
.inline-toolbar.toolbar .button:only-child,
.inline-toolbar.toolbar .button:active:only-child,
.inline-toolbar.toolbar .button:focus:only-child,
.inline-toolbar.toolbar .button:focus:active:only-child,
.inline-toolbar.toolbar .button:insensitive:only-child,
.inline-toolbar.toolbar .button:backdrop:only-child,
.inline-toolbar.toolbar .button:backdrop:insensitive:only-child,
.inline-toolbar.toolbar GtkToolButton:only-child .button,
.inline-toolbar.toolbar GtkToolButton:only-child .button:active,
.inline-toolbar.toolbar GtkToolButton:only-child .button:focus,
.inline-toolbar.toolbar GtkToolButton:only-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:only-child .button:insensitive,
.inline-toolbar.toolbar GtkToolButton:only-child .button:backdrop,
.inline-toolbar.toolbar GtkToolButton:only-child .button:backdrop:insensitive {
    border-right-width: 2px;
    border-left-width: 2px;
    border-image-width: 4;
    border-radius: 3px;
}

GtkLinkButton * {
    text-shadow: none;
}

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

/*****************
 * Notebooks and *
 * tabs          *
 *****************/
.notebook {
    padding: 0;

    border-color: @borders;
    border-style: solid;
    border-width: 1px;

    background-color: @theme_base_color;

    -GtkNotebook-tab-overlap: 8;
    -GtkNotebook-tab-curvature: 6;
    /* FIXME - the gap should be applied only to top or bottom tabs */
    -GtkNotebook-initial-gap: 8;
}

.notebook GtkViewport {
    background-color: @theme_base_color;
}

.notebook:backdrop,
.notebook GtkViewport:backdrop {
    background-color: @theme_unfocused_base_color;
    border-color: @unfocused_borders;
}

.notebook tab {
    padding: 3px;
    border-style: solid;
    /* we draw our own custom border here for now */
    border-width: 0;

    background-image: linear-gradient(to bottom,
                                      @notebook_tab_hilight 2px,
                                      @notebook_tab_gradient_a 2px,
                                      @notebook_tab_gradient_a 7px,
                                      @notebook_tab_gradient_b);

    -adwaita-focus-border-radius: 2;
}

.notebook tab:backdrop {
    background-image: none;
    background-color: @theme_unfocused_bg_color;
    border-color: @unfocused_insensitive_borders;
}

.notebook tab:active {
    -adwaita-border-gradient: -gtk-gradient (linear,
                                             left top, left bottom,
                                             from (@notebook_active_tab_border),
                                             to (@borders));

    background-image: linear-gradient(to bottom,
                                      @notebook_selected_tab_color,
                                      @notebook_selected_tab_color 2px,
                                      @button_gradient_color_a 3px, /* FIXME */
                                      @theme_base_color);
}

.notebook tab:active:backdrop {
    /* FIXME I need to set a background-image here, background-color is ignored */
    background-image: linear-gradient(to bottom,
                                      @unfocused_borders,
                                      @unfocused_borders 2px,
                                      @theme_unfocused_base_color 3px,
                                      @theme_unfocused_base_color);
    background-color:  @theme_unfocused_base_color;
    border-color: @unfocused_borders;
    /* FIXME - should be possible to set it to none and use border color */
    -adwaita-border-gradient: -gtk-gradient (linear, 
                                             left top, left bottom,
                                             from (@unfocused_borders),
                                             to (@unfocused_borders));
    -adwaita-selected-tab-color: @unfocused_borders;
}

.notebook tab.top {
    padding: 4px 2px 0;
}

.notebook tab.top:active {
    padding: 7px 2px 0;
}

.notebook tab.bottom {
    padding: 0 2px 4px;
}

.notebook tab.bottom:active {
    padding: 0 2px 7px;
}

.notebook tab.left,
.notebook tab.right {
    background-image: none;
    background-color: @theme_bg_color;
    padding: 3px;
}

.notebook tab.left:active,
.notebook tab.right:active {
    background-image: none;
    background-color: @theme_base_color;
    -adwaita-selected-tab-color: alpha(@theme_base_color, 0.0);
}

.notebook tab.left,
.notebook tab.right {
    border-width: 1px;
}

.notebook tab.left:active {
    padding: 3px 3px 3px 5px;
    border-radius: 3px 0 0 3px;
}

.notebook tab.right:active {
    padding: 3px 5px 3px 3px;
    border-radius: 0 3px 3px 0;
}

/* close button styling */
.notebook tab .button,
.notebook tab .button:active,
.notebook tab .button:hover {
    border-image: none;
    border-style: none;
    background-image: none;
    background-color: transparent;
}

.notebook tab .button GtkImage {
    border-radius: 3px;
    color: mix(@theme_fg_color, @theme_base_color, 0.6); /* FIXME*/
    border-style: solid;
    border-color: transparent;
    border-width: 1px;
    padding: 0;

    icon-shadow: 0 1 alpha(white, 0.5); /* FIXME*/
}

.notebook tab .button GtkImage:hover {
    color: @theme_fg_color; /* FIXME*/
    border-color: alpha(black, 0.1); /* FIXME*/
}

.notebook tab .button GtkImage:active,
.notebook tab .button GtkImage:active:hover {
    background-color: alpha(black, 0.08); /* FIXME*/
    box-shadow: 0 1 inset alpha(black, 0.05); /* FIXME*/
    color:  @theme_base_color; /* FIXME*/
    icon-shadow: 0 1 alpha(black, 0.25); /* FIXME*/
    border-color: alpha(black, 0.27) 
                  alpha(black, 0.13) 
                  alpha(black, 0.13) 
                  alpha(black, 0.13); /* FIXME*/
}

.notebook tab .button GtkImage:backdrop {
    color: mix(@theme_unfocused_fg_color, @theme_unfocused_base_color, 0.7); /* FIXME*/
    icon-shadow: none;
}

.notebook tab .button GtkImage:backdrop:hover {
    color: @theme_unfocused_fg_color;
}

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

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

    text-shadow: @button_text_shadow 0 1;
}

GtkComboBox *:backdrop {
    color: @theme_unfocused_fg_color;
}

GtkComboBox *:insensitive:backdrop {
    color: @unfocused_insensitive_fg_color;
}

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

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

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

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

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

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

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

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

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

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

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

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

GtkComboBox.combobox-entry .button:backdrop:first-child,
GtkComboBox.combobox-entry .button:backdrop:last-child {
    box-shadow: none;
}

GtkComboBox.combobox-entry .button *:active,
GtkComboBox.combobox-entry .button *:active:hover {
    color: @theme_text_color;
}

GtkComboBox .button {
    color: @internal_element_color;
}

GtkComboBox .button *:hover {
    color: @theme_text_color;
}

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

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

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

.scrollbars-junction, /* the small square between scrollbars!!! */
.scrollbar.trough {
    background-image: none;
    background-color: @scrollbar_trough;
    border-width: 0;
    border-radius: 0;
    border-image: none;
}

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

.scrollbar.button:active,
.scrollbar.button:active:hover {
    background-color: mix(@scrollbar_slider, @scrollbar_trough, 0.8);
}

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

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

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

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

.scrollbar.button.top:hover:backdrop,
.scrollbar.button.bottom:hover:backdrop,
.scrollbar.button.right:hover:backdrop,
.scrollbar.button.left:hover:backdrop {
    box-shadow: none;
}

.scrollbar.button {
    color: @scrollbar_slider;
}

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

.scrollbar.button:insensitive {
    color: mix(@scrollbar_slider, @scrollbar_trough, 0.6);
}

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

.scrollbar.button:backdrop {
    color: @scrollbar_slider_unfocused;
}

.scrollbar.button:insensitive:backdrop {
    color: mix(@scrollbar_slider_unfocused, @scrollbar_trough_unfocused, 0.7);
}

/* FIXME: disable until we have have an extra px padded towards the border. It feels uncentered now.
.scrollbar.trough.vertical,
.scrollbar.trough.vertical:backdrop {
       box-shadow: -1 0 inset alpha(@theme_text_color, 0.05), 1 0 inset alpha(@theme_text_color, 0.1);
}

.scrollbar.trough.horizontal,
.scrollbar.trough.horizontal:backdrop {
   box-shadow: 0 -1 inset alpha(@theme_text_color, 0.05), 0 1 inset alpha(@theme_text_color, 0.1);
}
*/

.scrollbar.trough:insensitive {
    background-color: @scrollbar_trough_insensitive;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 3px;
}

.scrollbars-junction:backdrop,
.scrollbar.trough:backdrop {
    background-image: none;
    background-color: @scrollbar_trough_unfocused;
    border-width: 0;
    border-radius: 0;
    border-image: none;
}

.scrollbar.trough:insensitive:backdrop {
    background-image: none;
    background-color: mix(@scrollbar_trough_unfocused, @scrollbar_trough_insensitive, 0.5);
    border-width: 0;
    border-radius: 0;
    border-image: none;
}


.scrollbar.slider {
    background-image: none;
    background-color: @scrollbar_slider;
    border-radius: 20px;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 3px;
}

.scrollbar.slider:hover {
    transition: 1000ms linear; /* doesn't work */
    background-image: none;
    background-color: @scrollbar_slider_prelight;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 3px;
}

.scrollbar.slider:prelight:active {
    background-image: none;
    background-color: @scrollbar_slider_active;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 3px;
}

.scrollbar.slider:insensitive {
    background-color: @scrollbar_slider_insensitive;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 3px;
}

.scrollbar.slider:backdrop {
    background-color: @scrollbar_slider_unfocused;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 3px;
}

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

GtkTreeMenu .menuitem {
    padding: 2px;

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

GtkTreeMenu .menuitem * {
    color: @theme_text_color;
}

.menu {
    background-color: @menu_bg_color;
    color: @menu_fg_color;
    padding: 0;
    border-style: none;
}

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

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

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

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

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

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

/* this controls the general appearance of the menubar */
.menubar {
    border-style: none;
    padding: 4px;

    -GtkWidget-window-dragging: true;
    -GtkMenuBar-internal-padding: 0;
}

.menubar .menuitem {
    border-style: none;
    padding: 3px 5px;
}

/* remove the image from the prelight areas */
.menubar .menuitem:hover {
    background-image: none;
    background-color: @menu_bg_color;

    border-radius: 4px 4px 0 0;
}

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

.menu .menuitem {
    -GtkMenuItem-arrow-scaling: 0.4;
    padding: 4px;
}

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

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

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

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

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

.menuitem .accelerator:hover,
.menuitem .accelerator:active {
    color: alpha (@menu_fg_color, 0.3);
}

.menuitem.arrow {
    color: @menu_controls_color;
}

.menuitem.separator {
    color: @menu_separator;

    -GtkMenuItem-horizontal-padding: 0;
}

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

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

.menuitem.check:active {
    background-image: url("assets/menuitem-checkbox-checked.png");
}

.menuitem.check:active:hover {
    background-image: url("assets/menuitem-checkbox-checked-selected.png");
}

.menuitem.check:active:insensitive {
    background-image: url("assets/menuitem-checkbox-checked-insensitive.png");
}

.menuitem.check:inconsistent,
.menuitem.radio:inconsistent {
    background-image: url("assets/menuitem-checkbox-mixed.png");
}

.menuitem.check:inconsistent:insensitive,
.menuitem.radio:inconsistent:insensitive {
    background-image: url("assets/menuitem-checkbox-mixed-insensitive.png");
}

.menuitem.check:inconsistent:hover,
.menuitem.radio:inconsistent:hover {
    background-image: url("assets/menuitem-checkbox-mixed-selected.png");
}

.menuitem.radio:active {
    background-image: url("assets/menuitem-radio-checked.png");
}

.menuitem.radio:active:hover {
    background-image: url("assets/menuitem-radio-checked-selected.png");
}

.menuitem.radio:active:insensitive {
    background-image: url("assets/menuitem-radio-checked-insensitive.png");
}


/***************
 * Menu Button *
 ***************/
.button.menuitem.menubar:active,
.button.menuitem.menubar *: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(@borders, 1.30);
    border-style: solid;
}

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

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

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


/************
 * Toolbars *
 ************/
.toolbar {
    border-style: none;
    border-color: darker (@theme_bg_color);
/*    border-width: 1 0 1px 0; */
    padding: 4px;
}

.toolbar .button {
    padding: 1px;
}

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

/********************
 * Menubar Toolbars *
 ********************/
.toolbar.menubar {
    /*background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from(@theme_bg_color),
                                     to(shade(@theme_bg_color, 0.96)));*/
    border-style: none;

    -GtkToolbar-button-relief: normal;
    padding-left: 6px;
    padding-right: 6px;
}

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

/* applications using EggEditableToolbar usually set the primary-toolbar
 * hint on the containing vbox, so we need to handle both these cases here.
 */
.primary-toolbar .toolbar,
.primary-toolbar.toolbar {
    border-width: 1px 0 1px 0;
    border-radius: 0;
    border-style: solid;
    border-top-color: @toolbar_border_top;
    border-bottom-color: @toolbar_border_bottom;

    -GtkWidget-window-dragging: true;
    -GtkToolbar-button-relief: normal;
    box-shadow: 0 3 inset alpha(black, 0.02), 0 2 inset alpha(black, 0.02), 0 1 inset alpha(black, 0.02);
    text-shadow: @primary_toolbar_button_text_shadow 0 1;
}

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

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

.primary-toolbar .toolbar:backdrop,
.primary-toolbar.toolbar:backdrop {
    border-color: @unfocused_borders;
    box-shadow: none;
    text-shadow: none;
}

/* progressbars on primary toolbar entries are special */
.primary-toolbar .toolbar .entry.progressbar,
.primary-toolbar.toolbar .entry.progressbar {
    background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from (@trough_bg_color_a),
                                     to (@trough_bg_color_b));

    border-width: 1px;
    border-radius: 2px;
    border-style: solid;
    border-color: shade(@internal_element_color, 1.10);
    border-image: none;

    color: @theme_text_color;

    -adwaita-progressbar-pattern: none;
}

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

.inline-toolbar.toolbar {
    border-width: 1px;
    border-radius: 0;
    border-style: solid;

    -GtkToolbar-button-relief: normal;

    padding: 4px;
}

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

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

.sidebar:backdrop,
.sidebar .view:backdrop {
    background-color: @sidebar_bg_unfocused;
}

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

.sidebar .scrollbar.trough {
    background-color: shade(@sidebar_bg, 0.8);
}

.sidebar .scrollbar.trough:backdrop {
    background-color: shade(@sidebar_bg_unfocused, 0.8);
}

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

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

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

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


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

GtkAssistant .sidebar {
    padding: 12px;

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

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

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

}

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

GtkSwitch {
    font: bold condensed 10;
}

GtkScale.progressbar,
GtkSwitch.trough:active {
    color: @switch_trough_active_color;
}

GtkSwitch.trough:insensitive {
    background-image: none;
    background-color: @insensitive_bg_color;
    color: mix(@insensitive_bg_color, @insensitive_fg_color, 0.5); /* FIXME */
}

GtkSwitch.trough:backdrop {
    color: @theme_unfocused_fg_color;
}

GtkSwitch.trough:active:backdrop {
    color: @theme_unfocused_bg_color;
}

GtkSwitch.trough:insensitive:backdrop {
    color: @unfocused_insensitive_borders;
}

GtkSwitch.slider {
    border-width: 1px;
    border-radius: 2px;
    border-style: solid;
    border-color: mix (@borders, @theme_text_color, 0.4);

    /*box-shadow: 0 -1 inset alpha(@theme_base_color, 0.50);*/
    box-shadow: 0 -1 inset alpha(white, 0.9), 0 1 inset @theme_base_color, 0 2 inset alpha(@borders, 0.15);

    padding: 2px 2px 3px 2px;

    background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from (@theme_base_color),
                                     to (@switch_slider_color));

    color: shade (@switch_slider_color, 0.95);
}

.primary-toolbar GtkSwitch.slider {
    padding: 3px;
}

GtkSwitch.slider:insensitive {
    background-image: none;

    border-color: @insensitive_boder_color;

    box-shadow: none;
}

GtkSwitch.slider:insensitive {
    border-color: mix(@insensitive_bg_color, @insensitive_fg_color, 0.5);
}

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

    border-color: @unfocused_borders;

    box-shadow: none;

    color: @theme_unfocused_base_color;
}

GtkSwitch.slider:insensitive:backdrop {
    background-color: @theme_unfocused_bg_color;
    border-color: @unfocused_insensitive_borders;
}

GtkTreeView {
    -GtkTreeView-vertical-separator: 0;
    -GtkTreeView-expander-size: 17;

    -GtkWidget-focus-line-width: 1;
    -GtkWidget-focus-padding: 1;
    -adwaita-focus-border-radius: 2;
    -adwaita-focus-border-dashes: 1;
    -adwaita-focus-border-color: alpha(@theme_text_color, 0.6);
}

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

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

GtkViewport:backdrop,
GtkIconView:backdrop {
    background-color: @theme_unfocused_base_color;
}

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

    /* FIXME: this probably needs to be better;
     * see https://bugzilla.gnome.org/show_bug.cgi?id=644157
     */
    -adwaita-focus-border-color: @treeview_focus_border;
    -adwaita-focus-border-radius: 3;
    -adwaita-focus-border-dashes: 0;
}

.view,
GtkTreeView,
GtkTreeView.view {
    background-color: @theme_base_color;
    color: @theme_text_color;
    border-radius: 0;
}

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

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

.view:backdrop,
GtkTreeView:backdrop,
GtkTreeView.view:backdrop {
    background-color: @theme_unfocused_base_color;
    color: @theme_unfocused_text_color;
}

GtkIconView.view.cell:backdrop:selected,
.cell:backdrop:selected,
.view:backdrop:selected,
GtkTreeView:backdrop:selected,
GtkTreeView.view:backdrop:selected {
    background-color: @theme_unfocused_selected_bg_color;
    color: @theme_unfocused_selected_fg_color;
}

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

column-header.button,
column-header .button {
    color: @internal_element_color;
    /* I'd like to have shadows inside any white box, not possible yet */
    /* box-shadow: 0 1 inset @entry_inset, 0 2 inset alpha(@entry_inset, 0.4); */
}

column-header.button,
column-header .button,
column-header.button:insensitive,
/* column-header:insensitive .button, */
column-header .button:insensitive,
column-header.button:hover,
column-header .button:hover,
column-header.button:focus:hover,
column-header .button:focus:hover {
    background-color: @theme_base_color;
    background-image: none;
    padding: 0 4px;
    text-shadow: none;
    icon-shadow: none;
    font-weight: bold; /* Not sure about this one */
}

column-header.button:backdrop,
column-header .button:backdrop {
    background-color: @theme_unfocused_base_color;
    /* color: FIXME */
}

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

column-header.button:hover,
column-header .button:hover,
column-header.button:focus:hover,
column-header .button:focus:hover,
column-header.button:active:focus:hover,
column-header .button:active:focus:hover,
column-header.button:active:focus,
column-header .button:active:focus,
column-header.button:active:hover,
column-header .button:active:hover,
column-header.button *:active,
column-header .button *:active,
column-header.button *:active:hover,
column-header .button *:active:hover {
    color: @internal_element_prelight;
    text-shadow: none;
    icon-shadow: none;
}

row:hover {
    border-width: 0;
}

row:insensitive {
    border-width: 0;
}

row:selected:focus {
    border-width: 0;
    background-color: @theme_selected_bg_color;
}

row:selected {
    border-width: 0;
}

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

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

.expander {
    border-style: solid;
    border-width: 1px;
    border-radius: 2px;
    border-color: shade (@internal_element_color, 1.40);

    color: @internal_element_color;
    background-color: @theme_base_color;
}

.expander:active {
    border-style: solid;
    border-width: 1px;

    color: @internal_element_color;
    border-color: shade (@internal_element_color, 1.40);

    background-color: @theme_base_color;
}

.expander:hover {
    border-style: solid;
    border-width: 1px;

    color: @internal_element_color;
    border-color: shade (@internal_element_color, 1.40);

    background-color: shade (@theme_bg_color, 1.02);
}

.expander row:selected,
.expander row:selected:focus {
    border-style: solid;
    border-width: 1px;

    border-color: @expander_row_selected_color;
    color: @expander_row_selected_color;
    background-color: @theme_selected_bg_color;
}

.expander row:selected:backdrop {
    background-color: @theme_unfocused_selected_bg_color;
    color: @internal_element_color;
    border-color: @internal_element_color;
}

/* Calendars */
GtkCalendar {
    padding: 2px;
}

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

GtkCalendar.header {
    border-radius: 0;
    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;
}

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

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

/* Use different button and entry borders on infobars */
GtkInfoBar .entry,
GtkInfoBar .entry:focus,
GtkInfoBar .button,
GtkInfoBar .button:insensitive,
GtkInfoBar .button:active,
GtkInfoBar .button:focus,
GtkInfoBar .button:active:focus,
.info .entry,
.info .entry:focus,
.info .button,
.info .button:insensitive,
.info .button:active,
.info .button:focus,
.info .button:active:focus,
.warning .entry,
.warning .entry:focus,
.warning .button,
.warning .button:insensitive,
.warning .button:active,
.warning .button:focus,
.warning .button:active:focus,
.question .entry,
.question .entry:focus,
.question .button,
.question .button:insensitive,
.question .button:active,
.question .button:focus,
.question .button:active:focus,
.error .entry,
.error .entry:focus,
.error .button,
.error .button:insensitive,
.error .button:active,
.error .button:focus,
.error .button:active:focus {
    border-image: none;

    border-color: shade(@borders, 0.9);
    border-style: solid;
    border-width: 1px;
}

GtkInfoBar .entry:backdrop,
GtkInfoBar .button:backdrop,
GtkInfoBar .button:insensitive:backdrop,
GtkInfoBar .button:active:backdrop,
.info .entry:backdrop,
.info .button:backdrop,
.info .button:insensitive:backdrop,
.info .button:active:backdrop,
.warning .entry:backdrop,
.warning .button:backdrop,
.warning .button:insensitive:backdrop,
.warning .button:active:backdrop,
.question .entry:backdrop,
.question .button:backdrop,
.question .button:insensitive:backdrop,
.question .button:active:backdrop,
.error .entry:backdrop,
.error .button:backdrop,
.error .button:insensitive:backdrop,
.error .button:active:backdrop {
    border-image: none;

    border-color: @unfocused_borders;
    border-style: solid;
    border-width: 1px;
}


.info {
    text-shadow: 0 1 @info_text_shadow;
}

.warning {
    text-shadow: 0 1 @warning_text_shadow;
}

.question {
    text-shadow: 0 1 @question_text_shadow;
}

.error {
    text-shadow: 0 1 @error_text_shadow;
}

GtkInfoBar:backdrop,
.info:backdrop,
.warning:backdrop,
.question:backdrop,
.error:backdrop {
    text-shadow: none;
    background-color: @theme_base_color;
    color: @theme_unfocused_fg_color;
    border-color: @theme_unfocused_fg_color;
}

GtkInfoBar:last-child,
.info:last-child,
.warning:last-child,
.question:last-child,
.error:last-child {
    /* only apply a border on the last infobar if
     * there's more than one packed in */
    border-bottom-width: 1px;
    border-style: solid;
}

.info {
    background-color: @info_bg_color;
    color: @info_fg_color;

    border-color: darker(@info_bg_color);
}

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

    border-color: darker(@warning_bg_color);
}

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

    border-color: darker(@question_bg_color);
}

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

    border-color: darker(@error_bg_color);
}

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

/**********************
 * Fallback Mode Panel
 **********************/

.gnome-panel-menu-bar,
PanelApplet > GtkMenuBar.menubar,
PanelToplevel,
PanelWidget,
PanelAppletFrame,
PanelApplet {
    background-color: @os_chrome_bg_color;
    background-image: none;
    color: @os_chrome_fg_color;
}

ClockBox,
.gnome-panel-menu-bar,
PanelApplet > GtkMenuBar.menubar {
    font: bold;
}

.gnome-panel-menu-bar .menuitem:hover,
PanelApplet > GtkMenuBar.menubar .menuitem:hover {
    background-color: @os_chrome_selected_bg_color;
    color: @os_chrome_selected_fg_color;
}

.gnome-panel-menu-bar .menuitem *:hover,
PanelApplet > GtkMenuBar.menubar .menuitem *:hover {
    color: @os_chrome_selected_fg_color;
    text-shadow: @os_chrome_bg_color 0 1;
}

PanelApplet .button,
PanelApplet .button:hover {
    padding: 4px;

    border-image: none;
    border-width: 0;
    border-radius: 0;

    background-image: none;
    background-color: alpha(@theme_base_color, 0.0);

    color: @os_chrome_fg_color;
}

PanelApplet .button:active:hover,
PanelApplet .button:active {
    border-image: none;
    background-image: none;
    background-color: @os_chrome_selected_bg_color;
    border-width: 0;
    border-radius: 0;
}

PanelApplet *:hover {
    color: @os_chrome_selected_fg_color;
}

PanelApplet *:active,
PanelApplet *:hover:active {
    color: @os_chrome_selected_fg_color;
    text-shadow: @os_chrome_bg_color 0 1;
}

NaTrayApplet {
    -NaTrayApplet-icon-padding: 12;
    -NaTrayApplet-icon-size: 16;
}

WnckPager, WnckTasklist {
    background-color: @os_chrome_selected_bg_color;
    background-image: none;
    color: @os_chrome_fg_color;
}

GsmFailWhaleDialog {
    background-color: @os_chrome_bg_color;
    background-image: none;
    color: @os_chrome_fg_color;
}

GsmFailWhaleDialog * {
    background-color: @os_chrome_bg_color;
    background-image: none;
}
