flex-direction: row-reverse means the main axis is horizontal, but now starts from the right and ends on the left side.

Make sure to pick row-reverse.