/* NOTES to contributors:
 * use 4 spaces indents, and keep code ALIGNED and ORDERED */

/* default */
* {
    -GtkArrow-arrow-scaling: 0.6;
    -GtkButton-child-displacement-x: 0;
    -GtkButton-child-displacement-y: 0;
    -GtkButton-default-border: 0;
    -GtkButton-image-spacing: 0;
    -GtkButton-inner-border: 1;
    -GtkButton-interior-focus: true;
    -GtkButtonBox-child-min-height: 24;
    -GtkButtonBox-child-internal-pad-y: 1;
    -GtkCheckButton-indicator-size: 15;
    -GtkCheckMenuItem-indicator-size: 14;
    -GtkExpander-expander-size: 12;
    -GtkHTML-link-color: @link_color;
    -GtkIMHtml-hyperlink-color: @link_color;
    -GtkMenu-horizontal-padding: 0;
    -GtkMenu-vertical-padding: 0;
    -GtkNotebook-initial-gap: 0;
    -GtkNotebook-tab-overlap: -2;
    -GtkPaned-handle-size: 3;
    -GtkProgressBar-min-horizontal-bar-height: 10;
    -GtkProgressBar-min-vertical-bar-width: 10;
    -GtkRange-slider-width: 9;
    -GtkRange-stepper-spacing: 0;
    -GtkRange-trough-border: 3;
    -GtkRange-trough-under-steppers: 1;
    -GtkScrollbar-has-backward-stepper: false;
    -GtkScrollbar-has-forward-stepper: false;
    -GtkScrollbar-min-slider-length: 50;
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 1;
    -GtkStatusbar-shadow-type: none;
    -GtkTextView-error-underline-color: @error_color;
    -GtkToolButton-icon-spacing: 6;
    -GtkToolItemGroup-expander-size: 11;
    -GtkTreeView-expander-size: 11;
    -GtkWidget-focus-line-width: 1;
    -GtkWidget-focus-padding: 0;
    -GtkWidget-link-color: @link_color;
    -GtkWidget-visited-link-color: @link_color;
    -GtkWindow-resize-grip-height: 13;
    -GtkWindow-resize-grip-width: 13;
    -WnckTasklist-fade-overlay-rect: 0;

    background-clip: padding-box;

    outline-color: alpha(@theme_fg_color, 0.3);
    outline-style: dashed;
    outline-offset: 2px;
}

/***************
 * base states *
 ***************/
.background {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}

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

*:insensitive,
*:insensitive:insensitive {
    color: mix(@theme_fg_color, @theme_bg_color, 0.4);
}

/* apply effects to insensitive and prelit images */
*:insensitive {
    -gtk-image-effect: dim;
}

*:hover {
    -gtk-image-effect: highlight;
}

*:link,
*:visited {
    color: @link_color;
}

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

.gtkstyle-fallback:prelight {
    background-color: shade(@theme_bg_color, 1.1);
    color: @theme_fg_color;
}

.gtkstyle-fallback:active {
    background-color: shade(@theme_bg_color, 0.9);
    color: @theme_fg_color;
}

.gtkstyle-fallback:insensitive {
    background-color: shade(shade(@theme_bg_color, 0.95), 1.05);
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

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

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

/******************
 * visual effects *
 ******************/
/* transitions */
.button {
    transition: none;
}

.entry {
    transition: all 150ms ease-out;
}

.entry:focus {
    transition: all 150ms ease-in;
}

.notebook tab GtkLabel,
.notebook .prelight-page,
.notebook .prelight-page GtkLabel,
.notebook .active-page,
.notebook .active-page GtkLabel {
    transition: all 200ms ease-in;
}

/* inset shadows */
.button,
.primary-toolbar .raised .button,
.primary-toolbar .raised.button,
.toolbar .button,
.header-bar .button,
GtkSwitch.slider {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.4),
                inset -1px 0 alpha(@light_shadow, 0.4);
}

.button.default {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.2),
                inset -1px 0 alpha(@light_shadow, 0.2);
}

.button:active,
.primary-toolbar .button:active,
.toolbar .button:active,
.header-bar .button:active,
.button:checked,
.primary-toolbar .button:checked,
.toolbar .button:checked,
.header-bar .button:checked {
    box-shadow: inset 1px 1px alpha(@dark_shadow, 0.06),
                inset -1px -1px alpha(@dark_shadow, 0.06);
}

.button:insensitive,
.primary-toolbar .raised .button:insensitive,
.primary-toolbar .raised.button:insensitive,
.toolbar .button:insensitive,
.header-bar .button:insensitive,
GtkSwitch.slider:insensitive {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.2),
                inset -1px 0 alpha(@light_shadow, 0.2);
}

.entry {
    box-shadow: inset 1px 1px alpha(@dark_shadow, 0.1);
}

/* disable inset shadow */
.primary-toolbar GtkComboBox,
.primary-toolbar .button *,
.primary-toolbar .button,
.notebook tab .button,
column-header .button,
GtkCalendar.button {
    box-shadow: none;
}

/*************
 * assistant *
 *************/
GtkAssistant .sidebar .highlight {
    font: bold;
}

GtkAssistant .sidebar {
    padding: 2px;
    border-width: 0 1px 0 0;
    border-style: solid;
    border-right-color: shade(@theme_bg_color, 0.7);
    border-radius: 0;
    background-color: mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1);
    color: mix(@theme_text_color, @theme_base_color, 0.3);
}

/**********
 * button *
 **********/
.button {
    -GtkWidget-focus-padding: 1;
    -GtkWidget-focus-line-width: 0;

    padding: 2px 4px;
    border-width: 1px;
    border-radius: 3px;
    border-style: solid;
    border-top-color: shade(@theme_bg_color, 0.8);
    border-right-color: shade(@theme_bg_color, 0.72);
    border-left-color: shade(@theme_bg_color, 0.72);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.05),
                                      shade(shade(@theme_bg_color, 1.02), 0.97)
                                      );

    color: @theme_fg_color;
}

.button:hover {
    border-top-color: shade(@theme_bg_color, 0.85);
    border-right-color: shade(@theme_bg_color, 0.78);
    border-left-color: shade(@theme_bg_color, 0.78);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

.button:active,
.button:checked {
    border-color: shade(@theme_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.85), 1.05),
                                      shade(shade(@theme_bg_color, 0.85), 0.97)
                                      );
}

.button:active:hover,
.button:checked:hover {
    border-top-color: shade(@theme_bg_color, 0.85);
    border-right-color: shade(@theme_bg_color, 0.78);
    border-left-color: shade(@theme_bg_color, 0.78);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

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

.button:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.95), 1.05),
                                      shade(shade(@theme_bg_color, 0.95), 0.97)
                                      );
}

.button:active:insensitive,
.button:checked:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.95), 1.05),
                                      shade(shade(@theme_bg_color, 0.95), 0.97)
                                      );
}

/* default button */
.button.default {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(alpha(@theme_selected_bg_color, 0.7), 1.05),
                                      shade(alpha(@theme_selected_bg_color, 0.7), 0.97)
                                      );
}

.button.default:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 1.05),
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 0.97)
                                      );
}

.button.default:active,
.button.default:checked {
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(alpha(@theme_selected_bg_color, 0.7), 1.05),
                                      shade(alpha(@theme_selected_bg_color, 0.7), 0.97)
                                      );
}

.button.default:active:hover,
.button.default:checked:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 1.05),
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 0.97)
                                      );
}

.button.flat,
.button.flat:insensitive,
.header-bar .button.flat,
.header-bar .button.flat:insensitive {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
}

/****************
 * cell and row *
 ****************/
.cell {
    border-width: 0;
    border-radius: 0;
}

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

row:selected,
row:selected:hover,
row:selected:focus {
    -GtkWidget-focus-padding: 1;
    -GtkWidget-focus-line-width: 0;

    border-width: 1px 0;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.2),
                                      shade(@theme_selected_bg_color, 1.0)
                                      );

    color: @theme_selected_fg_color;
}

/*****************
 * column-header *
 *****************/
column-header .button,
column-header .button:active,
column-header .button:checked {
    border-width: 0 1px 1px 0;
    border-radius: 0;
}

column-header .button,
column-header .button:active,
column-header .button:checked,
column-header .button:focus,
column-header .button:active:focus,
column-header .button:checked:focus {
    border-color: shade(@theme_bg_color, 0.97);
    border-bottom-color: shade(@theme_bg_color, 0.9);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.14), 0.98),
                                      shade(shade(@theme_bg_color, 1.14), 1.35)
                                      );
}

column-header .button:hover,
column-header .button:active:hover,
column-header .button:checked:hover,
column-header .button:hover:focus,
column-header .button:active:hover:focus,
column-header .button:checked:hover:focus {
    border-color: shade(@theme_bg_color, 0.97);
    border-bottom-color: shade(@theme_bg_color, 0.9);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.98), 0.98),
                                      shade(shade(@theme_bg_color, 0.98), 1.35)
                                      );
}

column-header:last-child .button {
    border-width: 0 0 1px 0;
}

/****************
 * content view *
 ****************/
.content-view.view {
    background-color: @theme_base_color;
}

.content-view.view:prelight {
    background-color: alpha(@theme_selected_bg_color, 0.6);
}

.content-view.view:selected,
.content-view.view:active {
    background-color: @theme_selected_bg_color;
}

.content-view.view:insensitive {
    background-color: shade(@theme_base_color, 0.9);
}

GdMainIconView.content-view {
    -GdMainIconView-icon-size: 40;
}

GtkIconView.content-view.check {
    background-color: transparent;
}

GtkIconView.content-view.check:active {
    background-color: transparent;
}

.content-view.view.check,
.content-view.view.check:active {
    background-color: transparent;
}

GtkIconView.content-view.check:prelight,
GtkIconView.content-view.check:insensitive,
GtkIconView.content-view.check:selected {
    background-color: transparent;
}

/****************
 * drawing area *
 ****************/
GtkDrawingArea {
    background-color: transparent;
}

GtkDrawingArea:insensitive {
    background-color: shade(@theme_base_color, 0.9);
}

/***********
 * gtkhtml *
 ***********/
GtkHTML {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

/***********
* calendar *
************/
GtkCalendar {
    padding: 0;
}

GtkCalendar:inconsistent {
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

GtkCalendar.view {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.8);
    border-radius: 0;
    background-color: @theme_base_color;
    background-image: none;
}

GtkCalendar.header {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.8);
    border-radius: 0;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.05),
                                      shade(shade(@theme_bg_color, 1.02), 0.97)
                                      );
}

GtkCalendar.button,
GtkCalendar.button:hover,
GtkCalendar.button:insensitive {
    border-width: 0;
    background-color: transparent;
    background-image: none;
}

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

/******************
 * combobox entry *
 ******************/
.primary-toolbar GtkComboBox.combobox-entry .entry,
.primary-toolbar GtkComboBox.combobox-entry .entry:active,
.primary-toolbar GtkComboBox.combobox-entry .entry:focus,
.primary-toolbar GtkComboBox.combobox-entry .entry:insensitive,
GtkComboBox.combobox-entry .entry,
GtkComboBox.combobox-entry .entry:active,
GtkComboBox.combobox-entry .entry:focus,
GtkComboBox.combobox-entry .entry:insensitive {
    border-width: 1px 0 1px 1px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.primary-toolbar GtkComboBox.combobox-entry .button,
.primary-toolbar GtkComboBox.combobox-entry .button:hover,
.primary-toolbar GtkComboBox.combobox-entry .button:active,
.primary-toolbar GtkComboBox.combobox-entry .button:checked,
.primary-toolbar GtkComboBox.combobox-entry .button:insensitive,
GtkComboBox.combobox-entry .button,
GtkComboBox.combobox-entry .button:hover,
GtkComboBox.combobox-entry .button:active,
GtkComboBox.combobox-entry .button:checked,
GtkComboBox.combobox-entry .button:insensitive {
    border-width: 1px 1px 1px 1px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/*********
 * entry *
 *********/
.entry {
    padding: 3px;
    border-width: 1px;
    border-style: solid;
    border-top-color: shade(@theme_bg_color, 0.6);
    border-right-color: shade(@theme_bg_color, 0.7);
    border-left-color: shade(@theme_bg_color, 0.7);
    border-bottom-color: shade(@theme_bg_color, 0.72);
    border-radius: 3px;
    background-color: @theme_base_color;
    background-image: linear-gradient(to bottom,
                                      shade(@theme_base_color, 0.99),
                                      @theme_base_color
                                      );

    color: @theme_text_color;
}

.entry:active,
.entry:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-color: @theme_base_color;
}

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

.entry:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
    background-color: alpha(@theme_base_color, 0.6);
    background-image: none;
    color: mix(@theme_text_color, @theme_base_color, 0.4);
}

