It is a very long time since I completed “Law of the Sea” courses.
If my memory serves me right then the international borders are projected at the angle from the coast they run at before reaching the coast. That means the English-Scots border would run SW to NE and the Scots-Shetland border NW to SE approximately. Add in Norway etc and it could leave Scotland with very little oil to the East if Shetland went its own way.
National economic zones run 200 nautical miles out from the coast, or can be claimed using continental shelf data. In the end it all requires international agreement or decision by the international courts.