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

/* default */
* {
    engine: none;

    background-clip: padding-box;
    background-origin: border-box;

    border-width: 1px;

    -GtkArrow-arrow-scaling: 0.5;
    -GtkButton-child-displacement-x: 1;
    -GtkButton-child-displacement-y: 1;
    -GtkButton-default-border: 0;
    -GtkButton-image-spacing: 0;
    -GtkButton-inner-border: 1;
    -GtkButton-interior-focus: true;
    -GtkCheckButton-indicator-size: 15;
    -GtkCheckMenuItem-indicator-size: 12;
    -GtkEntry-inner-border: 2;
    -GtkEntry-progress-border: 0;
    -GtkExpander-expander-size: 12;
    -GtkHTML-link-color: @link_color;
    -GtkIMHtml-hyperlink-color: @link_color;
    -GtkMenu-horizontal-padding: 0;
    -GtkMenu-vertical-padding: 0;  
    -GtkMenuBar-internal-padding: 0;
    -GtkMenuItem-arrow-scaling: 0.4;
    -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-size: 0;
    -GtkRange-stepper-spacing: 0;
    -GtkRange-trough-border: 3;
    -GtkRange-trough-under-steppers: 1;
    -GtkScrollbar-activate-slider: 1;
    -GtkScrollbar-min-slider-length: 50;
    -GtkScrollbar-slider-width: 15;
    -GtkScrolledWindow-scrollbar-spacing: 0;
    -GtkScrolledWindow-scrollbars-within-bevel: 1;
    -GtkSeparatorMenuItem-horizontal-padding: 0;
    -GtkStatusbar-shadow-type: none;
    -GtkTextView-error-underline-color: @error_color;
    -GtkToolbar-internal-padding: 0;
    -GtkToolButton-icon-spacing: 6;
    -GtkToolItemGroup-expander-size: 11;
    -GtkTreeView-expander-size: 11;
    -GtkTreeView-vertical-separator: 0;
    -GtkWidget-focus-line-width: 1;
    -GtkWidget-focus-padding: 0;
    -GtkWidget-link-color: @link_color;
    -GtkWidget-separator-height: 1;
    -GtkWidget-separator-width: 1;
    -GtkWidget-visited-link-color: @link_color;
    -GtkWidget-wide-separators: false;
    -GtkWindow-resize-grip-height: 13;
    -GtkWindow-resize-grip-width: 13;
    -WnckTasklist-fade-overlay-rect: 0;
}

GtkWindow {
    color: @theme_fg_color;
}

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

/**********
 * states *
 **********/
*:insensitive {
    color: mix(@theme_fg_color, @theme_bg_color, 0.4);
    text-shadow: 1px 1px alpha(@light_shadow, 0.4);
}

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

*:active:hover:insensitive {
}

*:active:insensitive {
}

*:hover {
}

*:hover:insensitive {
}

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

/******************
 * common effects *
 ******************/
.button,
GtkSwitch.slider {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.4),
                inset -1px 0 alpha(@light_shadow, 0.4);
}

.button:insensitive,
GtkSwitch.slider:insensitive {
    box-shadow: inset 1px 1px alpha(@light_shadow, 0.2),
                inset -1px 0 alpha(@light_shadow, 0.2);
}
.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 {
    box-shadow: inset 1px 1px alpha(@dark_shadow, 0.06),
                inset -1px -1px alpha(@dark_shadow, 0.06);
}

.button:focus,
.button:hover:focus,
.button:active:focus {
    box-shadow: inset 1px 0 alpha(@theme_selected_bg_color, 0.4),
                inset 0 1px alpha(@theme_selected_bg_color, 0.4),
                inset -1px 0 alpha(@theme_selected_bg_color, 0.4),
                inset 0 -1px alpha(@theme_selected_bg_color, 0.4);
}

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