.entry.progressbar {
    border-width: 0;
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.15),
                                      shade(@theme_selected_bg_color, 0.95)
                                      );

    color: @theme_selected_fg_color;
}

/************
 * expander *
 ************/
.expander {
    color: alpha(currentColor, 0.7);
}

.expander:hover {
    color: alpha(currentColor, 0.8);
}

.expander:active {
    color: alpha(currentColor, 0.9);
}

/**************
 * list boxes *
 **************/
.list {
    background-image: none;
    background-color: transparent;
}

.list-row {
    border: none;
    border-radius: 0;
    padding: 3px;
    background-image: none;
    background-color: shade(@theme_bg_color, 1.15);
}

.list-row:hover {
    background-image: none;
    background-color: shade(@theme_bg_color, 1.08);
}

.list-row:selected {
    background-image: none;
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/*********
 * frame *
*********/
.frame {
    border: 1px solid shade(@theme_bg_color, 0.7);
    border-radius: 0;
}

.frame.flat {
    border: none;
    box-shadow: none;
}

/*******************
 * scrolled window *
 *******************/
GtkScrolledWindow.frame {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 0;
}

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

/************
 * iconview *
 ************/
GtkIconView.view.cell:selected,
GtkIconView.view.cell:selected:focus {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.2),
                                      shade(@theme_selected_bg_color, 1.0)
                                      );

    color: @theme_selected_fg_color;
}

.content-view.view.rubberband,
.view.rubberband,
.rubberband {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 0;
    background-color: alpha(@theme_selected_bg_color, 0.3);
}

/***********
 * infobar *
 ***********/
GtkInfoBar {
    border-width: 0;
    border-style: none;
}

.info {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@info_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@info_bg_color, 1.1),
                                      shade(@info_bg_color, 1.0)
                                      );

    color: @info_fg_color;
}

.info .button {
    border-top-color: shade(@info_bg_color, 0.8);
    border-right-color: shade(@info_bg_color, 0.72);
    border-left-color: shade(@info_bg_color, 0.72);
    border-bottom-color: shade(@info_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@info_bg_color, 1.02), 1.05),
                                      shade(shade(@info_bg_color, 1.02), 0.97)
                                      );

    color: @info_fg_color;
}

.info .button:hover {
    border-top-color: shade(@info_bg_color, 0.85);
    border-right-color: shade(@info_bg_color, 0.78);
    border-left-color: shade(@info_bg_color, 0.78);
    border-bottom-color: shade(@info_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@info_bg_color, 1.15),
                                      shade(@info_bg_color, 1.07)
                                      );
}

.info .button:active,
.info .button:checked {
    border-color: shade(@info_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@info_bg_color, 0.85), 1.05),
                                      shade(shade(@info_bg_color, 0.85), 0.97)
                                      );
}

.info .button:active:hover,
.info .button:checked:hover {
    border-top-color: shade(@info_bg_color, 0.85);
    border-right-color: shade(@info_bg_color, 0.78);
    border-left-color: shade(@info_bg_color, 0.78);
    border-bottom-color: shade(@info_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@info_bg_color, 1.15),
                                      shade(@info_bg_color, 1.07)
                                      );
}

.info .button.close {
    color: @info_fg_color;
}

.info .button.close:hover {
    background-image: linear-gradient(to bottom,
                                      alpha(white, 0.3),
                                      alpha(white, 0.2) 30%,
                                      alpha(black, 0.02));
}

.info .button.close:active {
    color: @info_fg_color;
    background-image: linear-gradient(to bottom,
                                      alpha(black, 0.1),
                                      transparent);
}

.warning {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@warning_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@warning_bg_color, 1.1),
                                      shade(@warning_bg_color, 1.0)
                                      );

    color: @warning_fg_color;
}

.warning .button {
    border-top-color: shade(@warning_bg_color, 0.8);
    border-right-color: shade(@warning_bg_color, 0.72);
    border-left-color: shade(@warning_bg_color, 0.72);
    border-bottom-color: shade(@warning_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@warning_bg_color, 1.02), 1.05),
                                      shade(shade(@warning_bg_color, 1.02), 0.97)
                                      );

    color: @warning_fg_color;
}

.warning .button:hover {
    border-top-color: shade(@warning_bg_color, 0.85);
    border-right-color: shade(@warning_bg_color, 0.78);
    border-left-color: shade(@warning_bg_color, 0.78);
    border-bottom-color: shade(@warning_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@warning_bg_color, 1.15),
                                      shade(@warning_bg_color, 1.07)
                                      );
}

.warning .button:active,
.warning .button:checked {
    border-color: shade(@warning_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@warning_bg_color, 0.85), 1.05),
                                      shade(shade(@warning_bg_color, 0.85), 0.97)
                                      );
}

.warning .button:active:hover,
.warning .button:checked:hover {
    border-top-color: shade(@warning_bg_color, 0.85);
    border-right-color: shade(@warning_bg_color, 0.78);
    border-left-color: shade(@warning_bg_color, 0.78);
    border-bottom-color: shade(@warning_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@warning_bg_color, 1.15),
                                      shade(@warning_bg_color, 1.07)
                                      );
}

.warning .button.close {
    color: @warning_fg_color;
}

.warning .button.close:hover {
    background-image: linear-gradient(to bottom,
                                      alpha(white, 0.3),
                                      alpha(white, 0.2) 30%,
                                      alpha(black, 0.02));
}

.warning .button.close:active {
    color: @warning_fg_color;
    background-image: linear-gradient(to bottom,
                                      alpha(black, 0.1),
                                      transparent);
}

.question {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@question_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@question_bg_color, 1.1),
                                      shade(@question_bg_color, 1.0)
                                      );

    color: @question_fg_color;
}

.question .button {
    border-top-color: shade(@question_bg_color, 0.8);
    border-right-color: shade(@question_bg_color, 0.72);
    border-left-color: shade(@question_bg_color, 0.72);
    border-bottom-color: shade(@question_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@question_bg_color, 1.02), 1.05),
                                      shade(shade(@question_bg_color, 1.02), 0.97)
                                      );

    color: @question_fg_color;
}

.question .button:hover {
    border-top-color: shade(@question_bg_color, 0.85);
    border-right-color: shade(@question_bg_color, 0.78);
    border-left-color: shade(@question_bg_color, 0.78);
    border-bottom-color: shade(@question_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@question_bg_color, 1.15),
                                      shade(@question_bg_color, 1.07)
                                      );
}

.question .button:active,
.question .button:checked {
    border-color: shade(@question_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@question_bg_color, 0.85), 1.05),
                                      shade(shade(@question_bg_color, 0.85), 0.97)
                                      );
}

.question .button:active:hover,
.question .button:checked:hover {
    border-top-color: shade(@question_bg_color, 0.85);
    border-right-color: shade(@question_bg_color, 0.78);
    border-left-color: shade(@question_bg_color, 0.78);
    border-bottom-color: shade(@question_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@question_bg_color, 1.15),
                                      shade(@question_bg_color, 1.07)
                                      );
}

.question .button.close {
    color: @question_fg_color;
}

.question .button.close:hover {
    background-image: linear-gradient(to bottom,
                                      alpha(white, 0.3),
                                      alpha(white, 0.2) 30%,
                                      alpha(black, 0.02));
}

.question .button.close:active {
    color: @question_fg_color;
    background-image: linear-gradient(to bottom,
                                      alpha(black, 0.1),
                                      transparent);
}

.error {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@error_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@error_bg_color, 1.1),
                                      shade(@error_bg_color, 1.0)
                                      );

    color: @error_fg_color;
}

.error .button {
    border-top-color: shade(@error_bg_color, 0.8);
    border-right-color: shade(@error_bg_color, 0.72);
    border-left-color: shade(@error_bg_color, 0.72);
    border-bottom-color: shade(@error_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@error_bg_color, 1.02), 1.05),
                                      shade(shade(@error_bg_color, 1.02), 0.97)
                                      );

    color: @error_fg_color;
}

.error .button:hover {
    border-top-color: shade(@error_bg_color, 0.85);
    border-right-color: shade(@error_bg_color, 0.78);
    border-left-color: shade(@error_bg_color, 0.78);
    border-bottom-color: shade(@error_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@error_bg_color, 1.15),
                                      shade(@error_bg_color, 1.07)
                                      );
}

.error .button:active,
.error .button:checked {
    border-color: shade(@error_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@error_bg_color, 0.85), 1.05),
                                      shade(shade(@error_bg_color, 0.85), 0.97)
                                      );
}

.error .button:active:hover,
.error .button:checked:hover {
    border-top-color: shade(@error_bg_color, 0.85);
    border-right-color: shade(@error_bg_color, 0.78);
    border-left-color: shade(@error_bg_color, 0.78);
    border-bottom-color: shade(@error_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@error_bg_color, 1.15),
                                      shade(@error_bg_color, 1.07)
                                      );
}

.error .button.close {
    color: @error_fg_color;
}

.error .button.close:hover {
    background-image: linear-gradient(to bottom,
                                      alpha(white, 0.3),
                                      alpha(white, 0.2) 30%,
                                      alpha(black, 0.02));
}

.error .button.close:active {
    color: @error_fg_color;
    background-image: linear-gradient(to bottom,
                                      alpha(black, 0.1),
                                      transparent);
}

/*******************
 * symbolic images *
 *******************/
.image {
    color: alpha(currentColor, 0.5);
}

.image:hover {
    color: alpha(currentColor, 0.9);
}

.image:selected,
.image:selected:hover {
    color: @theme_selected_fg_color;
}

.view.image,
.view.image:hover {
    color: alpha(currentColor, 0.9);
}

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

/*****************
 * miscellaneous *
 *****************/
.floating-bar {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.1),
                                      shade(@theme_bg_color, 0.9)
                                      );

    color: @theme_fg_color;
}

.floating-bar.top {
    border-top-width: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.floating-bar.right {
    border-right-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.floating-bar.bottom {
    border-bottom-width: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.floating-bar.left {
    border-left-width: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.floating-bar .button {
    -GtkButton-image-spacing: 0;
    -GtkButton-inner-border: 0;

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

.view.dim-label,
.dim-label {
    color: alpha(currentColor, 0.5);
}

.dnd {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
}

.grip {
    background-color: transparent;
}

.arrow {
    color: alpha(currentColor, 0.7);
}

/********
 * menu *
 ********/
GtkTreeMenu.menu,
GtkMenuToolButton.menu,
GtkComboBox .menu {
    background-color: @menu_bg_color;
}

.primary-toolbar .menu,
.primary-toolbar .button .menu,
.toolbar .menu,
.toolbar .primary-toolbar .menu,
.header-bar .menu,
.header-bar .primary-toolbar .menu,
.menu {
    padding: 0;
    border-radius: 0;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@menu_bg_color, 0.7);
    background-color: @menu_bg_color;
    color: @menu_fg_color;
}

/* Hover-effect on play-button in ubuntu soundmenu */
.menu:selected {
    background-color: shade(@selected_bg_color, 0.95);
}

.menu.button:hover,
.menu.button:active,
.menu.button:checked,
.menu.button:active:insensitive,
.menu.button:checked:insensitive,
.menu.button:insensitive,
.menu.button {
    border-width: 0;
    background-color: @menu_bg_color;
    background-image: none;
}

.context-menu {
    font: initial;
}

/* ubuntu software center menu */
#toolbar-popup {
    background-color: @menu_bg_color;
    color: @menu_fg_color;
}

/***********
 * menubar *
 ***********/
.menubar {
    -GtkWidget-window-dragging: true;

    border-style: none;
    background-color: @menubar_bg_color;
    background-image: none;
    color: @menubar_fg_color;
}

/***************
 * menubaritem *
 ***************/
.menubar.menuitem,
.menubar .menuitem {
    padding: 3px 8px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    color: @menubar_fg_color;
}

.menubar.menuitem:hover,
.menubar .menuitem:hover {
    border-color: shade(@theme_selected_bg_color, 1.1);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.14),
                                      shade(@theme_selected_bg_color, 0.95)
                                      );

    color: @theme_selected_fg_color;
}

.menubar .menuitem *:hover {
    color: shade(@selected_bg_color, 0.95);
}

/************
 * menuitem *
 ************/
GtkTreeMenu .menuitem {
    padding: 0;
    border-width: 0;
}

.menuitem,
.menu .menuitem {
    -GtkMenuItem-arrow-scaling: 0.5;

    padding: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 0;
    background-color: transparent;
    background-image: none;
    color: @menu_fg_color;
}

.menu .menuitem:active,
.menu .menuitem:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.14),
                                      shade(@theme_selected_bg_color, 0.95)
                                      );
}

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

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

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

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

