/* Borders */
menubar menuitem:hover,
.menubar.menuitem:hover {
    border: 1px solid #2e2e2c;
    border-bottom-width: 0px;
    border-radius: 4px 4px 0 0;
}

/*********
 * entry *
 *********/
spinbutton,
entry {
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

spinbutton,
entry {
    border-image: url("assets/entry.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

spinbutton:backdrop,
entry:backdrop {
    border-image: url("assets/backdrop-entry.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

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

spinbutton:disabled,
entry:disabled {
    border-image: url("assets/entry-disabled.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

spinbutton:disabled:backdrop,
entry:disabled:backdrop {
    border-image: url("assets/backdrop-entry-disabled.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

spinbutton entry,
spinbutton entry:focus,
spinbutton entry:disabled,
spinbutton entry:disabled:backdrop,
spinbutton entry:backdrop {
    margin: 1px;
    border-image: none;
}

.primary-toolbar entry,
menubar toolbar entry,
headerbar entry {
    border-image: url("assets/entry-toolbar.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

.primary-toolbar entry:focus,
menubar toolbar entry:focus,
headerbar entry:focus {
    border-image: url("assets/entry-toolbar-focused.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

.primary-toolbar entry progress,
menubar toolbar entry progress,
headerbar entry progress {
    border-radius: 8px;
    border-width: 0;
}

/******************
 * comboboxentry *
 ******************/
combobox entry:first-child,
combobox entry button:first-child {
    border-image-width: 10px 1px 10px 12px;
    border-radius: 8px 0 0 8px;
    border-right-width: 0;
}

combobox entry:last-child,
combobox entry button:last-child {
    border-image-width: 10px 12px 10px 1px;
    border-radius: 0 8px 8px 0;
    border-left-width: 0;
}

combobox entry button {
    border-image: url("assets/combobox-button.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

combobox entry button:backdrop {
    border-image: url("assets/backdrop-combobox-button.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

combobox entry button:focus {
    border-image: url("assets/combobox-button-focused.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

combobox entry button:disabled {
    border-image: url("assets/combobox-button-disabled.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

combobox entry button:disabled:backdrop {
    border-image: url("assets/backdrop-combobox-button-disabled.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

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

.primary-toolbar combobox entry button,
.primary-toolbar combobox entry button:focus:disabled,
menubar toolbar combobox entry button,
menubar toolbar combobox entry button:focus:disabled,
headerbar combobox entry button,
headerbar combobox entry button:focus:disabled {
    border-image: url("assets/combobox-entry button-toolbar.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

.primary-toolbar combobox entry button:focus,
menubar toolbar combobox entry button:focus,
headerbar combobox entry button:focus {
    border-image: url("assets/combobox-entry button-toolbar-focused.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

.primary-toolbar combobox entry button:focus:active:focus,
menubar toolbar combobox entry button:focus:active:focus,
headerbar combobox entry button:focus:active:focus {
    border-image: url("assets/combobox-entry button-toolbar-pressed-focused.png") 10 12 10 1 / 10px 12px 10px 1px stretch;
}

.primary-toolbar combobox entry:first-child,
.primary-toolbar combobox entry button:first-child,
menubar toolbar combobox entry:first-child,
menubar toolbar combobox entry button:first-child,
headerbar combobox entry:first-child,
headerbar combobox entry button:first-child {
    border-image-width: 10px 0 10px 12px;
    border-radius: 8px 0 0 8px;
    border-right-width: 0;
}

.primary-toolbar combobox entry:last-child,
.primary-toolbar combobox entry button:last-child,
menubar toolbar combobox entry:last-child,
menubar toolbar combobox entry button:last-child,
headerbar combobox entry:last-child,
headerbar combobox entry button:last-child {
    border-image-width: 10px 12px 10px 1px;
    border-radius: 0 8px 8px 0;
    border-left-width: 0;
}

notebook header.top tab:checked {
    border-image: url("assets/notebook-tab-top.png") 8 10 1 10 / 8px 10px 1px 10px stretch;
}

notebook header.right tab:checked {
    border-image: url("assets/notebook-tab-right.png") 10 8 10 1 / 10px 8px 10px 1px stretch;
}

notebook header.bottom tab:checked {
    border-image: url("assets/notebook-tab-bottom.png") 1 10 8 10 / 1px 10px 8px 10px stretch;
}

notebook header.left tab:checked {
    border-image: url("assets/notebook-tab-left.png") 10 1 10 8 / 10px 1px 10px 8px stretch;
}

.trough,
trough,
trough.highlight {
    border-radius: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

.trough,
trough {
    border-image: url("assets/progressbar-horizontal-trough.png") 6 7 6 7 / 6px 7px 6px 7px stretch;
}

switch {
    border-image: url("assets/switch-trough-off.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

switch:checked {
    border-image: url("assets/switch-trough-on.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

.primary-toolbar switch,
menubar toolbar switch,
headerbar switch {
    border-image: url("assets/switch-trough-toolbar-off.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

.primary-toolbar switch:checked,
menubar toolbar switch:checked,
headerbar switch:checked {
    border-image: url("assets/switch-trough-toolbar-on.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

/* XXX temporary */
switch:backdrop,
switch:checked:backdrop,
switch:disabled,
switch:checked:disabled {
    border-image: url("assets/switch-trough-disabled.png") 10 12 10 12 / 10px 12px 10px 12px stretch;
}

switch slider {
    border-image: url("assets/switch-button-off.png") 9 11 9 11 / 9px 11px 9px 11px stretch;
}

switch:checked slider {
    border-image: url("assets/switch-button-on.png") 9 11 9 11 / 9px 11px 9px 11px stretch;
}

/* XXX temporary */
switch:backdrop slider,
switch:disabled slider {
    border-image: url("assets/switch-button-off-disabled.png") 9 11 9 11 / 9px 11px 9px 11px stretch;
}

/* XXX temporary */
switch:active:backdrop slider,
switch:active:disabled slider {
    border-image: url("assets/switch-button-on-disabled.png") 9 11 9 11 / 9px 11px 9px 11px stretch;
}

/*
progressbar trough progress,
.progressbar,
progressbar row,
progressbar row:hover,
progressbar row:selected,
progressbar row:selected:focus {
    border-image: url("assets/progressbar-horizontal-fill.png") 5 6 5 6 / 5px 6px 5px 6px stretch;
}

.progressbar.vertical.trough,
progressbar.vertical trough progress {
    border-image: url("assets/progressbar-vertical-fill.png") 6 5 6 5 / 6px 5px 6px 5px stretch;
}

.progressbar.trough:backdrop,
progressbar:backdrop trough progress,
progressbar row:backdrop,
progressbar row:hover:backdrop,
progressbar row:selected:backdrop,
progressbar row:selected:focus:backdrop {
    border-image: url("assets/progressbar-horizontal-fill-backdrop.png") 5 6 5 6 / 5px 6px 5px 6px stretch;
}

.progressbar.vertical:backdrop,
progressbar.vertical:backdrop trough progress {
    border-image: url("assets/progressbar-vertical-fill-backdrop.png") 6 5 6 5 / 6px 5px 6px 5px stretch;
}
*/

scale trough {
    border-image: url("assets/scale-horizontal-trough.png") 2 6 2 6 / 2px 6px 2px 6px stretch;
}

scale:disabled trough {
    border-image: url("assets/scale-horizontal-trough-disabled.png") 2 6 2 6 / 2px 6px 2px 6px stretch;
}

scale:backdrop trough {
    border-image: url("assets/scale-horizontal-trough-backdrop.png") 2 6 2 6 / 2px 6px 2px 6px stretch;
}

scale.vertical trough {
    border-image: url("assets/scale-vertical-trough.png") 6 2 6 2 / 6px 2px 6px 2px stretch;
}

scale.vertical:disabled trough {
    border-image: url("assets/scale-vertical-trough-disabled.png") 6 2 6 2 / 6px 2px 6px 2px stretch;
}

scale trough.highlight.left {
    border-image: url("assets/scale-horizontal-fill.png") 2 6 2 6 / 2px 6px 2px 6px stretch;
}

scale.vertical:backdrop trough {
    border-image: url("assets/scale-vertical-trough-backdrop.png") 6 2 6 2 / 6px 2px 6px 2px stretch;
}

scale:backdrop trough.highlight.left {
    border-image: url("assets/scale-horizontal-fill-disabled.png") 2 6 2 6 / 2px 6px 2px 6px stretch;
}

scale:backdrop trough.highlight.left {
    border-image: url("assets/scale-horizontal-fill-backdrop.png") 2 6 2 6 / 2px 6px 2px 6px stretch;
}

scale.vertical trough.highlight.bottom {
    border-image: url("assets/scale.vertical-vertical-fill.png") 6 2 6 2 / 6px 2px 6px 2px stretch;
}

scale.vertical:disabled trough.highlight.bottom {
    border-image: url("assets/scale.vertical-vertical-fill-disabled.png") 6 2 6 2 / 6px 2px 6px 2px stretch;
}

scale.vertical:backdrop trough.highlight.bottom {
    border-image: url("assets/scale-vertical-fill-backdrop.png") 6 2 6 2 / 6px 2px 6px 2px stretch;
}

