/**********
 * button *
 **********/
 
button,
spinbutton.vertical button,
toolbar.inline-toolbar button,
toolbar.primary-toolbar button.raised,
toolbar.primary-toolbar button.raised,
.primary-toolbar combobox button.combo,
switch slider,
/* no hover effects */
button:hover,
button.default:hover,
spinbutton.vertical button:hover,
toolbar.inline-toolbar button:hover,
toolbar.primary-toolbar button.raised:hover,
toolbar.primary-toolbar button.raised:hover,
.primary-toolbar combobox button.combo:hover {
	border-style: solid;
	border-width: 1px;
	box-shadow: inset -2px 0 shade(@theme_bg_color, 0.65),
				inset 0 -2px shade(@theme_bg_color, 0.65),
				inset 1px 0 white,
				inset 0 1px white;
	border-color: black;
	border-radius: 3px;
}

button:active,
button:active:hover,
button.default:active,
button.default:active:hover,
spinbutton.vertical button:active,
spinbutton.vertical button:active:hover,
toolbar.inline-toolbar button:active,
toolbar.inline-toolbar button:active:hover,
toolbar.primary-toolbar button.raised:active,
toolbar.primary-toolbar button.raised:active:hover,
.primary-toolbar .raised button:active,
.primary-toolbar .raised button:active:hover,
.primary-toolbar combobox button.combo:active,
.primary-toolbar combobox button.combo:active:hover,
switch trough,
switch trough:active,
button.flat.link.text-button:active,
button.flat.link.text-button:active:hover,
scaleButtonbutton:active,
scaleButtonbutton:active:hover,
notebook tab button:active,
notebook tab button:active:hover,
.floating-bar button:active,
.floating-bar button:active:hover,
#gtk-scalebutton-popup-window button:active,
#gtk-scalebutton-popup-window button:active:hover {
border-style: solid;
	border-width: 2px;
	box-shadow: inset 2px 0 shade(@theme_bg_color, 0.65),
				inset 0 2px shade(@theme_bg_color, 0.65),
				inset -1px 0 white,
				inset 0 -1px white;
	border-color: black;
	border-radius: 3px;
}

button:disabled,
button:disabled:active,
button.default:disabled,
button.default:disabled:active,
spinbutton.vertical button:disabled,
spinbutton.vertical button:disabled:active,
toolbar.inline-toolbar button:disabled,
toolbar.inline-toolbar button:disabled:active,
toolbar.primary-toolbar button.raised:disabled,
toolbar.primary-toolbar button.raised:disabled,
toolbar.primary-toolbar button.raised:disabled:active,
toolbar.primary-toolbar button.raised:disabled:active,
.primary-toolbar combobox button.combo:disabled,
.primary-toolbar combobox button.combo:disabled:active,
switch slider:disabled,
switch slider:disabled:active,
switch trough:disabled,
switch trough:disabled:active,
button.flat.link.text-button:disabled,
button.flat.link.text-button:disabled:active,
scaleButtonbutton:disabled,
scaleButtonbutton:disabled:active,
notebook tab button:disabled,
notebook tab button:disabled:active,
.floating-bar button:disabled,
.floating-bar button:disabled:active,
#gtk-scalebutton-popup-window button:disabled,
#gtk-scalebutton-popup-window button:disabled:active {
	border-style: solid;
	border-width: 1px;
	box-shadow: inset -2px 0 shade(@theme_bg_color, 0.8),
				inset 0 -2px shade(@theme_bg_color, 0.8),
				inset 2px 0 rgba(255,255,255,0.6),
				inset 0 2px rgba(255,255,255,0.6);
	border-color: gray;
	border-radius: 3px;
}

button.default,
button.default:hover,
button.default:active {
    border: 2px solid @button_borders;
    border-image: none;
}

/**************************
* Primary toolbar buttons *
**************************/

toolbar.primary-toolbar button,
toolbar.primary-toolbar button:disabled,
toolbar.primary-toolbar button:disabled:active,
GtkHandleBox.dock toolbar button,
GtkHandleBox.dock toolbar button:disabled,
GtkHandleBox.dock toolbar button:disabled:active {
    border: 1px solid transparent;
    border-radius: 3.5px;
    border-image: none;
    box-shadow: none;
}

toolbar.primary-toolbar button:hover,
GtkHandleBox.dock combobox button.combo:hover {
    border: 1px solid #cecec3;
    box-shadow: none;
}