.menuitem GtkCalendar:inconsistent {
    color: mix(@menu_fg_color, @menu_bg_color, 0.5);
}

.menuitem GtkCalendar.button {
    border-style: none;
    background-color: transparent;
    background-image: none;
}

.menuitem .entry {
    border-color: shade(@menu_bg_color, 0.7);
    background-color: @menu_bg_color;
    background-image: none;
    color: @menu_fg_color;
}

.menuitem .entry:active,
.menuitem .entry:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

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

.menuitem .accelerator:hover {
    color: alpha(@theme_selected_fg_color, 0.8);
}

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

GtkModelMenuItem GtkBox GtkImage {
    padding-right: 4px;
}

/************
 * popovers *
 ************/
GtkPopover {
    margin: 10px;
    padding: 2px;
    border-radius: 3px;
    border-color: shade(@menu_bg_color, 0.8);
    border-width: 1px;
    border-style: solid;
    background-clip: border-box;
    background-image: none;
    background-color: @menu_bg_color;
    color: @menu_fg_color;
    box-shadow: 0 2px 3px alpha(black, 0.5);
}

GtkPopover.background {
    background-image: none;
    background-color: @menu_bg_color;
}

GtkPopover:backdrop {
    box-shadow: none;
}

GtkPopover.osd {
    box-shadow: 0 2px 7px 3px alpha(black, 0.5);
}

GtkPopover > .list,
GtkPopover > .view,
GtkPopover > .toolbar {
    background-image: none;
    background-color: transparent;
}

GtkPopover .list-row {
    color: @menu_fg_color;
}

GtkPopover .list-row:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.2),
                                      shade(@theme_selected_bg_color, 1.0)
                                      );
    color: @theme_selected_fg_color;
}

GtkPopover .frame {
    border: 1px solid mix(@menu_bg_color, @menu_fg_color, 0.12);
    border-radius: 2px;
}

GtkPopover .entry {
    border-color: mix(@menu_bg_color, @menu_fg_color, 0.12);
    background-color: @menu_bg_color;
    background-image: none;
    color: @menu_fg_color;
}

GtkPopover .entry:hover,
GtkPopover .entry:focus,
GtkPopover .entry:active {
    border-color: mix(@menu_bg_color, @menu_fg_color, 0.21);
}

GtkPopover.osd > .toolbar .button {
    border-radius: 0;
    border-width: 0;
    background-image: none;
    background-color: transparent;
}

GtkPopover .separator {
    border: 0;
    background-color: transparent;
    color: alpha(currentColor, 0.5);
    font-size: 80%;
    font-weight: bold;
}

.menuitem.button {
    color: @theme_fg_color;
}

.menuitem.button,
.menuitem.button:active,
.menuitem.button:checked,
.menuitem.button:insensitive,
.menuitem.button:active:insensitive,
.menuitem.button:checked:insensitive {
    background-color: transparent;
    background-image: none;
    border-width: 1px;
    box-shadow: none;
    color: @menu_fg_color;
}

.menuitem.button:active:hover,
.menuitem.button:checked:hover,
.menuitem.button:hover,
.menuitem.button:selected {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.2),
                                      shade(@theme_selected_bg_color, 1.0)
                                      );
    color: @theme_selected_fg_color;
}

GtkModelButton.button {
    color: @menu_fg_color;
}

GtkModelButton.button:active,
GtkModelButton.button:checked,
GtkModelButton.button:insensitive,
GtkModelButton.button:active:insensitive,
GtkModelButton.button:checked:insensitive,
GtkModelButton.button {
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    border-image: none;
    border-width: 1px;
    box-shadow: none;
}

GtkModelButton.button:active:hover,
GtkModelButton.button:checked:hover,
GtkModelButton.button:hover,
GtkModelButton.button:selected {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.2),
                                      shade(@theme_selected_bg_color, 1.0)
                                      );
    color: @theme_selected_fg_color;
    text-shadow: none;
    border-width: 1px;
}

/************
 * notebook *
 ************/
.notebook {
    padding: 0;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.8);
    border-radius: 3px;
    background-color: shade(@theme_bg_color, 1.05);
    background-image: none;
    background-clip: border-box;
}

.notebook.frame {
    border-width: 1px;
}

.notebook.header {
    border-width: 0;
    background-color: shade(@theme_base_color, 0.85);
}

.notebook.header.frame {
    border-color: shade(@theme_base_color, 0.75);
}

.notebook.header.frame.top {
    border-width: 1px 1px 0 1px;
}

.notebook.header.frame.right {
    border-width: 1px 1px 1px 0;
}

.notebook.header.frame.bottom {
    border-width: 0 1px 1px 1px;
}

.notebook.header.frame.left {
    border-width: 1px 0 1px 1px;
}

.notebook GtkViewport {
    border-width: 0;
    background-color: transparent;
    color: @theme_text_color;
}

.notebook tab {
    padding: 3px;
    border-color: shade(@theme_bg_color, 0.9);
    border-radius: 3px;
    background-color: @theme_bg_color;
    background-image: none;
}

.notebook tab:active {
    border-color: shade(@theme_bg_color, 0.8);
    background-color: shade(@theme_bg_color, 1.05);
    background-image: none;
}

.notebook tab GtkLabel {
    color: @theme_fg_color;
}

.notebook tab.top {
    border-width: 1px 1px 0 1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.notebook tab.top:active {
    padding: 4px 3px;
}

.notebook tab.right {
    border-width: 1px 1px 1px 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.notebook tab.right:active {
    padding: 3px 4px;
}

.notebook tab.bottom {
    border-width: 0 1px 1px 1px;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

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

.notebook tab.left {
    border-width: 1px 0 1px 1px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.notebook tab.left:active {
    padding: 3px 4px;
}

.notebook tab GtkLabel {
    color: mix(@theme_text_color, @theme_base_color, 0.3);
}

.notebook .active-page,
.notebook tab .active-page GtkLabel {
    color: @theme_text_color;
}

/* close button styling */
.notebook tab .button,
.notebook tab .button:active,
.notebook tab .button:checked,
.notebook tab .button:hover {
    padding: 1px;
    border-width: 1px;
    border-radius: 2px;
    border-style: solid;
    border-color: transparent;
    background-image: none;
    background-color: transparent;
    color: mix(@theme_text_color, @theme_base_color, 0.5);
}

.notebook tab .button:hover {
    color: @theme_text_color;
    border-color: shade(@theme_base_color, 0.8);
}

.notebook tab .button:active,
.notebook tab .button:checked,
.notebook tab .button:active:hover,
.notebook tab .button:checked:hover {
    border-color: shade(@theme_base_color, 0.7);
    background-color: shade(@theme_base_color, 0.95);
}

/******************
 * pane separator *
 ******************/
.pane-separator {
    background-color: @theme_bg_color;
    color: transparent;
}

/*************************
 * progressbar and scale *
 *************************/
GtkProgressBar {
    padding: 0;
    border-width: 1px;
    border-radius: 4px;
}

.progressbar,
.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focus {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.15),
                                      shade(@theme_selected_bg_color, 0.95)
                                      );
}

.progressbar.vertical {
    background-image: linear-gradient(to right,
                                      shade(@theme_selected_bg_color, 1.15),
                                      shade(@theme_selected_bg_color, 0.95)
                                      );
}

.trough,
.trough row,
.trough row:hover,
.trough row:selected,
.trough row:selected:focus {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 0.95),
                                      shade(@theme_bg_color, 1.15)
                                      );
}

.trough.vertical {
    background-image: linear-gradient(to right,
                                      shade(@theme_bg_color, 0.95),
                                      shade(@theme_bg_color, 1.15)
                                      );
}

/* level bars as used for password quality or remaining power */
GtkLevelBar {
    -GtkLevelBar-min-block-width: 34;
    -GtkLevelBar-min-block-height: 3;
}

GtkLevelBar.vertical {
    -GtkLevelBar-min-block-width: 3;
    -GtkLevelBar-min-block-height: 34;
}

.level-bar.trough {
    padding: 2px;
    border-radius: 3px;
}

.level-bar.fill-block {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.15),
                                      shade(@theme_selected_bg_color, 0.95)
                                      );
}

.level-bar.indicator-continuous.fill-block {
    padding: 2px;
    border-radius: 3px;
}

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

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

/* discrete indicator border rounding,
   uncomment when :nth-child will be working
   on the widget

.level-bar.indicator-discrete.fill-block.horizontal:first-child {
    border-radius: 3px 0 0 3px;
}

.level-bar.indicator-discrete.fill-block.horizontal:last-child {
    border-radius: 0 3px 3px 0;
}

.level-bar.indicator-discrete.fill-block.vertical:first-child {
    border-radius: 3px 3px 0 0;
}

.level-bar.indicator-discrete.fill-block.vertical:last-child {
    border-radius: 0 0 3px 3px;
}
*/

.level-bar.fill-block.level-high {
    border-color: shade(@success_color, 0.85);
    background-image: linear-gradient(to bottom,
                                      shade(@success_color, 1.2),
                                      @success_color 75%,
                                      shade(@success_color, 0.95)
                                      );
}

.level-bar.fill-block.level-low {
    border-color: shade(@warning_bg_color, 0.80);
    background-image: linear-gradient(to bottom,
                                      shade(@warning_bg_color, 1.3),
                                      @warning_bg_color 75%,
                                      shade(@warning_bg_color, 0.9)
                                      );
}

.level-bar.fill-block.empty-fill-block {
    border-color: alpha(@theme_fg_color, 0.1);
    background-color: transparent;
    background-image: none;
}

.scale {
    -GtkRange-slider-width: 13;
    -GtkRange-trough-border: 1;
    -GtkScale-slider-length: 13;

    padding: 0;
    border-width: 1px;
    border-radius: 3px;
}

.scale.slider {
    border-radius: 7px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.30), 1.2),
                                      shade(shade(@theme_bg_color, 1.30), 0.97)
                                      );

    /* we will draw the border using box shadow for now */
    box-shadow: inset 1px 0 shade(@theme_bg_color, 0.7),
                inset 0 1px shade(@theme_bg_color, 0.7),
                inset -1px 0 shade(@theme_bg_color, 0.6),
                inset 0 -1px shade(@theme_bg_color, 0.6);
}

.scale.slider:hover {
    background-image: linear-gradient(to bottom,
                                      shade(mix(@theme_bg_color, shade(@theme_selected_bg_color, 0.9), 0.4), 1.2),
                                      shade(mix(@theme_bg_color, shade(@theme_selected_bg_color, 0.9), 0.4),0.97)
                                      );

    box-shadow: inset 1px 0 shade(@theme_bg_color, 0.6),
                inset 0 1px shade(@theme_bg_color, 0.6),
                inset -1px 0 shade(@theme_bg_color, 0.5),
                inset 0 -1px shade(@theme_bg_color, 0.5);
}

.scale.slider:insensitive {
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 0.99),
                                      shade(@theme_bg_color, 0.95)
                                      );

    box-shadow: inset 1px 0 shade(@theme_bg_color, 0.8),
                inset 0 1px shade(@theme_bg_color, 0.8),
                inset -1px 0 shade(@theme_bg_color, 0.8),
                inset 0 -1px shade(@theme_bg_color, 0.8);
}