.entry:focus {
    box-shadow: inset 1px 0 alpha(@theme_selected_bg_color, 0.4),
                inset 0 1px alpha(@theme_selected_bg_color, 0.4),
                inset -1px 0 alpha(@theme_selected_bg_color, 0.4),
                inset 0 -1px alpha(@theme_selected_bg_color, 0.4);
}

/* draw borders using box shadow */

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

GtkScale.slider:hover {
    box-shadow: inset 1px 0 shade(@theme_bg_color, 0.5),
                inset 0 1px shade(@theme_bg_color, 0.5),
                inset -1px 0 shade(@theme_bg_color, 0.5),
                inset 0 -1px shade(@theme_bg_color, 0.5);
}

GtkScale.trough {
    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.7),
                inset 0 -1px shade(@theme_bg_color, 0.7);
}

.menubar .menuitem .scale.highlight.left,
.scale.highlight.left,
.scale.highlight.bottom {
    box-shadow: inset 1px 0 shade(@theme_selected_bg_color, 0.7),
                inset 0 1px shade(@theme_selected_bg_color, 0.7),
                inset -1px 0 shade(@theme_selected_bg_color, 0.7),
                inset 0 -1px shade(@theme_selected_bg_color, 0.7);
}

GtkScale.slider:insensitive,
GtkScale.trough:insensitive,
.scale.highlight.left:insensitive,
.scale.highlight.bottom:insensitive {
    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);
}

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

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

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

/**************
 * background *
 **************/
.background {
    background-color: @theme_bg_color;
    border-width: 0;
}

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

    padding: 2px;
}

GtkSwitch.slider,
.button {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 1.02), 1.05)),
                                     to (shade(shade(@theme_bg_color, 1.02), 0.97)));

    border-radius: 1px;
    border-top-color: shade(@theme_bg_color, 0.8);
    border-right-color: shade(@theme_bg_color, 0.72);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    border-left-color: shade(@theme_bg_color, 0.72);
    border-style: solid;
    color: @theme_fg_color;
}

.button:active {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.85), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.85), 0.97)));

    border-color: shade(@theme_bg_color, 0.6);
}

.button:hover,
.button:active:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 1.15)),
                                     to (shade(@theme_bg_color, 1.07)));

    border-top-color: shade(@theme_bg_color, 0.85);
    border-right-color: shade(@theme_bg_color, 0.78);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    border-left-color: shade(@theme_bg_color, 0.78);
}

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

.button:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.95), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.95), 0.97)));

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

.button:insensitive:active {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.95), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.95), 0.97)));
}

/* Dialog buttons */
GtkDialog GtkButtonBox .button {
    border-color: shade(@theme_selected_bg_color, 1.0);
    padding-top: 4px;
    padding-bottom: 4px;
}

GtkDialog .button:active {
    border-color: shade(@theme_selected_bg_color, 1.0);
}

/* middle button */
.linked .entry,
.linked .button,
.linked .button:active,
.linked .button:active:hover,
.linked .button:insensitive,
.primary-toolbar .linked .entry,
.primary-toolbar .linked .button,
.primary-toolbar .linked .button:active,
.primary-toolbar .linked .button:active:hover,
.primary-toolbar .linked .button:insensitive {
    border-width: 1px;
    border-right-width: 0;
    border-radius: 0;
}

