/* Button background */
.button,
.primary-toolbar .button.raised,
.primary-toolbar .raised .button,
.primary-toolbar .button.raised:focus,
.primary-toolbar .raised .button:focus,
.primary-toolbar GtkComboBox .button,
.primary-toolbar GtkComboBox .button:focus {
    background-image: -gtk-gradient (linear,
				     left top, left bottom,
                                     from (@button_gradient_color_a),
                                     color-stop (0.2, @button_gradient_color_a),
                                     color-stop (0.8, @button_gradient_color_b),
                                     to (@button_gradient_color_b));
   background-color: transparent;
}

/* Pushed button background */
.button:active, 
.button:active:hover, 
.button:active:focus,
.button:active:hover:focus,
.toolbar .button:active,
.toolbar .button:active:hover,
.toolbar .button:active:focus,
.toolbar .button:active:hover:focus,
/*.primary-toolbar .button:active:focus, */
.trough,
.trough.highlight,
.trough row,
.trough row:hover {
    background-image: -gtk-gradient (linear,
    				     left top, left bottom,
                                     from (@button_border),
				     to (shade(@theme_bg_color, 0.95)));
    background-color: transparent; 
}

/* Primary and inline toolbars pushed button background */
.primary-toolbar .button:active,
.primary-toolbar .button:active:hover,
.primary-toolbar .button:active:focus,
.primary-toolbar .button:active:focus:hover,
.inline-toolbar .button:active,
.inline-toolbar .button:active:hover,
.inline-toolbar .button:active:focus,
.inline-toolbar .button:active:focus:hover {
    background-image: -gtk-gradient (linear,
    				     left top, left bottom,
                                     from (shade(@button_border, 0.95)),
				     to (shade(@theme_bg_color, 0.88)));
    background-color: transparent;
}

/* Flipped pushed button background for vertical progressbar through and the like */
.trough.vertical {
    background-image: -gtk-gradient (linear,
    				     left top, right top,
                                     from (@button_border),
				     to (shade(@theme_bg_color, 0.95)));
}

/* Prelit button background */
.button:hover,
.button:hover:focus,
.toolbar .button:hover,
.toolbar .button:hover:focus,
.primary-toolbar .button.raised:hover,
.primary-toolbar .button.raised:hover:focus,
.primary-toolbar .raised .button:hover,
.primary-toolbar .raised .button:hover:focus,
.primary-toolbar GtkComboBox .button:hover,
.primary-toolbar GtkComboBox .button:hover:focus {
    background-color: transparent;
    background-image: -gtk-gradient (linear,
				     left top, left bottom,
				     from (@button_hover_gradient_color_a),
				     to (@button_hover_gradient_color_b));
}

.primary-toolbar .button:hover,
.primary-toolbar .button:hover:focus {
    background-color: transparent;
    background-image: -gtk-gradient (linear,
				     left top, left bottom,
				     from (alpha (@theme_base_color, 0.0)),
				     color-stop (0.54, alpha (shade (@theme_base_color, 0.92), 0.49)),
			             to (alpha (@theme_base_color, 0.0)));
}

/* Insensitive button background */
.button:insensitive,
.primary-toolbar GtkComboBox .button:insensitive {
    background-image: none;
    background-color: @insensitive_bg_color;

    /* FIXME? - Not sure about insensitive colors
    background-image: -gtk-gradient (linear,
				     left top, left bottom,
				     from (@insensitive_bg_color),
                                     color-stop (0.4, @insensitive_bg_color),
				     to (shade (@insensitive_bg_color, 0.97)));
    */
}

/* Pushed + Insensitive button background */
.button:active:insensitive,
.primary-toolbar .button:active:insensitive,
.primary-toolbar GtkComboBox .button:active:insensitive {
    background-color: transparent;
    background-image: -gtk-gradient (linear,
				     left top, left bottom,
				     from (shade (@insensitive_bg_color, 0.95)),
                                     color-stop (0.4, @insensitive_bg_color),
				     to (@insensitive_bg_color)); 
}

/* Unfocused window button background */
.button:window-unfocused,
.primary-toolbar .button.raised:window-unfocused,
.primary-toolbar .raised .button:window-unfocused {
    background-image: none;
    background-color: @unfocused_button_background;
}

/* Unfocused window pushed button background */
.button:active:window-unfocused {
    background-image: none;
    background-color: @unfocused_borders_color;
}