.scale.slider.vertical {
    background-image: linear-gradient(to right,
                                      shade(shade(@theme_bg_color, 1.30), 1.2),
                                      shade(shade(@theme_bg_color, 1.30), 0.97)
                                      );
}

.scale.slider.vertical:hover {
    background-image: linear-gradient(to right,
                                      shade(mix(@theme_bg_color, shade(@theme_selected_bg_color, 0.9), 0.4), 1.2),
                                      shade(mix(@theme_bg_color, shade(@theme_selected_bg_color, 0.9), 0.4),0.97)
                                      );
}

.scale.slider.vertical:insensitive {
    background-image: linear-gradient(to right,
                                      shade(@theme_bg_color, 0.99),
                                      shade(@theme_bg_color, 0.95)
                                      );
}

.scale.slider.fine-tune:active,
.scale.slider.fine-tune:active:hover,
.scale.slider.fine-tune.horizontal:active,
.scale.slider.fine-tune.horizontal:active:hover {
      background-size: 50%;
      background-repeat: no-repeat;
      background-position: center;
}

.scale.mark {
    border-color: shade(@theme_bg_color, 0.7);
}

.scale.trough {
    margin: 5px 0;
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.8), 0.9),
                                      shade(shade(@theme_bg_color, 0.8), 1.1)
                                      );
}

.scale.trough.vertical {
    margin: 0 5px;
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 3px;
    background-image: linear-gradient(to right,
                                      shade(shade(@theme_bg_color, 0.8), 0.9),
                                      shade(shade(@theme_bg_color, 0.8), 1.1)
                                      );
}

.menuitem .scale.highlight.left,
.scale.highlight.left {
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_selected_bg_color, 0.9), 1.1),
                                      shade(shade(@theme_selected_bg_color, 0.9), 0.9)
                                      );
}

.menuitem .scale.highlight.left:hover {
    border-color: shade(@theme_selected_bg_color, 0.5);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_selected_bg_color, 0.9), 0.9),
                                      shade(shade(@theme_selected_bg_color, 0.9), 0.7)
                                      );
}

.scale.highlight.bottom {
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to right,
                                      shade(shade(@theme_selected_bg_color, 0.9), 1.1),
                                      shade(shade(@theme_selected_bg_color, 0.9), 0.9)
                                      );
}

.scale.trough:insensitive,
.scale.highlight.left:insensitive {
    border-color: shade(@theme_bg_color, 0.9);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 0.99),
                                      shade(@theme_bg_color, 0.95)
                                      );
}

.scale.trough.vertical:insensitive,
.scale.highlight.bottom:insensitive {
    border-color: shade(@theme_bg_color, 0.9);
    background-image: linear-gradient(to right,
                                      shade(@theme_bg_color, 0.99),
                                      shade(@theme_bg_color, 0.95)
                                      );
}

/*************
 * scrollbar *
 *************/
.scrollbar {
    border-width: 1px;
    border-style: solid;
    padding: 0;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
    -GtkRange-slider-width: 5px;
    -GtkRange-trough-border: 1px;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) .slider {
    border-radius: 3px;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) .trough {
    border-style: none;
    background-image: none;
    background-color: transparent;
}

.scrollbars-junction,
.scrollbar.trough,
.scrollbar.trough.vertical {
    border-width: 0;
    border-radius: 0;
    background-image: linear-gradient(to right,
                                      shade(@theme_bg_color, 1.1),
                                      shade(@theme_bg_color, 1.3)
                                      );
}

.scrollbar.trough.horizontal {
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.1),
                                      shade(@theme_bg_color, 1.3)
                                      );
}

.scrollbar.slider,
.scrollbar.button,
.scrollbar.slider.vertical,
.scrollbar.button.vertical {
    border-width: 1px;
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 10px;
    background-image: linear-gradient(to right,
                                      shade(shade(@theme_bg_color, 0.9), 1.2),
                                      shade(shade(@theme_bg_color, 0.9), 1.15)
                                      );

    color: shade(@theme_bg_color, 0.6);
}

.scrollbar.slider.horizontal,
.scrollbar.button.horizontal {
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.9), 1.2),
                                      shade(shade(@theme_bg_color, 0.9), 1.15)
                                      );
}

.scrollbar.slider:hover,
.scrollbar.slider.vertical:hover {
    background-image: linear-gradient(to right,
                                      shade(shade(@theme_bg_color, 0.8), 1.2),
                                      shade(shade(@theme_bg_color, 0.8), 1.15)
                                      );
}

.scrollbar.slider.horizontal:hover {
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.8), 1.2),
                                      shade(shade(@theme_bg_color, 0.8), 1.15)
                                      );
}

.scrollbar.button:insensitive,
.scrollbar.button.vertical:insensitive {
    background-image: linear-gradient(to right,
                                      shade(shade(@theme_bg_color, 0.95), 1.05),
                                      shade(shade(@theme_bg_color, 0.95), 0.97)
                                      );
}

.scrollbar.button.horizontal:insensitive {
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.95), 1.05),
                                      shade(shade(@theme_bg_color, 0.95), 0.97)
                                      );
}

.scrollbar.slider.fine-tune:prelight:active {
      border-width: 2px;
      border-color: transparent;
}

/* overlay scrollbar */
OsThumb {
    color: shade(@theme_bg_color, 0.6);
}

OsThumb:selected,
OsScrollbar:selected {
    background-color: @theme_selected_bg_color;
}

OsThumb:active,
OsScrollbar:active {
    background-color: shade(@theme_bg_color, 0.8);
}

OsThumb:insensitive,
OsScrollbar:insensitive {
    background-color: shade(@theme_bg_color, 0.97);
}

/*************
 * overshoot *
 *************/
.overshoot.top {
    background: -gtk-gradient(radial, center top, 0, center top, 0.7, from(shade(@theme_bg_color, 0.92)), to(alpha(@theme_bg_color, 0.0)));
}

.overshoot.right {
    background: -gtk-gradient(radial, right center, 0, right center, 0.7, from(shade(@theme_bg_color, 0.92)), to(alpha(@theme_bg_color, 0.0)));
}

.overshoot.bottom {
    background: -gtk-gradient(radial, center bottom, 0, center bottom, 0.7, from(shade(@theme_bg_color, 0.92)), to(alpha(@theme_bg_color, 0.0)));
}

.overshoot.left {
    background: -gtk-gradient(radial, left center, 0, left center, 0.7, from(shade(@theme_bg_color, 0.92)), to(alpha(@theme_bg_color, 0.0)));
}

/**************
 * undershoot *
 **************/
.undershoot {
    background: none;
}

/*************
 * separator *
 *************/
 .sidebar.separator,
.sidebar.view.separator,
.sidebar .view.separator,
.view.separator,
.separator {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.9);
    color: shade(@theme_bg_color, 0.9);
}

.button .separator,
.button.separator {
    border-color: transparent;
}

.button .separator:insensitive,
.button.separator:insensitive {
    border-color: transparent;
}

.primary-toolbar GtkSeparatorToolItem,
.primary-toolbar .separator,
.primary-toolbar .separator:insensitive,
.toolbar GtkSeparatorToolItem,
.toolbar .separator,
.toolbar .separator:insensitive {
    -GtkWidget-window-dragging: true;

    border-color: shade(@toolbar_bg_color, 0.95);
    color: shade(@toolbar_bg_color, 0.95);
}

.header-bar GtkSeparatorToolItem,
.header-bar .separator,
.header-bar .separator:insensitive,
.titlebar GtkSeparatorToolItem,
.titlebar .separator,
.titlebar .separator:insensitive {
    -GtkWidget-window-dragging: true;

    border-color: shade(@titlebar_bg_color, 0.8);
    color: shade(@titlebar_bg_color, 0.8);
}

.header-bar GtkSeparatorToolItem:backdrop,
.header-bar .separator:backdrop,
.header-bar .separator:backdrop:insensitive,
.titlebar GtkSeparatorToolItem:backdrop,
.titlebar .separator:backdrop,
.titlebar .separator:backdrop:insensitive {
    border-color: shade(@titlebar_bg_color, 0.95);
    color: shade(@titlebar_bg_color, 0.95);
}

.primary-toolbar .button .separator,
.primary-toolbar .button.separator,
.toolbar .button .separator,
.toolbar .button.separator {
    border-color: shade(@toolbar_bg_color, 0.8);
}

.header-bar .button .separator,
.header-bar .button.separator,
.titlebar .button .separator,
.titlebar .button.separator {
    border-color: shade(@titlebar_bg_color, 0.8);
}

.primary-toolbar .button .separator:insensitive,
.primary-toolbar .button.separator:insensitive,
.toolbar .button .separator:insensitive,
.toolbar .button.separator:insensitive {
    border-color: shade(@toolbar_bg_color, 0.85);
}

.header-bar .button .separator:insensitive,
.header-bar .button.separator:insensitive,
.titlebar .button .separator:insensitive,
.titlebar .button.separator:insensitive {
    border-color: shade(@titlebar_bg_color, 0.85);
}

.menuitem.separator,
.menuitem .separator {
    -GtkMenuItem-horizontal-padding: 0;
    -GtkWidget-separator-height: 1;

    border-style: none;
    color: shade(@menu_bg_color, 0.9);
}

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

    border-style: none;

}

/***********
 * sidebar *
 ***********/
.sidebar,
.sidebar.view,
.sidebar .view,
.sidebar GtkScrolledWindow {
    background-color: mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1);
    color: mix(@theme_text_color, @theme_base_color, 0.3);
    /* Don't use symbolic icons in the sidebar */
    -gtk-icon-style: regular;
}

.sidebar-row {
    border-width: 1px 0;
    border-style: none;
    background: transparent;
}

.sidebar row:selected,
.sidebar row:selected:hover,
.sidebar row:selected:focus,
.sidebar .view row:selected,
.sidebar .view row:selected:hover,
.sidebar .view row:selected:focus,
.sidebar-row:selected,
.sidebar-row:selected:hover,
.sidebar-row:selected:focus {
    border-width: 1px 0;
    border-style: solid;
    border-top-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 1.12);
    background-image: linear-gradient(to bottom,
                                      shade(mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1), 0.87),
                                      shade(mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1), 0.95) 10%,
                                      shade(mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1), 0.99) 92%,
                                      shade(mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1), 0.92)
                                      );

    color: mix(@theme_text_color, @theme_base_color, 0.3);
}

.sidebar row:prelight,
.sidebar .view row:prelight,
.sidebar-row:prelight {
    border-color: mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.3);
    background-color: mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.3);
    background-image: none;
    color: @theme_text_color;
}

.sidebar-row .sidebar-label {
    padding-left: 3px;
}

.sidebar .scrollbar.trough {
    background-image: linear-gradient(to right,
                                      shade(mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1), 0.9),
                                      shade(mix(shade(@theme_base_color, 0.9), shade(@theme_selected_bg_color, 1.35), 0.1), 1.1)
                                      );
}

.sidebar .frame {
    border-width: 0;
}

/**************
 * spinbutton *
 **************/
.spinbutton .button {
    color: mix(@theme_text_color, @theme_base_color, 0.4);
    padding: 2px 3px;
    border-width: 0;
    border-radius: 0;
    border-style: none;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 1px 0 shade(@theme_base_color, 0.9);
}

.spinbutton .button:insensitive {
    color: mix(@theme_text_color, @theme_base_color, 0.7);
    box-shadow: inset 1px 0 shade(@theme_base_color, 0.9);
}

.spinbutton .button:active,
.spinbutton .button:checked,
.spinbutton .button:hover {
    color: @theme_fg_color;
}

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

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

.spinbutton .button:dir(rtl) {
    box-shadow: inset -1px 0 shade(@theme_base_color, 0.9);
}

.spinbutton.vertical .button {
    border-width: 1px;
    border-style: solid;
    border-top-color: shade(@theme_bg_color, 0.8);
    border-right-color: shade(@theme_bg_color, 0.72);
    border-left-color: shade(@theme_bg_color, 0.72);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.05),
                                      shade(shade(@theme_bg_color, 1.02), 0.97)
                                      );

    color: @theme_fg_color;
    box-shadow: none;
}