/* leftmost button */
.linked .entry:first-child,
.linked .button:first-child,
.linked .button:active:first-child,
.linked .button:active:hover:first-child,
.linked .button:insensitive:first-child,
.primary-toolbar .linked .entry:first-child,
.primary-toolbar .linked .button:first-child,
.primary-toolbar .linked .button:active:first-child,
.primary-toolbar .linked .button:active:hover:first-child,
.primary-toolbar .linked .button:insensitive:first-child {
    border-width: 1px;
    border-right-width: 0;
    border-radius: 3px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* rightmost button */
.linked .entry:last-child,
.linked .button:last-child,
.linked .button:active:last-child,
.linked .button:active:hover:last-child,
.linked .button:insensitive:last-child,
.primary-toolbar .linked .entry:last-child,
.primary-toolbar .linked .button:last-child,
.primary-toolbar .linked .button:active:last-child,
.primary-toolbar .linked .button:active:hover:last-child,
.primary-toolbar .linked .button:insensitive:last-child {
    border-width: 1px;
    border-radius: 1px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* linked single button */
.linked .entry:only-child,
.linked .button:only-child,
.linked .button:active:only-child,
.linked .button:active:hover:only-child,
.linked .button:insensitive:only-child,
.primary-toolbar .linked .entry:only-child,
.primary-toolbar .linked .button:only-child,
.primary-toolbar .linked .button:active:only-child,
.primary-toolbar .linked .button:active:hover:only-child,
.primary-toolbar .linked .button:insensitive:only-child {
    border-width: 1px;
    border-radius: 1px;
}

/****************
 * cell and row *
 ****************/
.cell {
    background-color: @theme_base_color;
    border-radius: 0;
    border-width: 0;
}

row:selected,
row:selected:focus {
    background-color: @theme_selected_bg_color;

    border-color: shade(@theme_selected_bg_color, 0.8);
    border-style: solid;
    border-width: 1px 0;
    color: @theme_selected_fg_color;
}

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

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

column-header .button {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 1.14), 0.98)),
                                     to (shade(shade(@theme_bg_color, 1.14), 1.35)));

    border-color: shade(@theme_bg_color, 0.97);
    border-bottom-color: shade(@theme_bg_color, 0.8);
}

column-header .button:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.98), 0.98)),
                                     to (shade(shade(@theme_bg_color, 0.98), 1.35)));
}

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

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

/************
* gucharmap *
*************/
GucharmapChartable {
    background-color: shade(@theme_base_color, 0.98);
}

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

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

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

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

GtkCalendar.header {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 1.02), 1.05)),
                                     to (shade(shade(@theme_bg_color, 1.02), 0.97)));

    border-radius: 0;
    border-color: shade(@theme_bg_color, 0.8);
    border-style: solid;
    border-width: 1px;
}

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

.highlight,
GtkCalendar.highlight {
    background-color: transparent;
    color: shade(@theme_fg_color, 0.6);
    border-radius: 0;
    padding: 0;
    border-width: 0;
}

/******************
 * 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-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-width: 1px 0 1px 1px;
}

.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:insensitive,
GtkComboBox.combobox-entry .button,
GtkComboBox.combobox-entry .button:hover,
GtkComboBox.combobox-entry .button:active,
GtkComboBox.combobox-entry .button:insensitive {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-width: 1px 1px 1px 1px;
}

GtkComboBox .menu .menuitem:hover,
GtkComboBox .menu .menuitem:active {
  background-color: @theme_base_color;
  color: @theme_text_color;
}

/*********
 * entry *
 *********/
.entry {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_base_color, 0.99)),
                                     to (@theme_base_color));

    border-top-color: shade(@theme_bg_color, 0.6);
    border-right-color: shade(@theme_bg_color, 0.7);
    border-bottom-color: shade(@theme_bg_color, 0.72);
    border-left-color: shade(@theme_bg_color, 0.7);
    border-radius: 1px;
    border-style: solid;
    padding: 3px 5px 3px 5px;
    color: @theme_text_color;
}

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

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

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

.entry.progressbar {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.15)),
                                     to (shade(@theme_selected_bg_color, 0.95)));

    border-radius: 1px;
    border-width: 0;
    color: @theme_selected_fg_color;
}

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

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

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

/************
 * iconview *
 ************/
GtkIconView {
    background-color: transparent;
}

GtkIconView.view.cell:selected,
GtkIconView.view.cell:selected:focus {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.2)),
                                     to (shade(@theme_selected_bg_color, 1.0)));

    border-radius: 1px;
    border-style: solid;
    border-width: 1px;
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 0.8);
}

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

