/**********
 * button *
 **********/
.button,
.toolbar .button,
.inline.toolbar .button {
    border-image: url("assets/button.png") 7 / 7px stretch;
}

.button.default {
    border-image: url("assets/button-default.png") 7 / 7px stretch;
}

.button:focus,
.button.default:focus,
.toolbar .button:focus,
.inline.toolbar .button:focus {
    border-image: url("assets/button-focused.png") 7 / 7px stretch;
}

.button:hover,
.toolbar .button:hover,
.inline.toolbar .button:hover {
    border-image: url("assets/button-hover.png") 7 / 7px stretch;
}

.button.default:hover {
    border-image: url("assets/button-default-hover.png") 7 / 7px stretch;
}

.button:hover:focus,
.button.default:hover:focus,
.toolbar .button:hover:focus,
.inline.toolbar .button:hover:focus {
    border-image: url("assets/button-focused-hover.png") 7 / 7px stretch;
}

.button:active,
.button.default:active,
.toolbar .button:active,
.inline.toolbar .button:active {
    border-image: url("assets/button-active.png") 7 / 7px stretch;
}

.button:active:focus,
.button.default:active:focus,
.inline.toolbar .button:active:focus {
    border-image: url("assets/button-active-focused.png") 7 / 7px stretch;
}

.button:insensitive,
.button.default:insensitive,
.toolbar .button:hover:insensitive,
.inline.toolbar .button:insensitive {
    border-image: url("assets/button-disabled.png") 7 / 7px stretch;
}

.button:active:insensitive,
.toolbar .button:active:insensitive,
.inline.toolbar .button:active:insensitive {
    border-image: url("assets/button-active-disabled.png") 7 / 7px stretch;
}

/* middle button */
.linked .entry,
.linked .button,
.linked .button:active,
.linked .button:active:hover,
.linked .button:focus,
.linked .button:focus:active,
.linked .button:insensitive,
.toolbar .linked .entry,
.toolbar .linked .button,
.toolbar .linked .button:active,
.toolbar .linked .button:active:hover,
.toolbar .linked .button:focus,
.toolbar .linked .button:focus:active,
.toolbar .linked .button:insensitive {
    border-image-width: 7px 0 7px 0;
}

/* leftmost button */
.linked .entry:first-child,
.linked .button:first-child,
.linked .button:active:first-child,
.linked .button:active:hover:first-child,
.linked .button:focus:first-child,
.linked .button:focus:active:first-child,
.linked .button:insensitive:first-child,
.toolbar .linked .entry:first-child,
.toolbar .linked .button:first-child,
.toolbar .linked .button:active:first-child,
.toolbar .linked .button:active:hover:first-child,
.toolbar .linked .button:focus:first-child,
.toolbar .linked .button:focus:active:first-child,
.toolbar .linked .button:insensitive:first-child {
    border-image-width: 7px 0 7px 7px;
}

