Major US carrier here.
Strictly seniority based. Many of our wide body FO’s have flown narrow body Captain, but a few haven’t. A few WB FO’s “hop the garbage sack” and go directly from wide body FO to wide body Captain never being a NB Captain. Whatever your seniority can hold, you can bid.
From my perspective as a training Captain, I believe having experience as narrow body Captain prior to becoming a wide body Captain is a definite plus, but I would fight any attempt to legislate it contractually.