/*********
 * image *
 *********/
GtkImage,
GtkImage:active,
GtkImage:insensitive {
    background-color: transparent;
}

/*********
 * label *
 *********/
GtkLabel,
GtkLabel:active,
GtkLabel:insensitive {
    background-color: transparent;
}

/***********
 * infobar *
 ***********/
.info {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@info_bg_color, 1.1)),
                                     to (shade(@info_bg_color, 1.0)));

    border-style: solid;
    border-width: 1px;
    color: @info_fg_color;
    border-color: shade(@info_bg_color, 0.7);
}

.warning {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@warning_bg_color, 1.1)),
                                     to (shade(@warning_bg_color, 1.0)));

    border-style: solid;
    border-width: 1px;
    color: @warning_fg_color;
    border-color: shade(@warning_bg_color, 0.7);
}

.question {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@question_bg_color, 1.1)),
                                     to (shade(@question_bg_color, 1.0)));

    border-style: solid;
    border-width: 1px;
    color: @question_fg_color;
    border-color: shade(@question_bg_color, 0.7);
}

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

/************
 * gtkstyle *
 ************/
.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.4);
}

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

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

.image:hover {
    color: @theme_fg_color;
}

.image:selected {
    color: @theme_selected_fg_color;
}

/*****************
 * miscellaneous *
 *****************/
.floating-bar {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 1.2)),
                                     to (shade(@theme_bg_color, 0.9)));

    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 1px;
    border-width: 1px;
    border-style: solid;
}

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

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

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

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

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

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

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

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

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

.grip {
    background-color: transparent;
}

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

.primary-toolbar .button .menu,
.toolbar .menu,
.toolbar .primary-toolbar .menu,
.menu {
    padding: 0;
    border-radius: 0;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_fg_color, 0.5);
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}

.menu.button:hover,
.menu.button:active,
.menu.button:active:insensitive,
.menu.button:insensitive,
.menu.button {
    background-color: shade(@theme_fg_color, 0.2);
    background-image: none;
    border-style: none;
}

/* borders for menus */
.menu {
    border-style: solid;
    border: 1px solid shade(@theme_fg_color, 0.5);
}

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

    border-style: none;
}

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

.menubar.menuitem:hover,
.menubar .menuitem:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.1)),
                                     to (shade(@theme_selected_bg_color, 0.9)));

    border-color: shade(@theme_selected_bg_color, 1.1);
    color: @theme_selected_fg_color;
}

.menubar .menuitem *:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@selected_bg_color, 1.1)),
                                     to (shade(@selected_bg_color, 0.9)));

    color: @theme_selected_fg_color;
}

/************
 * menuitem *
 ************/
GtkTreeMenu .menuitem {
    padding: 0;

    border-style: none;
}

GtkTreeMenu .menuitem * {
    color: @dark_fg_color;
}

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

.menu .menuitem:active,
.menu .menuitem:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.1)),
                                     to (shade(@theme_selected_bg_color, 0.9)));
    border-width: 1px;
    border-radius: 0;
    border-color: shade(@theme_selected_bg_color, 0.9);
}

.menu .menuitem:active,
.menu .menuitem *:active,
.menu .menuitem:hover,
.menu .menuitem *:hover {
    color: @theme_selected_fg_color;
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.1)),
                                     to (shade(@theme_selected_bg_color, 0.9)));
}

.menu .menuitem:insensitive,
.menu .menuitem *:insensitive {
    color: shade(@theme_fg_color, 0.5);
    text-shadow: none;
}

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

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

.menuitem GtkCalendar,
.menuitem GtkCalendar.button,
.menuitem GtkCalendar.header,
.menuitem GtkCalendar.view {
    background-color: transparent;
    background-image: none;
    border: 0;
}

.menuitem .entry {
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_fg_color;
    border-color: shade(@theme_bg_color, 0.7);
}

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

