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

/* avoid jumping menus caused by setting for annoying firefox */
menubar menu menuitem:hover {
    border: 0px none transparent;
    border-radius: 0px;
}

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

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

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

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

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

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

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

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

.primary-toolbar:not(.libreoffice-toolbar) entry progressbar,
.primary-toolbar:not(.libreoffice-toolbar) entry progressbar,
toolbar menubar entry progressbar,
headerbar entry progressbar,
headerbar entry progressbar,
entry progressbar {
    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: -gtk-scaled(url("assets/combobox-button.png"),url("assets/combobox-button@2.png")) 10 12 10 1 / 10px 12px 10px 1px stretch;
}

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

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

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

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

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

.primary-toolbar:not(.libreoffice-toolbar) combobox entry button,
.primary-toolbar:not(.libreoffice-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: -gtk-scaled(url("assets/combobox-button-toolbar.png"),url("assets/combobox-button-toolbar@2.png")) 10 12 10 1 / 10px 12px 10px 1px stretch;
}

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

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

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

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

.primary-toolbar:not(.libreoffice-toolbar) combobox entry.combo:only-child,
.primary-toolbar:not(.libreoffice-toolbar) combobox button.combo:only-child,
toolbar menubar combobox entry.combo:only-child,
toolbar menubar combobox button.combo:only-child,
headerbar combobox entry.combo:only-child,
headerbar combobox button.combo:only-child {
    border-image-width: 10px 12px 10px 12px;
    border-radius: 8px;
}

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

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

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

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

.primary-toolbar:not(.libreoffice-toolbar) switch,
toolbar menubar switch {
    border-image: -gtk-scaled(url("assets/switch-trough-toolbar-off.png"),url("assets/switch-trough-toolbar-off@2.png")) 10 12 10 12 / 10px 12px 10px 12px stretch;
}

.primary-toolbar:not(.libreoffice-toolbar) switch:checked,
toolbar menubar switch:checked {
    border-image: -gtk-scaled(url("assets/switch-trough-toolbar-on.png"),url("assets/switch-trough-toolbar-on@2.png")) 10 12 10 12 / 10px 12px 10px 12px stretch;
}

headerbar switch,
headerbar switch:checked {
    border-image: -gtk-scaled(url("assets/entry-toolbar.png"),url("assets/entry-toolbar@2.png")) 10 12 10 12 / 10px 12px 10px 12px stretch;
}

switch:backdrop,
switch:checked:backdrop,
switch:disabled,
switch:checked:disabled {
    border-image: -gtk-scaled(url("assets/switch-trough-disabled.png"),url("assets/switch-trough-disabled@2.png")) 10 12 10 12 / 10px 12px 10px 12px stretch;
}

headerbar switch:backdrop,
headerbar switch:checked:backdrop,
headerbar switch:disabled,
headerbar switch:checked:disabled {
    border-image: -gtk-scaled(url("assets/entry-toolbar.png"),url("assets/entry-toolbar@2.png")) 10 12 10 12 / 10px 12px 10px 12px stretch;
}

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

headerbar switch slider,
headerbar switch:checked slider,
headerbar switch:backdrop slider,
headerbar switch:disabled slider {
    border-image: -gtk-scaled(url("assets/entry-toolbar.png"),url("assets/entry-toolbar@2.png")) 10 12 10 12 / 10px 12px 10px 12px stretch;
}

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

switch:backdrop slider,
switch:disabled slider {
    border-image: -gtk-scaled(url("assets/switch-button-off-disabled.png"),url("assets/switch-button-off-disabled@2.png")) 9 11 9 11 / 9px 11px 9px 11px stretch;
}

switch:checked:backdrop slider,
switch:checked:disabled slider {
    border-image: -gtk-scaled(url("assets/switch-button-on-disabled.png"),url("assets/switch-button-on-disabled@2.png")) 9 11 9 11 / 9px 11px 9px 11px stretch;
}

headerbar switch:checked:backdrop slider,
headerbar switch:checked:disabled slider {
    border-image: -gtk-scaled(url("assets/entry-toolbar.png"),url("assets/entry-toolbar@2.png")) 9 11 9 11 / 9px 11px 9px 11px stretch;
}

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

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

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

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

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

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

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

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

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

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

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

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