.spinbutton.vertical .button:hover {
    border-top-color: shade(@theme_bg_color, 0.85);
    border-right-color: shade(@theme_bg_color, 0.78);
    border-left-color: shade(@theme_bg_color, 0.78);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

.spinbutton.vertical .button:active,
.spinbutton.vertical .button:checked {
    border-color: shade(@theme_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.85), 1.05),
                                      shade(shade(@theme_bg_color, 0.85), 0.97)
                                      );
}

.spinbutton.vertical .button:active:hover,
.spinbutton.vertical .button:checked:hover {
    border-top-color: shade(@theme_bg_color, 0.85);
    border-right-color: shade(@theme_bg_color, 0.78);
    border-left-color: shade(@theme_bg_color, 0.78);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

.spinbutton.vertical .button:focus,
.spinbutton.vertical .button:hover:focus,
.spinbutton.vertical .button:active:focus,
.spinbutton.vertical .button:checked:focus,
.spinbutton.vertical .button:active:hover:focus,
.spinbutton.vertical .button:checked:hover:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

.spinbutton.vertical .button:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.95), 1.05),
                                      shade(shade(@theme_bg_color, 0.95), 0.97)
                                      );

    color: mix(@theme_fg_color, @theme_bg_color, 0.4);
}

.spinbutton.vertical .button:first-child {
    border-width: 1px;
    border-bottom-width: 0;
    border-radius: 3px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.spinbutton.vertical .button:last-child {
    border-width: 1px;
    border-top-width: 0;
    border-radius: 3px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.spinbutton.vertical.entry {
    border-width: 1px;
    border-style: solid;
    border-radius: 0;
}

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

.spinner {
    -gtk-icon-source: -gtk-icontheme("process-working-symbolic");
    color: @theme_fg_color;
    opacity: 0;
}

.spinner:active {
    animation: spinner 1s infinite linear;
    opacity: 1;
}

.spinner:active:backdrop {
    color: @theme_fg_color;
}

.spinner:active:insensitive {
    opacity: 0.5;
}

.menu.spinner,
.menu .spinner,
.menu .spinner:hover,
.primary-toolbar .spinner {
    color: @theme_selected_bg_color;
    border: none;
    box-shadow: none;
}

/*************
 * statusbar *
 *************/
GtkStatusbar {
    padding: 3px;
    color: @theme_fg_color;
}

/**********
 * switch *
 **********/
GtkSwitch {
    padding: 0;
    border-radius: 3px;
    font: bold condensed;
}

GtkSwitch.slider {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.8);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.05),
                                      shade(shade(@theme_bg_color, 1.02), 0.97)
                                      );
}

GtkSwitch.slider:focus {
    border-color: shade(@theme_selected_bg_color, 0.8); 
}

GtkSwitch.slider:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.95), 1.05),
                                      shade(shade(@theme_bg_color, 0.95), 0.97)
                                      );
}

GtkSwitch.trough {
    border-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 0.95),
                                      shade(@theme_bg_color, 1.15)
                                      );

    color: @theme_fg_color;
}

GtkSwitch.trough:active {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 0.95),
                                      shade(@theme_selected_bg_color, 1.15)
                                      );

    color: @theme_selected_fg_color;
}

GtkSwitch.trough:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.95), 0.95),
                                      shade(shade(@theme_bg_color, 0.95), 1.15)
                                      );

    color: mix(@theme_fg_color, @theme_bg_color, 0.4);
}

/************
 * textview *
 ************/
GtkTextView {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

/*****************
 * color chooser *
 *****************/
GtkColorSwatch,
GtkColorSwatch:selected {
    border-width: 1px;
    border-style: solid;
    border-color: alpha(black, 0.3);
    border-radius: 1px;
    background-color: transparent;
    background-clip: border-box;
}

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

GtkColorSwatch.color-dark:hover {
}

GtkColorSwatch.color-light:hover {
}

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

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

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

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

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

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

GtkColorChooserWidget #add-color-button {
    background-clip: padding-box;
    border-color: alpha(black, 0.3);
    background-color: shade(@theme_bg_color, 0.95);
    color: @theme_fg_color;
}

GtkColorChooserWidget #add-color-button:hover {
    border-color: alpha(black, 0.5);
    background-color: shade(@theme_bg_color, 0.90);
    color: @theme_fg_color;
}

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

.color-active-badge.color-light,
.color-active-badge.color-light:hover {
    border-color: alpha(black, 0.3);
    color: alpha(black, 0.3);
}

.color-active-badge.color-dark,
.color-active-badge.color-dark:hover {
    border-color: alpha(white, 0.3);
    color: alpha(white, 0.3);
}

GtkColorEditor GtkColorSwatch {
    border-radius: 3px;
}

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

GtkColorButton.button {
    padding: 2px;
}

/**************
 * header-bar *
 **************/
.header-bar {
    padding: 6px;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@titlebar_bg_color, 0.7);
    background-color: @titlebar_bg_color;
    background-image: linear-gradient(to bottom,
                                      shade(@titlebar_bg_color, 1.0),
                                      shade(@titlebar_bg_color, 0.88)
                                      );

    color: @titlebar_fg_color;
}

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

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

.header-bar GtkMenuButton.titlebutton {
    padding: 6px;
    border: 1px solid transparent;
}

.header-bar .title {
    font: bold;
    padding: 0 12px;
}

.header-bar .subtitle {
    font: smaller;
    padding: 0 12px;
}

.header-bar GtkComboBox,
.header-bar .button,
.header-bar GtkMenuButton.button:hover {
    border-width: 1px;
    border-style: solid;
    border-top-color: shade(@titlebar_bg_color, 0.8);
    border-right-color: shade(@titlebar_bg_color, 0.72);
    border-left-color: shade(@titlebar_bg_color, 0.72);
    border-bottom-color: shade(@titlebar_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@titlebar_bg_color, 1.02), 1.05),
                                      shade(shade(@titlebar_bg_color, 1.02), 0.97)
                                      );

    color: @titlebar_fg_color;
}

.header-bar GtkComboBox {
    border-style: none;
}

.header-bar .button:hover,
.header-bar .button.flat:hover {
    border-top-color: shade(@titlebar_bg_color, 0.85);
    border-right-color: shade(@titlebar_bg_color, 0.78);
    border-left-color: shade(@titlebar_bg_color, 0.78);
    border-bottom-color: shade(@titlebar_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@titlebar_bg_color, 1.15),
                                      shade(@titlebar_bg_color, 1.07)
                                      );
}

.header-bar .button:active,
.header-bar .button:checked,
.header-bar .button.flat:active,
.header-bar .button.flat:checked,
.header-bar GtkMenuButton.button:active,
.header-bar GtkMenuButton.button:checked {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@titlebar_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@titlebar_bg_color, 0.85), 1.05),
                                      shade(shade(@titlebar_bg_color, 0.85), 0.97)
                                      );
}

.header-bar .button:active:hover,
.header-bar .button:checked:hover,
.header-bar GtkMenuButton.button:active:hover,
.header-bar GtkMenuButton.button:checked:hover {
    border-top-color: shade(@titlebar_bg_color, 0.85);
    border-right-color: shade(@titlebar_bg_color, 0.78);
    border-left-color: shade(@titlebar_bg_color, 0.78);
    border-bottom-color: shade(@titlebar_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@titlebar_bg_color, 1.15),
                                      shade(@titlebar_bg_color, 1.07)
                                      );
}

.header-bar .button:focus,
.header-bar .button:hover:focus,
.header-bar .button:active:focus,
.header-bar .button:checked:focus,
.header-bar .button:active:hover:focus,
.header-bar .button:checked:hover:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

.header-bar .button:insensitive {
    border-color: shade(@titlebar_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@titlebar_bg_color, 0.95), 1.05),
                                      shade(shade(@titlebar_bg_color, 0.95), 0.97)
                                      );
}

.header-bar .button:active:insensitive,
.header-bar .button:checked:insensitive {
    border-color: shade(@titlebar_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@titlebar_bg_color, 0.95), 1.05),
                                      shade(shade(@titlebar_bg_color, 0.95), 0.97)
                                      );
}

.header-bar .entry {
    border-top-color: shade(@titlebar_bg_color, 0.6);
    border-right-color: shade(@titlebar_bg_color, 0.7);
    border-left-color: shade(@titlebar_bg_color, 0.7);
    border-bottom-color: shade(@titlebar_bg_color, 0.72);
}

.header-bar .entry:active,
.header-bar .entry:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

/************
 * pathbar *
 ************/
.path-bar .button GtkImage {
    padding-right: 3px;
}

/***********
 * toolbar *
 ***********/
.toolbar {
    padding: 6px;
    border-style: none;
    background-color: @toolbar_bg_color;
    background-image: linear-gradient(to bottom,
                                      shade(@toolbar_bg_color, 1.0),
                                      shade(@toolbar_bg_color, 0.88)
                                      );

    color: @toolbar_fg_color;
}

.toolbar .button {
    padding: 2px;
}

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

.toolbar .button.image-button {
    padding: 3px 2px 2px 3px;
}

.toolbar:insensitive {
    background-color: shade(@toolbar_bg_color, 0.9);
    color: mix(@toolbar_fg_color, @toolbar_bg_color, 0.5);
}

/* menubar toolbars */
.toolbar.menubar {
    -GtkToolbar-button-relief: normal;
}

/*******************
 * primary-toolbar *
 *******************/
.primary-toolbar,
.primary-toolbar .toolbar,
.primary-toolbar.toolbar {
    -GtkWidget-window-dragging: true;

    padding: 2px;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@toolbar_bg_color, 0.7);
    background-color: @toolbar_bg_color;
    background-image: linear-gradient(to bottom,
                                      shade(@toolbar_bg_color, 1.0),
                                      shade(@toolbar_bg_color, 0.88)
                                      );

    color: @toolbar_fg_color;
}

.primary-toolbar GtkComboBox,
.primary-toolbar .button {
    padding: 2px;
    border-width: 1px;
    border-color: transparent;
    border-radius: 3px;
    background-color: transparent;
    background-image: none;
    color: @toolbar_fg_color;
}

.primary-toolbar GtkComboBox.flat,
.primary-toolbar .button.flat,
.primary-toolbar GtkComboBox.flat,
.primary-toolbar .button.flat,
.toolbar GtkComboBox.flat,
.toolbar .button.flat,
.primary-toolbar GtkComboBox.flat:insensitive,
.primary-toolbar .button.flat:insensitive,
.primary-toolbar GtkComboBox.flat:insensitive,
.primary-toolbar .button.flat:insensitive,
.toolbar GtkComboBox.flat:insensitive,
.toolbar .button.flat:insensitive {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
}

.primary-toolbar .raised .button,
.primary-toolbar .raised.button,
.toolbar GtkComboBox,
.toolbar .button {
    border-top-color: shade(@toolbar_bg_color, 0.8);
    border-right-color: shade(@toolbar_bg_color, 0.72);
    border-left-color: shade(@toolbar_bg_color, 0.72);
    border-bottom-color: shade(@toolbar_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@toolbar_bg_color, 1.02), 1.05),
                                      shade(shade(@toolbar_bg_color, 1.02), 0.97)
                                      );

    color: @toolbar_fg_color;
}

.primary-toolbar .button:hover,
.toolbar .button:hover {
    border-top-color: shade(@toolbar_bg_color, 0.85);
    border-right-color: shade(@toolbar_bg_color, 0.78);
    border-left-color: shade(@toolbar_bg_color, 0.78);
    border-bottom-color: shade(@toolbar_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@toolbar_bg_color, 1.15),
                                      shade(@toolbar_bg_color, 1.07)
                                      );
}

.primary-toolbar .button:active,
.primary-toolbar .button:checked,
.toolbar .button:active,
.toolbar .button:checked {
    border-color: shade(@toolbar_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@toolbar_bg_color, 0.85), 1.05),
                                      shade(shade(@toolbar_bg_color, 0.85), 0.97)
                                      );
}