.menuitem .accelerator:insensitive {
    color: alpha(mix(@dark_fg_color, @dark_bg_color, 0.5), 0.6);
}

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

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

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

.notebook tab GtkLabel {
    padding: 1px 1px 2px 1px;
}

.notebook tab.top {
    padding: 3px;
    border-radius: 1px 1px 0 0;
}

.notebook tab.top:active {
    padding: 4px 3px;
    border-width: 1px 1px 0 1px;
}

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

.notebook tab.right:active {
    padding: 3px 4px;
    border-width: 1px 1px 1px 0;
}

.notebook tab.bottom {
    padding: 3px;
    border-radius: 0 0 1px 1px;
}

.notebook tab.bottom:active {
    padding: 4px 3px;
    border-width: 0 1px 1px 1px;
}

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

.notebook tab.left:active {
    padding: 3px 4px;
    border-width: 1px 0 1px 1px;
}

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

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

.progressbar,
.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focus {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.15)),
                                     to (shade(@theme_selected_bg_color, 0.95)));

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

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

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

.trough,
.trough row,
.trough row:hover,
.trough row:selected,
.trough row:selected:focus {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 0.95)),
                                     to (shade(@theme_bg_color, 1.15)));

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

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

    border-color: shade(@theme_bg_color, 0.7);
}

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

.level-bar.fill-block {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.15)),
                                     to (shade(@theme_selected_bg_color, 0.95)));

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

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

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

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

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

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

*/

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

    border-color: shade(@success_color, 0.85);
}

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

    border-color: shade(@warning_bg_color, 0.80);
}

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

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

GtkScale.vertical {
    -GtkScale-slider-length: 13;
}

GtkScale.slider {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 1.30), 1.2)),
                                     to (shade(shade(@theme_bg_color, 1.30), 0.97)));
    border: 1px solid shade(@theme_bg_color, 0.7);
    border-radius: 7px;
    color: transparent;
}

GtkScale.slider:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(mix(@theme_bg_color, shade(@theme_selected_bg_color, 0.9), 0.4), 1.2)),
                                     to (shade(mix(@theme_bg_color, shade(@theme_selected_bg_color, 0.9), 0.4),0.97)));
}

GtkScale.slider:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 0.99)),
                                     to (shade(@theme_bg_color, 0.95)));
}

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

GtkScale.trough {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.8), 0.9)),
                                     to (shade(shade(@theme_bg_color, 0.8), 1.1)));
    border-color: transparent;
    border-width: 5px 0;
    border-radius: 7px;
}

GtkScale.trough.vertical {
    background-image: -gtk-gradient(linear, left top, right top,
                                     from (shade(shade(@theme_bg_color, 0.8), 0.9)),
                                     to (shade(shade(@theme_bg_color, 0.8), 1.1)));

    border-color: transparent;
    border-width: 0 5px;
    border-radius: 7px;
}

.menubar .menuitem .scale.highlight.left,
.scale.highlight.left {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                    from (shade(shade(@theme_selected_bg_color, 0.9), 1.1)),
                                    to (shade(shade(@theme_selected_bg_color, 0.9), 0.9)));

    /* we will draw the border using box shadow for now */
    border-color: transparent;
}

.scale.highlight.bottom {
    background-image: -gtk-gradient(linear, left top, right top,
                                    from (shade(shade(@theme_selected_bg_color, 0.9), 1.1)),
                                    to (shade(shade(@theme_selected_bg_color, 0.9), 0.9)));

    /* we will draw the border using box shadow for now */
    border-color: transparent;
}

GtkScale.trough:insensitive,
.scale.highlight.left:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 0.99)),
                                     to (shade(@theme_bg_color, 0.95)));
}

GtkScale.trough.vertical:insensitive,
.scale.highlight.bottom:insensitive {
    background-image: -gtk-gradient(linear, left top, right top,
                                     from (shade(@theme_bg_color, 0.99)),
                                     to (shade(@theme_bg_color, 0.95)));
}

