* {
    engine: adwaita;
    padding: 1;

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

/***************
 * 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: 4;
    border-style: none;
    border-radius: 5;

    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 *
 *****************/
.grip {
    background-color: shade (@inactive_frame_color, 0.93);
}

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

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

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

.dnd {
    border-width: 1;
    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;
}

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

    /* we use inner-border instead of padding because padding
     * also applies to the progressbar.
     */
    padding: 0;

    -GtkEntry-inner-border: 5;
    -GtkEntry-progress-border: 0;

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

    color: @entry_text_color;
}

.entry:focus {
    box-shadow: 1 1 inset alpha(@theme_selected_bg_color, 0.2), -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:backdrop {
    color: @theme_unfocused_text_color;
}

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

.entry:selected:backdrop {
    color: @theme_unfocused_selected_fg_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: 2 6;
    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: 2 0 0 2;
    box-shadow: none;
}

.spinbutton .button:last-child {
    border-radius: 0 2 2 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);
}


/****************
 * 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: 3;
    border-width: 1;
    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: @theme_unfocused_selected_bg_color;
    border-color: @theme_unfocused_selected_bg_color;
    box-shadow: none;
    -adwaita-progressbar-pattern: none;
}

/* through component */
GtkProgressBar,
.trough row {
    padding: 0 0 1 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: 1;
    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: 2;
    border-width: 0;
    background-color: @theme_base_color;
}

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

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

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

.button {
    -GtkButton-child-displacement-x: 0;
    -GtkButton-child-displacement-y: 1;
    -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: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: 2;
    border-color: transparent;

    text-shadow: @primary_toolbar_button_text_shadow 0 1;
}

.button *:active {
    color: @button_active_text; /* Not sure about this one */
    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;
}

.primary-toolbar .button *:insensitive:backdrop {
    color: mix(@unfocused_insensitive_bg_color, @unfocused_dark_bg, 0.65); /* FIXME */
}

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

.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 .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 .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 .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 .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: 1;
    border-left-width: 1;
    border-image-width: 3 3 4 3;
    border-radius: 3;
}

/* 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 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 {
    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 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 {
    border-left-width: 2;
    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 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 {
    border-left-width: 0;
    border-right-width: 2;
    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 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 {
    border-right-width: 2;
    border-left-width: 2;
    border-image-width: 4;
    border-radius: 3;
}

GtkLinkButton * {
    text-shadow: none;
}

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

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

    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: 3;
    background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from (@notebook_tab_hilight),
                                     color-stop (0.15, @notebook_tab_hilight),
                                     color-stop (0.15, @notebook_tab_gradient_a),
                                     to (@notebook_tab_gradient_b));

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

/* workaround */
.notebook tab.bottom {
    padding: 3;
    background-image: -gtk-gradient (linear,
                                     left bottom, left top,
                                     from (@notebook_tab_gradient_a),
                                     to (@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));

    -adwaita-selected-tab-color: @notebook_selected_tab_color;
    background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from (@button_gradient_color_a),
                                     to (@theme_base_color));
}

