How to change color of the sticky column when the table was scrolled and column stuck to the border

I need a help with my sticky column. It’s a second column in the table and I want it to change color from white to light grey when the table has been scrolled and the column became fixed on the left. Here is my code:

Also, I’ll be grateful if you help to set the border to the sticky column. When I write border property it’s shown in the table in the place the column used to be, but when the column slides any border disappears
Thank you!