/*************
 * scrollbar *
 *************/
.scrollbar {
    background-image: none;
    border-style: solid;
}

.scrollbar.trough,
.scrollbar.trough.vertical {
    background-image: -gtk-gradient(linear, left top, right top,
                                     from (shade(@theme_bg_color, 1.1)),
                                     to (shade(@theme_bg_color, 1.3)));

    border-width: 0;
    border-radius: 0
}

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

    border-radius: 0;
}

.scrollbar.slider,
.scrollbar.button,
.scrollbar.slider.vertical,
.scrollbar.button.vertical {
    background-image: -gtk-gradient(linear, left top, right top,
                                     from (shade(shade(@theme_bg_color, 0.9), 1.2)),
                                     to (shade(shade(@theme_bg_color, 0.9), 1.15)));

    border-width: 1px;
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 10px;
    color: shade(@theme_bg_color, 0.6);
}

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

    border-width: 1px;
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 10px;
}

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

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

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

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

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

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

/*************
 * separator *
 *************/
.view.separator,
.separator {
    color: shade(@theme_bg_color, 0.8);
    border-color: shade(@theme_bg_color, 0.8);
    border-style: solid;
}

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

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

.menuitem.separator {
	color: shade(@dark_bg_color, 0.8);
	background-color: transparent;
    padding: 3px 15px;
}

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

/***********
 * sidebar *
 ***********/

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

/**************
 * spinbutton *
 **************/
.spinbutton.button:active,
.spinbutton.button:insensitive,
.spinbutton.button {
    border-radius: 0;
    border-width: 0 0 0 1px;
}

.spinbutton.button:active:last-child,
.spinbutton.button:insensitive:last-child,
.spinbutton.button:last-child {
    border-radius: 0 1px 1px 0;
}

.spinbutton.button {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 1.02), 1.05)),
                                     to (shade(shade(@theme_bg_color, 1.02), 0.97)));

    border-top-color: shade(@theme_bg_color, 0.8);
    border-right-color: shade(@theme_bg_color, 0.72);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    border-left-color: shade(@theme_bg_color, 0.72);
}

.spinbutton.button:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.95), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.95), 0.97)));

    border-color: shade(@theme_bg_color, 0.8);
    color: mix(@theme_fg_color, @theme_bg_color, 0.4);
}

/***********
 * spinner *
 ***********/
.menu.spinner,
.primary-toolbar .spinner,
.primary-toolbar .spinner {
    color: @theme_selected_bg_color;
}

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

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

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

GtkSwitch.trough {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 0.95)),
                                     to (shade(@theme_bg_color, 1.15)));

    color: @theme_fg_color;
    border-color: shade(@theme_bg_color, 0.7);
}

GtkSwitch.trough:active {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 0.95)),
                                     to (shade(@theme_selected_bg_color, 1.15)));

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

GtkSwitch.trough:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.95), 0.95)),
                                     to (shade(shade(@theme_bg_color, 0.95), 1.15)));

    color: mix(@theme_fg_color, @theme_bg_color, 0.4);
    border-color: shade(@theme_bg_color, 0.8);
}

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

/***********
 * toolbar *
 ***********/
.toolbar {
    border-style: none;
    padding: 2px;
}

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

    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 1.0)),
                                     to (shade(@theme_bg_color, 0.88)));

    border-color: shade(@theme_bg_color, 0.7);
    border-style: solid;
    border-width: 0 0 1px 0;
    padding: 2px;
    color: @theme_fg_color;
}

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

.primary-toolbar .raised .button,
.primary-toolbar .raised.button,
.primary-toolbar .button:hover,
.primary-toolbar .button:active,
.primary-toolbar .button:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 1.15)),
                                     to (shade(@theme_bg_color, 1.07)));

    border-color: shade(@theme_bg_color, 0.7);
}