toolbar.primary-toolbar button:active,
toolbar.primary-toolbar button:active:hover,
GtkHandleBox.dock combobox button.combo:checked,
GtkHandleBox.dock combobox button.combo:checked:hover {
    border: 1px solid #9d9d92;
    box-shadow: none;
}

/****************
 * Flat Buttons *
 ****************/
button.flat.link.text-button,
scaleButtonbutton,
notebook tab button,
.floating-bar button,
#gtk-scalebutton-popup-window button {
	border: 1px solid transparent;
	box-shadow: none;
}
 
button.flat.link.text-button:hover,
scaleButtonbutton:hover,
notebook tab button:hover,
.floating-bar button:hover,
#gtk-scalebutton-popup-window button:hover {
	border: 1px solid @button_borders;
	box-shadow: none;
}

.floating-bar button,
.floating-bar button:hover,
.floating-bar button:active,
.floating-bar button:active:hover,
#gtk-scalebutton-popup-window button,
#gtk-scalebutton-popup-window button:hover,
#gtk-scalebutton-popup-window button:active,
#gtk-scalebutton-popup-window button:active:hover {
	border-radius: 0;
}

/*****************
 * column-header *
 *****************/

treeview header button,
treeview header button,
treeview header button:disabled,
treeview header button:disabled {
    border: 3px solid transparent;
    border-radius: 0;
    border-image: url("Treeview/tree_header.png");
    border-image-slice: 3 3 3 3;
    box-shadow: none;
}

treeview header button:hover,
treeview header button:hover {
    border: 3px solid transparent;
    border-radius: 0;
    border-image: url("Treeview/tree_header-hover.png");
    border-image-slice: 3 3 3 3;
    box-shadow: none;
}

treeview header button:active,
treeview header button:active,
treeview header button:active:hover,
treeview header button:active:hover {
    border: 3px solid transparent;
    border-radius: 0;
    border-image: url("Treeview/tree_header-active.png");
    border-image-slice: 3 3 3 3;
    box-shadow: none;
}

/*********
 * entry *
 *********/

entry,
comboboxcombobox entry button {
    border-style: solid;
    border-width: 1px;
    border-radius: 0;
    border-color: @entry_borders;
}

entry:disabled {
    border-color: @insensitive_entry_borders_color;
}

/***************
 * progressbar *
 ***************/

trough,
trough.vertical {
	border: 1px solid #686868;
    border-radius: 3px;
    box-shadow: inset 0.5px 0.5px 0px 1.5px #efefef, 
                inset 1px 1px #bebebe;
}

trough row {
	border: 1px solid mix(@theme_bg_color, black, 0.45);
	border-radius: 0px;
	box-shadow: none;
}

trough row:selected,
trough row:selected:focus {
	border: 1px solid alpha(@theme_bg_color, 0.6);
	border-radius: 0;
	box-shadow: none;
}

/**************
 * Spinbutton *
 **************/

spinbutton.vertical button:first-child {
    border-radius: 3.5px 3.5px 0 0;
}

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

spinbutton.verticalentry {
    border-width: 0 1px;
    border-style: solid;
    border-color: @button_borders;
    border-radius: 0;
    border-image: none;
    box-shadow: none;
}

spinbutton.verticalentry:disabled {
    border-color: @insensitive_borders_color;
}

/******************
 * Linked Entries *
 ******************/

.linked entry:first-child,
.linked entry:only-child,
.primary-toolbar .linked entry:first-child,
.primary-toolbar .linked entry:only-child {
    border-width: 1px;
}


.linked entry,
.linked entry:last-child,
.primary-toolbar .linked entry,
.primary-toolbar .linked entry:last-child {
    border-width: 1px 1px 1px 0;
}

/********************************************
 * Linked borders and shadows - Nomal/Hover *
 ********************************************/
 
/* Middle Button */

.linked button,
.linked button:hover,

toolbar button.raised.linked,
toolbar .raised.linked button,
toolbar button.raised.linked:hover,
toolbar .raised.linked button:hover,

.primary-toolbar .linked button,
.primary-toolbar .linked button:hover,
.primary-toolbar .raised .linked button,
.primary-toolbar .raised .linked button:hover,

toolbar.primary-toolbar button.raised.linked,
toolbar.primary-toolbar .raised.linked button,
toolbar.primary-toolbar button.raised.linked:hover,
toolbar.primary-toolbar .raised.linked button:hover,

