/* Set up shadows and hilights for button visual separation */
.primary-toolbar:not(.libreoffice-toolbar) .linked button,
.primary-toolbar:not(.libreoffice-toolbar) button.raised.linked,
.primary-toolbar:not(.libreoffice-toolbar) .raised.linked button,
toolbar menubar .linked button,
toolbar menubar button.raised.linked,
toolbar menubar .raised.linked button,
headerbar .linked button,
headerbar button.raised.linked,
headerbar button.raised.linked button {
    box-shadow: inset 1px 0 shade (@dark_bg_color, 1.1),
                inset -1px 0 shade (@dark_bg_color, 0.9);
}

.primary-toolbar:not(.libreoffice-toolbar) .linked button:first-child,
.primary-toolbar:not(.libreoffice-toolbar) button.raised.linked:first-child,
.primary-toolbar:not(.libreoffice-toolbar) .raised.linked button:first-child,
toolbar menubar .linked button:first-child,
toolbar menubar button.raised.linked:first-child,
toolbar menubar .raised.linked button:first-child,
headerbar .linked button:first-child,
headerbar button.raised.linked:first-child,
headerbar .raised.linked button:first-child {
    box-shadow: inset -1px 0 shade (@dark_bg_color, 0.9);
}

.primary-toolbar:not(.libreoffice-toolbar) .linked button:last-child,
.primary-toolbar:not(.libreoffice-toolbar) button.raised.linked:last-child,
.primary-toolbar:not(.libreoffice-toolbar) .raised.linked button:last-child,
toolbar menubar .linked button:last-child,
toolbar menubar button.raised.linked:last-child,
toolbar menubar .raised.linked button:last-child,
headerbar .linked button:last-child,
headerbar button.raised.linked:last-child,
headerbar .raised.linked button:last-child {
    box-shadow: inset 1px 0 shade (@dark_bg_color, 1.1)
}

.primary-toolbar:not(.libreoffice-toolbar) .linked button:active,
.primary-toolbar:not(.libreoffice-toolbar) button.raised.linked:active,
.primary-toolbar:not(.libreoffice-toolbar) .raised.linked button:active,
toolbar menubar .linked button:active,
toolbar menubar button.raised.linked:active,
toolbar menubar .raised.linked button:active,
headerbar .linked button:active,
headerbar button.raised.linked:active,
headerbar .raised.linked button:active {
    box-shadow: inset 1px 0 shade (@dark_bg_color, 0.9);
}

.primary-toolbar:not(.libreoffice-toolbar) .linked button:disabled,
.primary-toolbar:not(.libreoffice-toolbar) button.raised.linked:disabled,
.primary-toolbar:not(.libreoffice-toolbar) .raised.linked button:disabled,
toolbar menubar .linked button:disabled,
toolbar menubar button.raised.linked:disabled,
toolbar menubar .raised.linked button:disabled,
headerbar .linked button:disabled,
headerbar button.raised.linked:disabled,
headerbar .raised.linked button:disabled {
    box-shadow: inset -1px 0 shade (@dark_bg_color, 0.9);
}

.primary-toolbar:not(.libreoffice-toolbar) .linked button:backdrop:last-child,
.primary-toolbar:not(.libreoffice-toolbar) button.raised.linked:backdrop:last-child,
.primary-toolbar:not(.libreoffice-toolbar) .raised.linked button:backdrop:last-child,
toolbar menubar .linked button:backdrop:last-child,
toolbar menubar button.raised.linked:backdrop:last-child,
toolbar menubar .raised.linked button:backdrop:last-child,
headerbar .linked button:backdrop:last-child,
headerbar button.raised.linked:backdrop:last-child,
headerbar .raised.linked button:backdrop:last-child {
    box-shadow: inset 1px 0 shade (@dark_bg_color, 1.1);
}

menubar,
.menubar {
    color: @dark_fg_color;
    text-shadow: 0 1px shade (@dark_bg_color, 1.1);
}

menubar menuitem:hover,
.menubar menuitem:hover {
    color: @dark_fg_color;
    text-shadow: 0 1px shade (@dark_bg_color, 1.1);
}

menuitem:hover,
menu menuitem:hover,
.menu menuitem:hover {
    color: @selected_fg_color;
    text-shadow: 0 -1px shade (@selected_bg_color, 0.7);
}

menuitem:disabled,
menuitem *:disabled {
    color: mix (@fg_color, @bg_color, 0.5);
    text-shadow: 0 1px shade (@bg_color, 1.14);
}

/* for the playback menu item in the sound menu */
menu .spinner,
menu .spinner:hover {
    color: @selected_bg_color;
}

/* primary-toolbar */
.primary-toolbar:not(.libreoffice-toolbar),
toolbar.primary-toolbar:not(.libreoffice-toolbar),
toolbar menubar,
headerbar,
.maximized .titlebar.toolbar-mode:not(:backdrop) {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@dark_bg_color, 0.96)),
                                     to (shade (@dark_bg_color, 1.1)));
    border-bottom-color: shade (@dark_bg_color, 1.02);
    border-top-color: shade (@dark_bg_color, 1.02);

    text-shadow: 0 1px shade (@dark_bg_color, 1.1);
}

.primary-toolbar:not(.libreoffice-toolbar) :disabled,
toolbar menubar :disabled,
headerbar :disabled {
    text-shadow: 0 1px shade (@dark_bg_color, 1.1);
}

.primary-toolbar:not(.libreoffice-toolbar) combobox,
.primary-toolbar:not(.libreoffice-toolbar) button *,
.primary-toolbar:not(.libreoffice-toolbar) button,
toolbar menubar combobox,
toolbar menubar button *,
toolbar menubar button,
headerbar combobox,
headerbar button *,
headerbar button {
    text-shadow: 0 1px alpha (shade (@dark_bg_color, 1.25), 0.32);
}

.primary-toolbar:not(.libreoffice-toolbar) .raised button,
.primary-toolbar:not(.libreoffice-toolbar) .raised.button,
.primary-toolbar:not(.libreoffice-toolbar) button:hover,
.primary-toolbar:not(.libreoffice-toolbar) button:active,
.primary-toolbar:not(.libreoffice-toolbar) button:disabled,
toolbar menubar .raised button,
toolbar menubar .raised.button,
toolbar menubar button:hover,
toolbar menubar button:active,
toolbar menubar button:disabled,
headerbar .raised button,
headerbar .raised.button,
headerbar button:hover,
headerbar button:active,
headerbar button:disabled {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@dark_bg_color, 1.03)),
                                     to (shade (@dark_bg_color, 0.96)));
}