.primary-toolbar .button:active {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.85), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.85), 0.97)));

    border-color: shade(@theme_bg_color, 0.6);
}

.primary-toolbar .button:active:hover {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 1.15)),
                                     to (shade(@theme_bg_color, 1.07)));

    border-top-color: shade(@theme_bg_color, 0.85);
    border-right-color: shade(@theme_bg_color, 0.78);
    border-bottom-color: shade(@theme_bg_color, 0.7);
    border-left-color: shade(@theme_bg_color, 0.78);
}

.primary-toolbar .button:active:insensitive,
.primary-toolbar .button:insensitive {
    border-color: shade(@theme_bg_color, 0.8);
}

.primary-toolbar .button:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.95), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.95), 0.97)));
}

.primary-toolbar .button:active:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.95), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.95), 0.97)));
}

.primary-toolbar .entry,
.primary-toolbar .entry:active,
.primary-toolbar .entry:focus {
    border-radius: 1px;
}

.primary-toolbar GtkSeparatorToolItem,
.primary-toolbar .separator,
.primary-toolbar .separator:insensitive {
    border-color: transparent;
}

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

    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_bg_color, 0.93)),
                                     to (@theme_bg_color));

    border-color: shade(@theme_bg_color, 0.8);
    border-radius: 0;
    border-style: solid;
    border-width: 1px;
    padding: 2px 3px 3px 3px;
}

.inline-toolbar.toolbar:last-child {
    border-bottom-color: shade(@theme_bg_color, 0.76);
    border-color: shade(@theme_bg_color, 0.7);
    border-radius: 0 0 1px 1px;
    border-width: 0 1px 1px 1px;
}

.inline-toolbar.toolbar .button {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 1.02), 1.05)),
                                     to (shade(shade(@theme_bg_color, 1.02), 0.97)));

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

.inline-toolbar.toolbar .button *:insensitive,
.inline-toolbar.toolbar GtkToolButton .button:insensitive {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(shade(@theme_bg_color, 0.95), 1.05)),
                                     to (shade(shade(@theme_bg_color, 0.95), 0.97)));

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

/* middle button */
.primary-toolbar .button.raised.linked,
.primary-toolbar .button.raised.linked:active,
.primary-toolbar .button.raised.linked:focus,
.primary-toolbar .button.raised.linked:focus:active,
.primary-toolbar .button.raised.linked:insensitive,
.primary-toolbar .raised.linked .button,
.primary-toolbar .raised.linked .button:active,
.primary-toolbar .raised.linked .button:focus,
.primary-toolbar .raised.linked .button:focus:active,
.primary-toolbar .raised.linked .button:insensitive,
.inline-toolbar.toolbar .button,
.inline-toolbar.toolbar .button:active,
.inline-toolbar.toolbar .button:focus,
.inline-toolbar.toolbar .button:focus:active,
.inline-toolbar.toolbar .button:insensitive,
.inline-toolbar.toolbar GtkToolButton .button,
.inline-toolbar.toolbar GtkToolButton .button:active,
.inline-toolbar.toolbar GtkToolButton .button:focus,
.inline-toolbar.toolbar GtkToolButton .button:focus:active,
.inline-toolbar.toolbar GtkToolButton .button:insensitive {
    border-right-width: 0;
    border-left-width: 1px;
    border-radius: 0;
}