toolbar.inline-toolbar button,
toolbar.inline-toolbar button:hover,
toolbar.inline-toolbar button:disabled,

.inline-toolbartoolbar toolbutton > button,
.inline-toolbartoolbar toolbutton > button:hover,
.inline-toolbartoolbar toolbutton > button:disabled {
	border-width: 1px 1px 1px 0;
	border-radius: 0;
}

/* Leftmost button */

.linked button:first-child,
.linked button:first-child:hover,

toolbar button.raised.linked:first-child,
toolbar .raised.linked button:first-child,
toolbar button.raised.linked:first-child:hover,
toolbar .raised.linked button:first-child:hover,

.primary-toolbar .linked button:first-child,
.primary-toolbar .linked button:first-child:hover,

toolbar.primary-toolbar button.raised.linked:first-child,
toolbar.primary-toolbar .raised.linked button:first-child,
toolbar.primary-toolbar button.raised.linked:first-child:hover,
toolbar.primary-toolbar .raised.linked button:first-child:hover,

toolbar.inline-toolbar button:first-child,
toolbar.inline-toolbar button:first-child:hover,

.inline-toolbartoolbar toolbutton:first-child > button,
.inline-toolbartoolbar toolbutton:first-child > button:hover {
	border-width: 1px;
	border-radius: 3.5px 0 0 3.5px;
}

/* Rightmost button */

.linked button:last-child,
.linked button:last-child:hover,

toolbar button.raised.linked:last-child,
toolbar .raised.linked button:last-child,
toolbar button.raised.linked:last-child:hover,
toolbar .raised.linked button:last-child:hover,

.primary-toolbar .linked button:last-child,
.primary-toolbar .linked button:last-child:hover,

toolbar.primary-toolbar button.raised.linked:last-child,
toolbar.primary-toolbar .raised.linked button:last-child,
toolbar.primary-toolbar button.raised.linked:last-child:hover,
toolbar.primary-toolbar .raised.linked button:last-child:hover,

toolbar.inline-toolbar button:last-child,
toolbar.inline-toolbar button:hover:last-child,

.inline-toolbartoolbar toolbutton:last-child > button,
.inline-toolbartoolbar toolbutton:last-child > button:hover {
	border-width: 1px 1px 1px 0;
	border-radius: 0 3.5px 3.5px 0;
}

/* Single button */

.linked button:only-child,
.linked button:only-child:hover,

toolbar button.raised.linked:only-child,
toolbar .raised.linked button:only-child,
toolbar button.raised.linked:only-child:hover,
toolbar .raised.linked button:only-child:hover,

.primary-toolbar .linked button:only-child,
.primary-toolbar .linked button:only-child:hover,

toolbar.primary-toolbar button.raised.linked:only-child,
.primary-toolbar .raised.linked button:only-child,
toolbar.primary-toolbar button.raised.linked:only-child:hover,
.primary-toolbar .raised.linked button:only-child:hover,

toolbar.inline-toolbar button:only-child,
toolbar.inline-toolbar button:only-child:hover,

.inline-toolbartoolbar toolbutton:only-child > button,
.inline-toolbartoolbar toolbutton:only-child > button:hover {
	border-width: 1px;
	border-radius: 3.5px;
}

/*********************************
* Linked Button Borders - Active *
**********************************/

/* Middle button */

.linked button:active,
.linked button:active:hover,

toolbar button.raised.linked:active,
toolbar .raised.linked button:active,
toolbar button.raised.linked:active:hover,
toolbar .raised.linked button:active:hover,

.primary-toolbar .linked button:active,
.primary-toolbar .linked button:active:hover,

toolbar.primary-toolbar button.raised.linked:active,
.primary-toolbar .raised.linked button:active,
toolbar.primary-toolbar button.raised.linked:active:hover,
.primary-toolbar .raised.linked button:active:hover,

toolbar.inline-toolbar button:active,
toolbar.inline-toolbar button:active:hover,

.inline-toolbartoolbar toolbutton > button:active,
.inline-toolbartoolbar toolbutton > button:active:hover {
}

/* Leftmost button */

.linked button:first-child:active,
.linked button:first-child:active:hover,

toolbar button.raised.linked:first-child:active,
toolbar .raised.linked button:first-child:active,
toolbar button.raised.linked:first-child:active:hover,
toolbar .raised.linked button:first-child:active:hover,

.primary-toolbar .linked button:first-child:active,
.primary-toolbar .linked button:first-child:active:hover,

