// Reducing the amount of the palette's background colors to two
.sidebar {
    background-color: $window_bg_color;
}

// Entries drown if drawn on widgets with $base_color
// Fixing this at least for notebooks, since entries on tabs is a common pattern
// Remove this when upstream makes entries have a light border in the dark theme
@if $variant== "dark" {
    notebook entry {
        background-color: gtkmix($view_bg_color, black, 98%);
    }
}

// Add some transitions on widgets
check,
radio,
switch,
switch slider,
scale > trough,
scale > trough > slider,
scale > trough > highlight {
    transition: $button_transition;
}

// Fix popover wiggling effect (see #2903)
popover.menu {
    check,
    radio {
        transition: none;
    }
}

// Use our own palette for high and not empty levelbar
levelbar {
    > trough {
        > block {
            &.high,
            &:not(.empty) {
                background-color: $success_color;
            }
        }
    }
}

// Green suggested buttons
%button,
button {
    &.suggested-action {
        color: $success_fg_color;

        &,
        &:checked {
            &:not(.flat) {
                background-color: $success_bg_color;
            }
        }
    }

    &.flat {
        &.suggested-action {
            color: $success_color;
        }
    }
}

splitbutton {
    &.suggested-action {
        > button, > menubutton > button {
            color: $success_fg_color;
    
            &, &:checked {
                background-color: $success_bg_color;
            }
        }
    }
}

%button,
button,
%link,
link {
    font-weight: normal;
}