/* leftmost button */
.primary-toolbar .button.raised.linked:first-child,
.primary-toolbar .button.raised.linked:active:first-child,
.primary-toolbar .button.raised.linked:focus:first-child,
.primary-toolbar .button.raised.linked:focus:active:first-child,
.primary-toolbar .button.raised.linked:insensitive:first-child,
.primary-toolbar .raised.linked .button:first-child,
.primary-toolbar .raised.linked .button:active:first-child,
.primary-toolbar .raised.linked .button:focus:first-child,
.primary-toolbar .raised.linked .button:focus:active:first-child,
.primary-toolbar .raised.linked .button:insensitive:first-child,
.inline-toolbar.toolbar .button:first-child,
.inline-toolbar.toolbar .button:active:first-child,
.inline-toolbar.toolbar .button:focus:first-child,
.inline-toolbar.toolbar .button:focus:active:first-child,
.inline-toolbar.toolbar .button:insensitive:first-child,
.inline-toolbar.toolbar GtkToolButton:first-child .button,
.inline-toolbar.toolbar GtkToolButton:first-child .button:active,
.inline-toolbar.toolbar GtkToolButton:first-child .button:focus,
.inline-toolbar.toolbar GtkToolButton:first-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:first-child .button:insensitive {
    border-left-width: 1px;
    border-right-width: 1px;
    border-radius: 1px 0 0 1px;
}

/* rightmost button */
.primary-toolbar .button.raised.linked:last-child,
.primary-toolbar .button.raised.linked:active:last-child,
.primary-toolbar .button.raised.linked:focus:last-child,
.primary-toolbar .button.raised.linked:focus:active:last-child,
.primary-toolbar .button.raised.linked:insensitive:last-child,
.primary-toolbar .raised.linked .button:last-child,
.primary-toolbar .raised.linked .button:active:last-child,
.primary-toolbar .raised.linked .button:focus:last-child,
.primary-toolbar .raised.linked .button:focus:active:last-child,
.primary-toolbar .raised.linked .button:insensitive:last-child,
.inline-toolbar.toolbar .button:last-child,
.inline-toolbar.toolbar .button:active:last-child,
.inline-toolbar.toolbar .button:focus:last-child,
.inline-toolbar.toolbar .button:focus:active:last-child,
.inline-toolbar.toolbar .button:insensitive:last-child,
.inline-toolbar.toolbar GtkToolButton:last-child .button,
.inline-toolbar.toolbar GtkToolButton:last-child .button:active,
.inline-toolbar.toolbar GtkToolButton:last-child .button:focus,
.inline-toolbar.toolbar GtkToolButton:last-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:last-child .button:insensitive {
    border-left-width: 0;
    border-right-width: 1px;
    border-radius: 0 1px 1px 0;
}

/* single button */
.primary-toolbar.toolbar .button:only-child,
.primary-toolbar.toolbar .button:active:only-child,
.primary-toolbar.toolbar .button:focus:only-child,
.primary-toolbar.toolbar .button:focus:active:only-child,
.primary-toolbar.toolbar .button:insensitive:only-child,
.primary-toolbar.toolbar GtkToolButton:only-child .button,
.primary-toolbar.toolbar GtkToolButton:only-child .button:active,
.primary-toolbar.toolbar GtkToolButton:only-child .button:focus,
.primary-toolbar.toolbar GtkToolButton:only-child .button:focus:active,
.primary-toolbar.toolbar GtkToolButton:only-child .button:insensitive,
.inline-toolbar.toolbar .button:only-child,
.inline-toolbar.toolbar .button:active:only-child,
.inline-toolbar.toolbar .button:focus:only-child,
.inline-toolbar.toolbar .button:focus:active:only-child,
.inline-toolbar.toolbar .button:insensitive:only-child,
.inline-toolbar.toolbar GtkToolButton:only-child .button,
.inline-toolbar.toolbar GtkToolButton:only-child .button:active,
.inline-toolbar.toolbar GtkToolButton:only-child .button:focus,
.inline-toolbar.toolbar GtkToolButton:only-child .button:focus:active,
.inline-toolbar.toolbar GtkToolButton:only-child .button:insensitive {
    border-right-width: 1px;
    border-left-width: 1px;
}

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

.tooltip * {
    background-color: transparent;
}

/************
 * treeview *
 ************/
GtkTreeView {
}

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

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

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

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

/************
 * viewport *
 ************/
GtkViewport {
    background-color: transparent;
}

GtkViewport.frame {
    border-width: 0;
}

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

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