/* rightmost button */
.linked .entry:last-child,
.linked .button:last-child,
.linked .button:active:last-child,
.linked .button:active:hover:last-child,
.linked .button:focus:last-child,
.linked .button:focus:active:last-child,
.linked .button:insensitive:last-child,
.toolbar .linked .entry:last-child,
.toolbar .linked .button:last-child,
.toolbar .linked .button:active:last-child,
.toolbar .linked .button:active:hover:last-child,
.toolbar .linked .button:focus:last-child,
.toolbar .linked .button:focus:active:last-child,
.toolbar .linked .button:insensitive:last-child {
    border-image-width: 7px 7px 7px 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:focus:only-child,
.linked .button:focus:active:only-child,
.linked .button:insensitive:only-child,
.toolbar .linked .entry:only-child,
.toolbar .linked .button:only-child,
.toolbar .linked .button:active:only-child,
.toolbar .linked .button:active:hover:only-child,
.toolbar .linked .button:focus:only-child,
.toolbar .linked .button:focus:active:only-child,
.toolbar .linked .button:insensitive:only-child {
    border-image-width: 7px 7px 7px 7px;
}

/* middle button (vertical) */
.linked.vertical .entry,
.linked.vertical .button,
.linked.vertical .button:active,
.linked.vertical .button:active:hover,
.linked.vertical .button:focus,
.linked.vertical .button:focus:active,
.linked.vertical .button:insensitive,
.toolbar .linked.vertical .entry,
.toolbar .linked.vertical .button,
.toolbar .linked.vertical .button:active,
.toolbar .linked.vertical .button:active:hover,
.toolbar .linked.vertical .button:focus,
.toolbar .linked.vertical .button:focus:active,
.toolbar .linked.vertical .button:insensitive {
    border-image-width: 7px 0 7px 0;
}

/* leftmost button (vertical) */
.linked.vertical .entry:first-child,
.linked.vertical .button:first-child,
.linked.vertical .button:active:first-child,
.linked.vertical .button:active:hover:first-child,
.linked.vertical .button:focus:first-child,
.linked.vertical .button:focus:active:first-child,
.linked.vertical .button:insensitive:first-child,
.toolbar .linked.vertical .entry:first-child,
.toolbar .linked.vertical .button:first-child,
.toolbar .linked.vertical .button:active:first-child,
.toolbar .linked.vertical .button:active:hover:first-child,
.toolbar .linked.vertical .button:focus:first-child,
.toolbar .linked.vertical .button:focus:active:first-child,
.toolbar .linked.vertical .button:insensitive:first-child {
    border-image-width: 7px 7px 0 7px;
}

/* rightmost button (vertical) */
.linked.vertical .entry:last-child,
.linked.vertical .button:last-child,
.linked.vertical .button:active:last-child,
.linked.vertical .button:active:hover:last-child,
.linked.vertical .button:focus:last-child,
.linked.vertical .button:focus:active:last-child,
.linked.vertical .button:insensitive:last-child,
.toolbar .linked.vertical .entry:last-child,
.toolbar .linked.vertical .button:last-child,
.toolbar .linked.vertical .button:active:last-child,
.toolbar .linked.vertical .button:active:hover:last-child,
.toolbar .linked.vertical .button:focus:last-child,
.toolbar .linked.vertical .button:focus:active:last-child,
.toolbar .linked.vertical .button:insensitive:last-child {
    border-image-width: 0 7px 7px 7px;
}

/* linked single button (vertical) */
.linked.vertical .entry:only-child,
.linked.vertical .button:only-child,
.linked.vertical .button:active:only-child,
.linked.vertical .button:active:hover:only-child,
.linked.vertical .button:focus:only-child,
.linked.vertical .button:focus:active:only-child,
.linked.vertical .button:insensitive:only-child,
.toolbar .linked.vertical .entry:only-child,
.toolbar .linked.vertical .button:only-child,
.toolbar .linked.vertical .button:active:only-child,
.toolbar .linked.vertical .button:active:hover:only-child,
.toolbar .linked.vertical .button:focus:only-child,
.toolbar .linked.vertical .button:focus:active:only-child,
.toolbar .linked.vertical .button:insensitive:only-child {
    border-image-width: 7px 7px 7px 7px;
}

/* 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-image-width: 7px 0 7px 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-image-width: 7px 0 7px 7px;
}

/* 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-image-width: 7px 7px 7px 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-image-width: 7px 7px 7px 7px;
}

.spinbutton.button,
.spinbutton.button:active,
.spinbutton.button:focus,
.spinbutton.button:focus:active,
.spinbutton.button:insensitive,
.spinbutton.vertical.button,
.spinbutton.vertical.button:active,
.spinbutton.vertical.button:focus,
.spinbutton.vertical.button:focus:active,
.spinbutton.vertical.button:insensitive,
.spinbutton.vertical.entry,
column-header .button,
column-header .button:hover,
column-header .button:active,
column-header .button:active:hover,
column-header .button:focus,
column-header .button:focus:active,
column-header .button:insensitive {
    border-image: none;
}

/*********
 * entry *
 *********/
.entry {
    border-image: url("assets/entry.png") 7 / 7px stretch;
}

.entry:focus {
    border-image: url("assets/entry-focused.png") 7 / 7px stretch;
}

.entry:insensitive {
    border-image: url("assets/entry-disabled.png") 7 / 7px stretch;
}

.toolbar .entry {
    border-image: url("assets/entry.png") 7 / 7px stretch;
}

.toolbar .entry:focus {
    border-image: url("assets/entry-focused.png") 7 / 7px stretch;
}

/******************
 * 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-image-width: 7px 0px 7px 7px;
}

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

GtkComboBox.combobox-entry .button {
    border-image: url("assets/combobox-button.png") 7 7 7 0 / 7px 7px 7px 0 stretch;
}

GtkComboBox.combobox-entry .button:focus {
    border-image: url("assets/combobox-button-focused.png") 7 7 7 0 / 7px 7px 7px 0 stretch;
}

GtkComboBox.combobox-entry .button:insensitive {
    border-image: url("assets/combobox-button-disabled.png") 7 7 7 0 / 7px 7px 7px 0 stretch;
}

GtkComboBox.combobox-entry .button:active:focus {
    border-image: url("assets/combobox-button-pressed-focused.png") 7 7 7 0 / 7px 7px 7px 0 stretch;
}
