I made this css code to style one of my input radio:
input[name=source]+span:after, input[name=source]:not(:checked)+span:before {
    border: 2px solid cyan;
}
now in my DOMContentLoaded i am attempting to modify the attributes of my input by doing this:
document.querySelector(`input[name=source]:not(:checked)+span:before`).style.border = 'border: 2px solid red';
But upon running I am getting this message:
Uncaught TypeError: Cannot read property 'style' of null
    at HTMLDocument.<anonymous>
If i only made this document.querySelector(`input[name=source] then nothing happens.
What should i do target those element? Why it is null?
 
    