.notebook tab:active:backdrop {
    /* FIXME I need to set a background-image here, background-color is ignored */
    background-image: -gtk-gradient (linear, 
                                             left top, left bottom,
                                             from (@theme_unfocused_base_color),
                                             to (@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.left:active:backdrop,
.notebook tab.right:active:backdrop {
    -adwaita-selected-tab-color: alpha(@theme_base_color, 0.0);
}

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

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

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

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

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

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

.notebook tab.left:active {
    padding: 3 3 3 5;
    border-width: 1;
}

.notebook tab.right {
    border-radius: 0 3 3 0;
}

.notebook tab.right:active {
    padding: 3 5 3 3;
}

.notebook tab .button,
.notebook tab .button:hover,
.notebook tab .button:hover:active {
    padding: 1;

    border-style: none;
    border-image: none;
    background-color: transparent;
    background-image: none;
}

/**************
 * ComboBoxes *
 **************/
GtkComboBox {
    padding: 0;
    padding-right: 6;
    -GtkWidget-focus-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.combobox-entry {
    padding-right: 0; /* does it work for rtl? */
}

GtkComboBox *:insensitive {
    text-shadow: none;
}

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

GtkComboBox.combobox-entry .button:first-child {
    padding-right: 5;
}

GtkComboBox.combobox-entry .button:last-child {
    padding-left: 5;
}


GtkComboBox.combobox-entry .entry:first-child,
GtkComboBox.combobox-entry .button:first-child {
    border-image-width: 3 0 4 3;
    border-radius: 3 0 0 3;
    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 3 3 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: 3 0 0 3;
    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 3 3 0;
    border-left-width: 0;
}

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: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 *:active,
GtkComboBox.combobox-entry .button *:active:hover {
    color: @theme_text_color;
}

GtkComboBox .button {
    padding-right: 0;
    padding-bottom: 1;
    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;
}

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

.scrollbar.trough.vertical,
.scrollbar.trough.vertical:backdrop {
    /* FIXME: disable until we have have an extra px padded towards the border. It feels uncentered now.
       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: 3;
}

.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: 20;
    border-style: solid;
    border-image: none;
    border-color: transparent;
    border-width: 3;
}

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

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

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

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

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

GtkTreeMenu .menuitem {
    padding: 2;

    border-style: solid;
    border-width: 1 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: 4;

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

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

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

    border-radius: 4 4 0 0;
}

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

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

.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/checkbox-menuitem-checked.svg");
}

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

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

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

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

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

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

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

.menuitem.radio:inconsistent {
    background-image: url("assets/radio-menuitem-mixed.svg");
}

.menuitem.radio:inconsistent:insensitive {
    background-image: url("assets/radio-menuitem-mixed-insensitive.svg");
}

/***************
 * Menu Button *
 ***************/
.button.menuitem.menubar:active,
.button.menuitem.menubar *:active {
    color: @theme_text_color;
    background-image: none;
    background-color: @menu_bg_color;

    border-radius: 5 5 0 0;
    border-image: none;
    border-width: 1 1 0 1;
    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 1 0; */
    padding: 4;
}

.toolbar .button {
    padding: 1;
}

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

/********************
 * 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: 1 0 1 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);
}

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

.primary-toolbar .toolbar:backdrop,
.primary-toolbar.toolbar:backdrop {
    border-color: @unfocused_borders;
    box-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: 1;
    border-radius: 2;
    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: 1;
    border-radius: 0;
    border-style: solid;

    -GtkToolbar-button-relief: normal;

    padding: 4;
}

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

/***********
 * 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: 100;
    border-style: solid;
    border-width: 2;
    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: 12;

    border-width: 1;
    border-radius: 2;
    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: 1;
    border-radius: 2;
    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: 2 2 3 2;

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

    color: shade (@switch_slider_color, 0.95);
}

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

GtkViewport,
GtkIconView {
    border-radius: 3;
    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;
    border-radius: 4;

    /* 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 {
    background-color: @theme_base_color;
    color: @theme_text_color;
    border-radius: 0;
}

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

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: mix(@theme_selected_fg_color, @theme_selected_bg_color, 0.30);

    background-color: @theme_base_color;
}

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

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

/*column-header {
    padding: 0 4;
}*/

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 4;
    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;
/*    background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from (@theme_selected_bg_color),
                                     to (@theme_selected_bg_color)); */
}

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

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

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

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

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

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

    background-color: @theme_base_color;
}

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

    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: 1;

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

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

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

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: 1;
}

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: 1;
}

GtkInfoBar,
.info,
.warning,
.question,
.error {
    text-shadow: 0 1 alpha(black, 0.15);
}

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: 1;
    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 {
    color: mix (@theme_fg_color, @theme_bg_color, 0.50);
}

.dim-label:focus,
.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: 4;

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