/* Unfocused window insensitive button background */
.button:insensitive:window-unfocused {
    background-image: none;
    background-color: @unfocused_insensitive_bg_color;
}

.button:insensitive:active:window-unfocused {
    background-image: none;
    background-color: mix(@unfocused_insensitive_bg_color, @unfocused_borders_color, 0.5);
}

/* Entry background */
.entry,
GtkComboBox.combobox-entry .button,
GtkComboBox.combobox-entry .button:hover,
GtkComboBox.combobox-entry .button:focus,
GtkComboBox.combobox-entry .button:hover:focus,
.primary-toolbar GtkComboBox.combobox-entry .button,
.primary-toolbar GtkComboBox.combobox-entry .button:hover,
.primary-toolbar GtkComboBox.combobox-entry .button:focus
.primary-toolbar GtkComboBox.combobox-entry .button:hover:focus {
    background-image: -gtk-gradient(linear,
                                    left top, left bottom,
                                    from(@entry_background_a),
                                    color-stop(0.20, @entry_background_b),
                                    color-stop(0.85, @entry_background_c),
                                    to(@entry_background_d));
}

/* ComboboxEntry pushed button background */
.primary-toolbar GtkComboBox.combobox-entry .button:active,
.primary-toolbar GtkComboBox.combobox-entry .button:hover:active,
GtkComboBox.combobox-entry .button:active,
GtkComboBox.combobox-entry .button:hover:active,
.spinbutton .button:active,
.spinbutton .button:active:hover,
column-header.button:active,
column-header .button:active,
column-header.button:active:hover,
column-header .button:active:hover,
column-header.button:active:hover:focus,
column-header .button:active:hover:focus,
column-header.button:active:focus,
column-header .button:active:focus {
    background-color: transparent;
    background-image: -gtk-gradient(linear,
                                    left top, left bottom,
                                    from(shade(@entry_background_a, 0.9)),
                                    to(@entry_background_d));
}

/* Insensitive entry background */
.entry:insensitive,
GtkComboBox.combobox-entry .button:insensitive {
    background-color: @insensitive_bg_color;
    background-image: none;
}

/* Unfocused windows entry background */
.entry:window-unfocused,
GtkComboBox.combobox-entry .button:window-unfocused,
column-header.button:window-unfocused,
column-header .button:window-unfocused,
column-header.button:insensitive:window-unfocused,
column-header .button:insensitive:window-unfocused {
    background-image: none;
    background-color: @theme_unfocused_base_color;
}

/* Unfocused windows insensitive entry background */
.entry:insensitive:window-unfocused,
GtkComboBox.combobox-entry .button:insensitive:window-unfocused {
    background-image: none;
    background-color: @unfocused_insensitive_bg_color;
}


/* Primary and inline toolbars background */
.primary-toolbar .toolbar,
.primary-toolbar.toolbar,
.inline-toolbar.toolbar  {
    background-color: transparent;
    background-image: -gtk-gradient (linear,
				     left top,
				     left bottom,
				     from (@toolbar_gradient_base),
				     color-stop (0.16, @toolbar_gradient_step1),
				     color-stop (0.90, @toolbar_gradient_step2),
				     to (@toolbar_gradient_final));
}

/* Unfocused window primary and inline toolbars background */
.primary-toolbar .toolbar:window-unfocused,
.primary-toolbar.toolbar:window-unfocused,
.inline-toolbar.toolbar:window-unfocused  {
    background-image: none;
    background-color: @unfocused_toolbar;
}

/* Active switch background*/
GtkSwitch.trough:active,
GtkScale.progressbar {
    background-color: transparent;
    background-image: -gtk-gradient (linear,
                                     left top, left bottom,
                                     from (@switch_trough_active_bg_a),
                                     to (@switch_trough_active_bg_b));
}

GtkSwitch.trough:window-unfocused {
    background-color: @theme_unfocused_bg_color; /* FIXME */
    background-image: none;
}

GtkSwitch.trough:active:window-unfocused {
    background-color: @unfocused_borders_color;
    background-image: none;
}

GtkScale.progressbar.vertical {
    background-color: transparent;
    background-image: -gtk-gradient (linear,
                                     left top, right top,
                                     from (@switch_trough_active_bg_a),
                                     to (@switch_trough_active_bg_b));
}