toolbar.primary-toolbar button.raised.linked:first-child:active,
toolbar.primary-toolbar .raised.linked button:first-child:active,
toolbar.primary-toolbar button.raised.linked:first-child:active:hover,
toolbar.primary-toolbar .raised.linked button:first-child:active:hover,

toolbar.inline-toolbar button:first-child:active,
toolbar.inline-toolbar button:first-child:active:hover,

.inline-toolbartoolbar toolbutton:first-child > button:active,
.inline-toolbartoolbar toolbutton:first-child > button:active:hover {
}

/* Rightmost button */

.linked button:last-child:active,
.linked button:last-child:active:hover,

toolbar button.raised.linked:last-child:active,
toolbar .raised.linked button:last-child:active,
toolbar button.raised.linked:last-child:active:hover,
toolbar .raised.linked button:last-child:active:hover,

.primary-toolbar .linked button:last-child:active,
.primary-toolbar .linked button:last-child:active:hover,

toolbar.primary-toolbar button.raised.linked:last-child:active,
toolbar.primary-toolbar .raised.linked button:last-child:active,
toolbar.primary-toolbar button.raised.linked:last-child:active:hover,
toolbar.primary-toolbar .raised.linked button:last-child:active:hover,

toolbar.inline-toolbar button:last-child:active,
toolbar.inline-toolbar button:last-child:active:hover,

.inline-toolbartoolbar toolbutton:last-child > button:active,
.inline-toolbartoolbar toolbutton:last-child > button:active:hover {
}

/* Single button */

.linked button:only-child:active,
.linked button:only-child:active:hover,

toolbar button.raised.linked:only-child:active,
toolbar .raised.linked button:only-child:active,
toolbar button.raised.linked:only-child:active:hover,
toolbar .raised.linked button:only-child:active:hover,

.primary-toolbar .linked button:only-child:active,
.primary-toolbar .linked button:only-child:active:hover,

toolbar.primary-toolbar button.raised.linked:only-child:active,
.primary-toolbar .raised.linked button:only-child:active,
toolbar.primary-toolbar button.raised.linked:only-child:active:hover,
.primary-toolbar .raised.linked button:only-child:active:hover,

toolbar.inline-toolbar button:only-child:active,
toolbar.inline-toolbar button:only-child:active:hover,

.inline-toolbartoolbar toolbutton:only-child > button:active,
.inline-toolbartoolbar toolbutton:only-child > button:active:hover {
}

/********************************************
 * Linked borders and shadows - Insensitive *
 ********************************************/

/* Middle Button */

.linked button:disabled,

toolbar button.raised.linked:disabled,
toolbar .raised.linked button:disabled,

.primary-toolbar .linked button:disabled,

toolbar.primary-toolbar button.raised.linked:disabled,
toolbar.primary-toolbar .raised.linked button:disabled,

toolbar.inline-toolbar button:disabled,

.inline-toolbartoolbar toolbutton > button:disabled {
}

/* Leftmost button */

.linked button:first-child:disabled,

toolbar button.raised.linked:first-child:disabled,
toolbar .raised.linked button:first-child:disabled,

.primary-toolbar .linked button:first-child:disabled,

toolbar.primary-toolbar button.raised.linked:first-child:disabled,
toolbar.primary-toolbar .raised.linked button:first-child:disabled, 

toolbar.inline-toolbar button:first-child:disabled,

.inline-toolbartoolbar toolbutton:first-child > button:disabled {
}

/* Rightmost button */

.linked button:last-child:disabled,

toolbar button.raised.linked:last-child:disabled,
toolbar .raised.linked button:last-child:disabled,

.primary-toolbar .linked button:last-child:disabled,

toolbar.primary-toolbar button.raised.linked:last-child:disabled,
toolbar.primary-toolbar .raised.linked button:last-child:disabled, 

toolbar.inline-toolbar button:last-child:disabled,

.inline-toolbartoolbar toolbutton:last-child > button:disabled {
}

/* Single button */

.linked button:only-child:disabled,

toolbar button.raised.linked:only-child:disabled,
toolbar .raised.linked button:only-child:disabled,

.primary-toolbar .linked button:only-child:disabled,

toolbar.primary-toolbar button.raised.linked:only-child:disabled,
.primary-toolbar .raised.linked button:only-child:disabled, 

toolbar.inline-toolbar button:only-child:disabled,

.inline-toolbartoolbar toolbutton:only-child > button:disabled {
}