.primary-toolbar .button:active:hover,
.primary-toolbar .button:checked:hover,
.toolbar .button:active:hover,
.toolbar .button:checked:hover {
    border-top-color: shade(@toolbar_bg_color, 0.85);
    border-right-color: shade(@toolbar_bg_color, 0.78);
    border-left-color: shade(@toolbar_bg_color, 0.78);
    border-bottom-color: shade(@toolbar_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@toolbar_bg_color, 1.15),
                                      shade(@toolbar_bg_color, 1.07)
                                      );
}

.primary-toolbar .button:focus,
.primary-toolbar .button:hover:focus,
.primary-toolbar .button:active:focus,
.primary-toolbar .button:checked:focus,
.primary-toolbar .button:active:hover:focus,
.primary-toolbar .button:checked:hover:focus,
.toolbar .button:focus,
.toolbar .button:hover:focus,
.toolbar .button:active:focus,
.toolbar .button:checked:focus,
.toolbar .button:active:hover:focus,
.toolbar .button:checked:hover:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

.primary-toolbar .button:insensitive,
.toolbar .button:insensitive {
    border-color: shade(@toolbar_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@toolbar_bg_color, 0.95), 1.05),
                                      shade(shade(@toolbar_bg_color, 0.95), 0.97)
                                      );
}

.primary-toolbar .button:active:insensitive,
.primary-toolbar .button:checked:insensitive,
.toolbar .button:active:insensitive,
.toolbar .button:checked:insensitive {
    border-color: shade(@toolbar_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@toolbar_bg_color, 0.95), 1.05),
                                      shade(shade(@toolbar_bg_color, 0.95), 0.97)
                                      );
}

.primary-toolbar .entry,
.toolbar .entry {
    border-top-color: shade(@toolbar_bg_color, 0.6);
    border-right-color: shade(@toolbar_bg_color, 0.7);
    border-left-color: shade(@toolbar_bg_color, 0.7);
    border-bottom-color: shade(@toolbar_bg_color, 0.72);
}

.primary-toolbar .entry:active,
.primary-toolbar .entry:focus,
.toolbar .entry:active,
.toolbar .entry:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

/* inline-toolbar */
.inline-toolbar.toolbar {
    -GtkToolbar-button-relief: normal;

    padding: 2px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.8);
    border-radius: 0;
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 0.93),
                                      @theme_bg_color
                                      );
}

.inline-toolbar.toolbar GtkToolButton > .button {
    padding: 4px;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.8);
    border-radius: 0;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.05),
                                      shade(shade(@theme_bg_color, 1.02), 0.97)
                                      );

    color: @theme_fg_color;
}

.inline-toolbar.toolbar GtkToolButton > .button:hover {
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

.inline-toolbar.toolbar GtkToolButton > .button:active, .inline-toolbar GtkToolButton > .button:checked {
    border-color: shade(@theme_bg_color, 0.6);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.85), 1.05),
                                      shade(shade(@theme_bg_color, 0.85), 0.97)
                                      );
}
.inline-toolbar.toolbar GtkToolButton > .button:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.95), 1.05),
                                      shade(shade(@theme_bg_color, 0.95), 0.97)
                                      );
}

.inline-toolbar.toolbar GtkToolButton > .button:insensitive > GtkLabel, .inline-toolbar GtkToolButton > .button:insensitive GtkLabel {
    color: inherit;
}

.inline-toolbar.toolbar GtkToolButton > .button:insensitive:active, .inline-toolbar GtkToolButton > .button:insensitive:checked {
    text-shadow: none;
    icon-shadow: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    border-width: 1px 1px 2px 1px;
    border-style: solid;
    border-color: transparent;
}

.inline-toolbar.toolbar GtkToolButton > .button:insensitive:active > GtkLabel, .inline-toolbar GtkToolButton > .button:insensitive:active GtkLabel, .inline-toolbar GtkToolButton > .button:insensitive:checked > GtkLabel, .inline-toolbar GtkToolButton > .button:insensitive:checked GtkLabel {
    color: inherit;
}

.inline-toolbar.toolbar GtkToolButton > .button.flat, .inline-toolbar.toolbar GtkToolButton > .sidebar-button.button, .inline-toolbar.toolbar NautilusWindow GtkToolButton > .sidebar-button.button, .inline-toolbar .button, .linked > .button, .linked > .button:hover, .linked > GtkComboBox > .the-button-in-the-combobox:dir(ltr), .linked > GtkComboBox > .the-button-in-the-combobox:dir(rtl) {
    border-radius: 0;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.75);
}

.inline-toolbar.toolbar GtkToolButton > .button.flat:active, .inline-toolbar.toolbar GtkToolButton > .sidebar-button.button:active, .inline-toolbar.toolbar NautilusWindow GtkToolButton > .sidebar-button.button:active, .inline-toolbar .button:active, .linked > .button:active, .linked > GtkComboBox > .the-button-in-the-combobox:active:dir(ltr), .linked > GtkComboBox > .the-button-in-the-combobox:active:dir(rtl), .inline-toolbar.toolbar GtkToolButton > .button.flat:checked, .inline-toolbar.toolbar GtkToolButton > .sidebar-button.button:checked, .inline-toolbar.toolbar NautilusWindow GtkToolButton > .sidebar-button.button:checked, .inline-toolbar .button:checked, .linked > .button:checked, .linked > GtkComboBox > .the-button-in-the-combobox:checked:dir(ltr), .linked > GtkComboBox > .the-button-in-the-combobox:checked:dir(rtl) {
    border-radius: 0;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.6);
}

.inline-toolbar.toolbar GtkToolButton:first-child > .button, .inline-toolbar .button:first-child, .linked > .button:first-child, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar.toolbar NautilusWindow GtkToolButton:first-child > .sidebar-button.button, GtkComboBox.combobox-entry .the-button-in-the-combobox:first-child,
.linked > GtkComboBox:first-child > .the-button-in-the-combobox {
    border-radius: 3px 0 0 3px;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.75);
}

.inline-toolbar.toolbar GtkToolButton:first-child > .button:active, .inline-toolbar .button:first-child:active, .linked > .button:first-child:active, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat:active, .inline-toolbar.toolbar GtkToolButton:first-child > .sidebar-button.button:active, .inline-toolbar.toolbar NautilusWindow GtkToolButton:first-child > .sidebar-button.button:active, GtkComboBox.combobox-entry .the-button-in-the-combobox:active:first-child,
  .linked > GtkComboBox:first-child > .the-button-in-the-combobox:active, .inline-toolbar .button:first-child:checked, .linked > .button:first-child:checked, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat:checked, .inline-toolbar.toolbar GtkToolButton:first-child > .sidebar-button.button:checked, .inline-toolbar.toolbar NautilusWindow GtkToolButton:first-child > .sidebar-button.button:checked, GtkComboBox.combobox-entry .the-button-in-the-combobox:checked:first-child, .linked > GtkComboBox:first-child > .the-button-in-the-combobox:checked {
    border-radius: 3px 0 0 3px;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.6);
}

.inline-toolbar.toolbar GtkToolButton:last-child > .button, .inline-toolbar .button:last-child, .linked > .button:last-child, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar.toolbar NautilusWindow GtkToolButton:last-child > .sidebar-button.button, GtkComboBox.combobox-entry .the-button-in-the-combobox:last-child,
.linked > GtkComboBox:last-child > .the-button-in-the-combobox {
    border-radius: 0 3px 3px 0;
    border-width: 1px 1px 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.75);
}

.inline-toolbar .button:last-child:active, .linked > .button:last-child:active, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat:active, .inline-toolbar.toolbar GtkToolButton:last-child > .sidebar-button.button:active, .inline-toolbar.toolbar NautilusWindow GtkToolButton:last-child > .sidebar-button.button:active, GtkComboBox.combobox-entry .the-button-in-the-combobox:active:last-child,.linked > GtkComboBox:last-child > .the-button-in-the-combobox:active, .inline-toolbar .button:last-child:checked, .linked > .button:last-child:checked, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat:checked, .inline-toolbar.toolbar GtkToolButton:last-child > .sidebar-button.button:checked, .inline-toolbar.toolbar NautilusWindow GtkToolButton:last-child > .sidebar-button.button:checked, GtkComboBox.combobox-entry .the-button-in-the-combobox:checked:last-child, .linked > GtkComboBox:last-child > .the-button-in-the-combobox:checked {
    border-radius: 0 3px 3px 0;
    border-width: 1px 1px 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.6);
}

.inline-toolbar .button:only-child, .linked > .button:only-child, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar.toolbar NautilusWindow GtkToolButton:only-child > .sidebar-button.button, GtkComboBox.combobox-entry .the-button-in-the-combobox:only-child, .linked > GtkComboBox:only-child > .button {
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.75);
}

.inline-toolbar .button:only-child:active, .linked > .button:only-child:active, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat:active, .inline-toolbar.toolbar GtkToolButton:only-child > .sidebar-button.button:active, .inline-toolbar.toolbar NautilusWindow GtkToolButton:only-child > .sidebar-button.button:active, GtkComboBox.combobox-entry .the-button-in-the-combobox:active:only-child, .linked > GtkComboBox:only-child > .button:active, .inline-toolbar .button:only-child:checked, .linked > .button:only-child:checked, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat:checked, .inline-toolbar.toolbar GtkToolButton:only-child > .sidebar-button.button:checked, .inline-toolbar.toolbar NautilusWindow GtkToolButton:only-child > .sidebar-button.button:checked, GtkComboBox.combobox-entry .the-button-in-the-combobox:checked:only-child, .linked > GtkComboBox:only-child > .button:checked {
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.6);
}

/* linked button shadows (vertical) */
.linked.vertical .button,
.inline-toolbar.toolbar.vertical .button,
.inline-toolbar.toolbar.vertical GtkToolButton > .button {
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.8),
		inset 1px 1px alpha(@light_shadow, 0.4),
                inset -1px 0 alpha(@light_shadow, 0.4);
}

.linked.vertical .button:active,
.linked.vertical .button:checked,
.inline-toolbar.toolbar.vertical .button:active,
.inline-toolbar.toolbar.vertical .button:checked,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:checked {
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.8),
                inset 1px 1px alpha(@dark_shadow, 0.06),
                inset -1px -1px alpha(@dark_shadow, 0.06);
}

.linked.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton > .button:insensitive {
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.8),
		inset 1px 1px alpha(@light_shadow, 0.2),
                inset -1px 0 alpha(@light_shadow, 0.2);
}

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

/* add back the inset shadow effect */
.linked.vertical .button:last-child,
.linked.vertical .button:only-child,
.inline-toolbar.toolbar.vertical .button:last-child,
.inline-toolbar.toolbar.vertical .button:only-child,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.4),
                inset -1px 0 alpha(@light_shadow, 0.4);
}

.linked.vertical .button:insensitive:last-child,
.linked.vertical .button:insensitive:only-child,
.inline-toolbar.toolbar.vertical .button:insensitive:last-child,
.inline-toolbar.toolbar.vertical .button:insensitive:only-child,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:insensitive,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:insensitive {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.2),
                inset -1px 0 alpha(@light_shadow, 0.2);
}

.linked.vertical .button:active:last-child,
.linked.vertical .button:checked:last-child,
.linked.vertical .button:active:only-child,
.linked.vertical .button:checked:only-child,
.inline-toolbar.toolbar.vertical .button:active:last-child,
.inline-toolbar.toolbar.vertical .button:checked:last-child,
.inline-toolbar.toolbar.vertical .button:active:only-child,
.inline-toolbar.toolbar.vertical .button:checked:only-child,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:checked,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:active,
.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:checked {
    box-shadow: inset 1px 1px alpha(@dark_shadow, 0.06),
                inset -1px -1px alpha(@dark_shadow, 0.06);
}

/* middle button (vertical) */
.linked.vertical .entry,
.linked.vertical .button,
.linked.vertical .button:active,
.linked.vertical .button:checked,
.linked.vertical .button:active:hover,
.linked.vertical .button:checked:hover,
.linked.vertical .button:insensitive {
    border-width: 1px;
    border-radius: 0;
    border-top-width: 0;
    border-bottom-width: 0;
}

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

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

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

