treeview {
    &.view.cell {
        &:selected {
            background: rgba($fg-color, 0.15);
        }

        &:focus-visible:selected {
            @extend selection;
        }
    }

    entry.flat {
        // Account for some off-by-one funkiness
        padding: rem(4px) rem(1px);
        background: inherit;
    }

    header button {
        border-left-width: 0;
        border-radius: 0;
        border-top-width: 0;

        &:last-child {
            border-right-width: 0;
        }

        label {
            // Cannot be a number or fonts break in Flatpak
            font-weight: bold;
            opacity: 0.8;
        }

        &:backdrop label {
            opacity: 0.6;
        }

        sort-indicator {
            min-height: 16px;
            min-width: 16px;

            &.ascending {
                -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
            }

            &.descending {
                -gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
            }
        }
    }
}
