Ruth Davidson nailed her colours to the Remain mast. Picture: Jane Barlow/PA Wire

But now there’s a problem – and it’s called Brexit. Arguably, leaving the EU is a problem for everyone, but for Ms Davidson it has a special dimension.

The Scottish Tory leader nailed her colours firmly to the mast during the referendum in June, arguing uncompromisingly for the UK to stay in the EU and speaking bluntly about the antics of the Leave campaign. She gave a feisty performance in a high-profile televised debate against key figures like Boris Johnson, Gisela Stuart and Andrea Leadsom.

Not for her the calculated caution of Theresa May who effectively sat on the fence throughout the referendum campaign, which allowed her to slide effortlessly into power after the Leave vote despite formally being on the other side.

Sign up to our daily newsletter The i newsletter cut through the noise Sign up Thanks for signing up! Sorry, there seem to be some issues. Please try again later. Submitting...

In contrast, Ms Davidson went with her convictions and used the forthright, plain-speaking, down-to-earth style which had already won her respect and results on the domestic front to explain why quitting the EU was a bad idea.

But it meant that when the result went the other way she was left in a very awkward position.

Scotland voted Remain, of course, but for the Tories that’s little comfort. Their primary belief in the UK means they set no store by the contrasting results in Scotland, Northern Ireland, England and Wales.

So Ms Davidson has been left trying to defend something she did not support. And although at first she argued for continuing membership of the single market, she now appears to have dropped that.

Nicola Sturgeon turned her fire on Ms Davidson at the weekend, branding her a “sell-out” and accusing her of ignoring the wishes of the 62 per cent of Scots who voted Remain.

The First Minister recalled how Ms Davidson had denounced the Brexiteers during the TV debate for selling a “lie” and told viewers: “You deserve the truth”. Now, said Ms Sturgeon, the Scottish Tories had joined the deception. “They are embarrassed that there was on overwhelming majority for Remain in Scotland. They seek to scare people into believing that they have no option but to accept any amount of economic pain from a Tory Brexit.”

And Ms Sturgeon extended her attack to the Tories’ policy agenda, particularly on bringing back tuition fees and prescription charges. “The Tories want to roll back the gains of devolution that have helped so many families,” she said. “They want the sick to pay for their prescriptions and students to pay for their education.”

This is significant because the Tories did not get where they are today by having to argue on policies – they relied on Ms Davidson’s popularity and the promise they would be a strong opposition. If they are forced to discuss policy issues, some of that popularity may evaporate.

If it had not been for the Brexit vote, Ms Davidson could well be riding high and going from strength to strength. As the main opposition party the Tories are now getting the attention Labour used to enjoy. And with problems mounting for the SNP she would be well placed to capitalise.

But Brexit and the way her party at UK level are handling it seem to have derailed her advance.