/* linked titlebar buttons */
.header-bar .button.raised.linked,
.header-bar .raised.linked .button,
.header-bar .linked .button {
    box-shadow: inset -1px 0 shade(@titlebar_bg_color, 0.8),
                inset 1px 1px alpha(@light_shadow, 0.4);
}

.header-bar .button.raised.linked:active,
.header-bar .button.raised.linked:checked,
.header-bar .raised.linked .button:active,
.header-bar .raised.linked .button:checked,
.header-bar .linked .button:active,
.header-bar .linked .button:checked {
    box-shadow: inset -1px 0 shade(@titlebar_bg_color, 0.8),
                inset 1px 1px alpha(@dark_shadow, 0.06),
                inset -1px -1px alpha(@dark_shadow, 0.06);
}

.header-bar .button.raised.linked:insensitive,
.header-bar .raised.linked .button:insensitive,
.header-bar .linked .button:insensitive {
    box-shadow: inset -1px 0 shade(@titlebar_bg_color, 0.8),
                inset 1px 1px alpha(@light_shadow, 0.2);
}

/* remove box shadow from last-child and only-child */
.header-bar .button:active:insensitive.raised.linked:last-child,
.header-bar .button:checked:insensitive.raised.linked:last-child,
.header-bar .button:active:insensitive.raised.linked:only-child,
.header-bar .button:checked:insensitive.raised.linked:only-child,
.header-bar .raised.linked .button:active:insensitive:last-child,
.header-bar .raised.linked .button:checked:insensitive:last-child,
.header-bar .raised.linked .button:active:insensitive:only-child,
.header-bar .raised.linked .button:checked:insensitive:only-child,
.header-bar .linked .button:active:insensitive:last-child,
.header-bar .linked .button:checked:insensitive:last-child,
.header-bar .linked .button:active:insensitive:only-child,
.header-bar .linked .button:checked:insensitive:only-child {
    box-shadow: none;
}

/* add back the inset shadow effect */
.header-bar .button.raised.linked:last-child,
.header-bar .button.raised.linked:only-child,
.header-bar .raised.linked .button:last-child,
.header-bar .raised.linked .button:only-child,
.header-bar .linked .button:last-child,
.header-bar .linked .button:only-child {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.4),
                inset -1px 0 alpha(@light_shadow, 0.4);
}

.header-bar .button:insensitive.raised.linked:last-child,
.header-bar .button:insensitive.raised.linked:only-child,
.header-bar .raised.linked .button:insensitive:last-child,
.header-bar .raised.linked .button:insensitive:only-child,
.header-bar .linked .button:insensitive:last-child,
.header-bar .linked .button:insensitive:only-child {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.2),
                inset -1px 0 alpha(@light_shadow, 0.2);
}

.header-bar .button:active.raised.linked:last-child,
.header-bar .button:checked.raised.linked:last-child,
.header-bar .button:active.raised.linked:only-child,
.header-bar .button:checked.raised.linked:only-child,
.header-bar .raised.linked .button:active:last-child,
.header-bar .raised.linked .button:checked:last-child,
.header-bar .raised.linked .button:active:only-child,
.header-bar .raised.linked .button:checked:only-child,
.header-bar .linked .button:active:last-child,
.header-bar .linked .button:checked:last-child,
.header-bar .linked .button:active:only-child,
.header-bar .linked .button:checked:only-child {
    box-shadow: inset 1px 1px alpha(@dark_shadow, 0.06),
                inset -1px -1px alpha(@dark_shadow, 0.06);
}

/* middle button */
.header-bar .button.raised.linked,
.header-bar .button.raised.linked:active,
.header-bar .button.raised.linked:checked,
.header-bar .button.raised.linked:insensitive,
.header-bar .raised.linked .button,
.header-bar .raised.linked .button:active,
.header-bar .raised.linked .button:checked,
.header-bar .raised.linked .button:insensitive,
.header-bar .linked .button,
.header-bar .linked .button:active,
.header-bar .linked .button:checked,
.header-bar .linked .button:insensitive {
    border-width: 1px;
    border-radius: 0;
    border-right-width: 0;
    border-left-width: 0;
}

/* leftmost button */
.header-bar .button.raised.linked:first-child,
.header-bar .button.raised.linked:active:first-child,
.header-bar .button.raised.linked:checked:first-child,
.header-bar .button.raised.linked:insensitive:first-child,
.header-bar .raised.linked .button:first-child,
.header-bar .raised.linked .button:active:first-child,
.header-bar .raised.linked .button:checked:first-child,
.header-bar .raised.linked .button:insensitive:first-child,
.header-bar .linked .button:first-child,
.header-bar .linked .button:active:first-child,
.header-bar .linked .button:checked:first-child,
.header-bar .linked .button:insensitive:first-child {
    border-width: 1px;
    border-radius: 3px;
    border-right-width: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* rightmost button */
.header-bar .button.raised.linked:last-child,
.header-bar .button.raised.linked:active:last-child,
.header-bar .button.raised.linked:checked:last-child,
.header-bar .button.raised.linked:insensitive:last-child,
.header-bar .raised.linked .button:last-child,
.header-bar .raised.linked .button:active:last-child,
.header-bar .raised.linked .button:checked:last-child,
.header-bar .raised.linked .button:insensitive:last-child,
.header-bar .linked .button:last-child,
.header-bar .linked .button:active:last-child,
.header-bar .linked .button:checked:last-child,
.header-bar .linked .button:insensitive:last-child {
    border-width: 1px;
    border-radius: 3px;
    border-left-width: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* linked single button */
.header-bar .button.raised.linked:only-child,
.header-bar .button.raised.linked:active:only-child,
.header-bar .button.raised.linked:checked:only-child,
.header-bar .button.raised.linked:insensitive:only-child,
.header-bar .raised.linked .button:only-child,
.header-bar .raised.linked .button:active:only-child,
.header-bar .raised.linked .button:checked:only-child,
.header-bar .raised.linked .button:insensitive:only-child,
.header-bar .linked .button:only-child,
.header-bar .linked .button:active:only-child,
.header-bar .linked .button:checked:only-child,
.header-bar .linked .button:insensitive:only-child {
    border-width: 1px;
    border-radius: 3px;
}

/***********
 * tooltip *
 ***********/
.tooltip,
.tooltip.background {
    border-width: 1px;
    border-style: solid;
    border-color: alpha(@theme_tooltip_bg_color, 0.9);
    border-radius: 3px;
    background-color: alpha(@theme_tooltip_bg_color, 0.9);
    background-image: none;
    color: @theme_tooltip_fg_color;
}

.tooltip * {
    background-color: transparent;
}

/************
 * treeview *
 ************/
GtkTreeView {
    -GtkTreeView-vertical-separator: 0;
    -GtkWidget-focus-line-width: 1;
    -GtkWidget-focus-padding: 1;
}

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

GtkTreeView .entry {
    border-radius: 0;
    background-color: @theme_base_color;
    background-image: none;
}

GtkTreeView row:nth-child(even) {
    background-color: shade(@theme_base_color, 0.9);
}

GtkTreeView row:nth-child(odd) {
    background-color: shade(@theme_base_color, 1.0);
}

/************
 * viewport *
 ************/
GtkViewport.frame {
    border-width: 0;
}

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

.view:insensitive,
.view:insensitive:insensitive {
    background-color: shade(@theme_base_color, 0.9);
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

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

/**************
 * action-bar *
 **************/
.action-bar {
    padding: 6px;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.0),
                                      shade(@theme_bg_color, 0.88)
                                      );
}

.action-bar .button.text-button {
    padding: 4px;
}

.action-bar .button.image-button {
    padding: 6px;
}

.action-bar .title {
    font: bold;
    padding: 0 12px;
}

.action-bar .subtitle {
    font: smaller;
    padding: 0 12px;
}

/***************
 * search bars *
 ***************/
.search-bar {
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.8);
    background-color: shade(@theme_bg_color, 0.98);
}

.search-bar .button.close-button {
    padding: 4px;
}

/***********
 * dialogs *
 ***********/
GtkMessageDialog,
.prompt {
    -GtkDialog-content-area-border: 0;
    -GtkDialog-action-area-border: 0;
    -GtkDialog-button-spacing: 0;

    margin: 0;
    padding: 0;
}

/********************
 * various choosers *
 ********************/
GtkFontButton .separator,
GtkFileChooserButton .separator {
    /* always disable separators */
    -GtkWidget-wide-separators: true;
    -GtkWidget-horizontal-separator: 0;
    -GtkWidget-vertical-separator: 0;
}

GtkFontButton GtkLabel:last-child {
    color: alpha(currentColor, 0.7);
}

GtkFileChooserButton GtkImage:last-child {
    color: alpha(currentColor, 0.7);
}

/*********************
 * app notifications *
 *********************/
.app-notification {
    border-style: solid;
    border-color: shade(@theme_base_color, 0.7);
    border-width: 0 1px 1px 1px;
    border-radius: 0 0 3px 3px;
    padding: 8px;
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_text_color;
}

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

GtkOverlay.osd {
    background-color: transparent;
}

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

.osd.button,
.osd .button {
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 2px;
    background-color: transparent;
    background-image: none;
    color: @osd_fg;
}

.osd.button:prelight,
.osd.button:hover,
.osd .button:hover {
    border-color: shade(@osd_bg, 0.6);
    background-color: shade(@osd_bg, 1.15);
    background-image: none;
}

.osd.button:active,
.osd.button:checked,
.osd .button:active,
.osd .button:checked,
.osd GtkMenuButton.button:active,
.osd GtkMenuButton.button:checked {
    border-color: shade(@osd_bg, 0.4);
    background-color: shade(@osd_bg, 0.65);
    background-image: linear-gradient(to bottom,
                                      shade(@osd_bg, 0.5),
                                      shade(@osd_bg, 0.75)
                                      );
}

.osd.button:active:hover,
.osd.button:checked:hover,
.osd .button:active:hover,
.osd .button:checked:hover,
.osd GtkMenuButton.button:active:hover {
    border-color: shade(@osd_bg, 0.4);
}

.osd.button:insensitive,
.osd .button:insensitive {
    border-color: transparent;
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd.button:active:insensitive,
.osd.button:checked:insensitive,
.osd .button:active:insensitive,
.osd .button:checked:insensitive {
    background-color: shade(@osd_bg, 0.80);
    background-image: none;
}

.osd.toolbar {
    -GtkToolbar-button-relief: normal;

    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    border-color: shade(@osd_bg, 0.8);
    background-color: @osd_bg;
    background-image: none;
    color: @osd_fg;
}

.osd.toolbar .button {
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@osd_bg, 0.8);
    border-radius: 3px;
    background-color: shade(@osd_bg, 1.05);
    background-image: none;
    color: @osd_fg;
}

.osd.toolbar .button:hover {
    border-color: shade(@osd_bg, 0.7);
    background-color: shade(@osd_bg, 1.15);
    background-image: none;
}

.osd.toolbar .button:active,
.osd.toolbar .button:checked {
    border-color: shade(@osd_bg, 0.8);
    background-color: shade(@osd_bg, 0.95);
    background-image: none;
}

.osd.toolbar .button:active:hover,
.osd.toolbar .button:checked:hover {
    border-color: shade(@osd_bg, 0.7);
}

.osd.toolbar .button:focus,
.osd.toolbar .button:hover:focus,
.osd.toolbar .button:active:focus,
.osd.toolbar .button:checked:focus,
.osd.toolbar .button:active:hover:focus,
.osd.toolbar .button:checked:hover:focus {
    border-color: shade(@osd_bg, 0.7);
}

.osd.toolbar .button:insensitive {
    border-color: shade(@osd_bg, 0.85);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd.toolbar .button:active:insensitive,
.osd.toolbar .button:checked:insensitive {
    border-color: shade(@osd_bg, 0.75);
    background-color: shade(@osd_bg, 0.80);
    background-image: none;
}

.osd.toolbar .button:first-child {
    border-radius: 3px 0 0 3px;
    border-width: 1px 0 1px 1px;
    box-shadow: inset -1px 0 shade(@osd_bg, 0.9);
}

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

.osd.toolbar .button:only-child,
.osd.toolbar GtkToolButton .button,
.osd.toolbar GtkToolButton:only-child .button,
.osd.toolbar GtkToolButton:last-child .button,
.osd.toolbar GtkToolButton:first-child .button {
    border-width: 1px;
    border-radius: 3px;
    border-style: solid;
}

.osd.toolbar .separator {
    color: shade(@osd_bg, 0.9);
}

/* used by gnome-settings-daemon's media-keys OSD */
.osd.trough {
    background-color: shade(@osd_bg, 0.8);
}

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

.osd .scale.slider {
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
    /* we will draw the border using box shadow for now */
    box-shadow: inset 1px 0 shade(@osd_bg, 0.7),
                inset 0 1px shade(@osd_bg, 0.7),
                inset -1px 0 shade(@osd_bg, 0.6),
                inset 0 -1px shade(@osd_bg, 0.6);
}

.osd .scale.slider:hover {
    box-shadow: inset 1px 0 shade(@osd_bg, 0.6),
                inset 0 1px shade(@osd_bg, 0.6),
                inset -1px 0 shade(@osd_bg, 0.5),
                inset 0 -1px shade(@osd_bg, 0.5);
}

.osd .scale.slider:insensitive {
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
    box-shadow: inset 1px 0 shade(@osd_bg, 0.8),
                inset 0 1px shade(@osd_bg, 0.8),
                inset -1px 0 shade(@osd_bg, 0.8),
                inset 0 -1px shade(@osd_bg, 0.8);
}

.osd .scale.trough {
    border-color: shade(@osd_bg, 0.7);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

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

.osd .scale.trough:insensitive,
.osd .scale.trough.highlight:insensitive {
    border-color: shade(@osd_bg, 0.9);
    background-color: shade(@osd_bg, 0.95);
    background-image: none;
}

.osd GtkProgressBar,
GtkProgressBar.osd {
    -GtkProgressBar-xspacing: 0;
    -GtkProgressBar-yspacing: 2px;
    -GtkProgressBar-min-horizontal-bar-height: 2px;

    padding: 0;
}

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

.osd GtkProgressBar.progressbar,
GtkProgressBar.osd.progressbar {
    border-style: none;
    border-radius: 0;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

.osd .view,
.osd.view {
    background-color: @osd_base;
}

.osd .scrollbar.trough {
    background-color: @osd_bg;
}

.osd .scrollbar.slider {
    border-width: 1px;
    border-color: shade(@osd_bg, 0.7);
    border-radius: 0;
    background-color: shade(@osd_bg, 0.9);
}

.osd .scrollbar.slider:hover {
    border-color: shade(@osd_bg, 0.7);
    background-color: shade(@osd_bg, 0.8);
}

.osd .scrollbar.slider:active,
.osd .scrollbar.slider:checked {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
}

.osd GtkIconView.cell:selected,
.osd GtkIconView.cell:selected:focus {
    background-color: transparent;
    border-style: solid;
    border-width: 3px;
    border-color: @osd_fg;
    outline-color: transparent;
}

/* used by Documents */
.osd .page-thumbnail {
    border-style: solid;
    border-width: 1px;
    border-color: shade(@osd_bg, 0.9);
    /* when there's no pixbuf yet */
    background-color: @osd_bg;
}

/******************************
 * destructive action buttons *
 ******************************/
.destructive-action.button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@error_color, 0.8);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@error_color, 1.2), 1.05),
                                      shade(shade(@error_color, 1.2), 0.97)
                                      );

    color: @theme_selected_fg_color;
    box-shadow: none;
}

.destructive-action.button:hover {
    border-color: shade(@error_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(mix(@theme_base_color, @error_color, 0.7), 1.05),
                                      shade(mix(@theme_base_color, @error_color, 0.7), 0.97)
                                      );
}

.destructive-action.button:active,
.destructive-action.button:checked {
    border-color: shade(@error_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@error_color, 1.2), 1.05),
                                      shade(shade(@error_color, 1.2), 0.97)
                                      );
}

.destructive-action.button:hover:active,
.destructive-action.button:hover:checked {
    border-color: shade(@error_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(mix(@theme_base_color, @error_color, 0.7), 1.05),
                                      shade(mix(@theme_base_color, @error_color, 0.7), 0.97)
                                      );
}

/******************************
 * suggested action buttons *
 ******************************/
.suggested-action.button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.8);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.05),
                                      shade(shade(@theme_bg_color, 1.02), 0.97)
                                      );

    color: @theme_fg_color;
}

.suggested-action.button:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

.suggested-action.button:active,
.suggested-action.button:checked {
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.85), 1.05),
                                      shade(shade(@theme_bg_color, 0.85), 0.97)
                                      );
}

.suggested-action.button:hover:active,
.suggested-action.button:hover:checked {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

/******************
 * selection mode *
 ******************/
.selection-mode.header-bar,
.selection-mode.toolbar {
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_selected_bg_color, 1.3),
                                      shade(@theme_selected_bg_color, 1.1)
                                      );

    color: shade(@theme_selected_bg_color, 0.9);
}

.selection-mode.header-bar {
    border-top-color: shade(@theme_selected_bg_color, 1.2);
    border-bottom-color: @theme_selected_bg_color;
}

.selection-mode.toolbar {
    padding: 4px;
}

/* regular button */
.selection-mode.header-bar .button,
.selection-mode.toolbar .button,
.selection-mode.toolbar GtkToolButton .button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.8);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_selected_bg_color, 1.2), 1.05),
                                      shade(shade(@theme_selected_bg_color, 1.2), 0.97)
                                      );

    color: @theme_selected_fg_color;
    box-shadow: none;
}

.selection-mode.header-bar .button:hover,
.selection-mode.toolbar .button:hover,
.selection-mode.toolbar GtkToolButton .button:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 1.05),
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 0.97)
                                      );
}

.selection-mode.header-bar .button:active,
.selection-mode.header-bar .button:checked,
.selection-mode.toolbar .button:active,
.selection-mode.toolbar .button:checked,
.selection-mode.toolbar GtkToolButton .button:active,
.selection-mode.toolbar GtkToolButton .button:checked {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_selected_bg_color, 1.2), 1.05),
                                      shade(shade(@theme_selected_bg_color, 1.2), 0.97)
                                      );
}

.selection-mode.header-bar .button:hover:active,
.selection-mode.header-bar .button:hover:checked,
.selection-mode.toolbar .button:hover:active,
.selection-mode.toolbar .button:hover:checked,
.selection-mode.toolbar GtkToolButton .button:hover:active,
.selection-mode.toolbar GtkToolButton .button:hover:checked {
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 1.05),
                                      shade(mix(@theme_base_color, @theme_selected_bg_color, 0.7), 0.97)
                                      );
}

/* suggested button */
.selection-mode.header-bar .suggested-action.button,
.selection-mode.toolbar .suggested-action.button,
.selection-mode.toolbar GtkToolButton.suggested-action .button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.8);
    border-radius: 3px;
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 1.02), 1.05),
                                      shade(shade(@theme_bg_color, 1.02), 0.97)
                                      );

    color: @theme_fg_color;
}

.selection-mode.header-bar .suggested-action.button:hover,
.selection-mode.toolbar .suggested-action.button:hover,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

.selection-mode.header-bar .suggested-action.button:active,
.selection-mode.header-bar .suggested-action.button:checked,
.selection-mode.toolbar .suggested-action.button:active,
.selection-mode.toolbar .suggested-action.button:checked,
.selection-mode.toolbar GtkToolButton.suggested-action:active,
.selection-mode.toolbar GtkToolButton.suggested-action:checked {
    border-color: shade(@theme_selected_bg_color, 0.7);
    background-image: linear-gradient(to bottom,
                                      shade(shade(@theme_bg_color, 0.85), 1.05),
                                      shade(shade(@theme_bg_color, 0.85), 0.97)
                                      );
}

.selection-mode.header-bar .suggested-action.button:hover:active,
.selection-mode.header-bar .suggested-action.button:hover:checked,
.selection-mode.toolbar .suggested-action.button:hover:active,
.selection-mode.toolbar .suggested-action.button:hover:checked,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover:active,
.selection-mode.toolbar GtkToolButton.suggested-action .button:hover:checked {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to bottom,
                                      shade(@theme_bg_color, 1.15),
                                      shade(@theme_bg_color, 1.07)
                                      );
}

/* menu button */
.selection-mode.header-bar .selection-menu.button,
.selection-mode.toolbar .selection-menu.button {
    border-style: none;
    background-color: transparent;
    background-image: none;
    color: shade(@theme_selected_bg_color, 0.7);
}

.selection-mode.toolbar .dim-label,
.selection-mode.toolbar .selection-menu.button .dim-label {
    color: shade(@theme_selected_bg_color, 0.6);
}

.selection-mode.header-bar .selection-menu.button:hover,
.selection-mode.toolbar .dim-label:hover,
.selection-mode.toolbar .selection-menu.button:hover,
.selection-mode.toolbar .selection-menu.button .dim-label:hover {
    color: shade(@theme_selected_bg_color, 0.6);
}

.selection-mode.header-bar .selection-menu.button:active,
.selection-mode.header-bar .selection-menu.button:checked,
.selection-mode.toolbar .selection-menu.button:active,
.selection-mode.toolbar .selection-menu.button:checked {
    color: shade(@theme_selected_bg_color, 0.7);
    box-shadow: none;
}

/*************************
 * touch text selections *
 *************************/
GtkBubbleWindow {
    border-radius: 3px;
    background-clip: border-box;
}

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

GtkBubbleWindow .toolbar {
    background-color: transparent;
}

/*******
 * CSD *
 *******/
.titlebar {
    border-radius: 4px 4px 0 0;
    background-image: linear-gradient(to bottom,
                                      shade(@titlebar_bg_color, 1.07),
                                      shade(@titlebar_bg_color, 0.88)
                                      );

    color: @titlebar_fg_color;
}

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

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

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

.titlebar .title {
    font: bold;
    color: mix(@titlebar_fg_color, @titlebar_bg_color, 0.3);
    text-shadow: 0 1px shade(@titlebar_bg_color, 1.1);
}

.titlebar:backdrop {
    background-image: linear-gradient(to bottom,
                                      shade(@titlebar_bg_color, 1.12),
                                      shade(@titlebar_bg_color, 0.98)
                                      );
}

.titlebar .title:backdrop {
    color: mix(@titlebar_fg_color, @titlebar_bg_color, 0.6);
    text-shadow: 0 1px shade(@titlebar_bg_color, 1.05);
}

.titlebar .button:backdrop {
    color: mix(@titlebar_fg_color, @titlebar_bg_color, 0.6);
}

.titlebar .titlebutton {
    padding: 4px;
    border-style: none;
    background: none;
    color: mix(@titlebar_fg_color, @titlebar_bg_color, 0.3);
    icon-shadow: 0 1px shade(@titlebar_bg_color, 1.1);
    box-shadow: none;
}

.titlebar .titlebutton:hover,
.titlebar .titlebutton:hover:focus {
    background: none;
    color: @titlebar_fg_color;
    box-shadow: none;
}

.titlebar .titlebutton:active,
.titlebar .titlebutton:checked,
.titlebar .titlebutton:active:hover,
.titlebar .titlebutton:checked:hover {
    background: none;
    color: @theme_selected_bg_color;
    box-shadow: none;
}

.titlebar .titlebutton:backdrop {
    background-image: none;
    color: mix(@titlebar_fg_color, @titlebar_bg_color, 0.6);
    icon-shadow: 0 1px shade(@titlebar_bg_color, 1.05);
}

.window-frame,
.window-frame:backdrop {
    border-style: none;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 6px 22px alpha(black, 0.47),
                0 0 0 1px alpha(black, 0.3);

    /* this is used for the resize cursor area */
    margin: 10px;
}

.window-frame.tiled {
    border-radius: 0;
}

.window-frame.csd.popup {
    border-style: none;
    border-radius: 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.window-frame.csd.tooltip {
    border-radius: 4px;
    box-shadow: none;
}

.window-frame.solid-csd {
    border: solid 1px shade(@theme_bg_color, 0.5);
    border-radius: 0;
    margin: 2px;
    background-color: @theme_bg_color;
    box-shadow: none;
}
