<div id="parent">
<input type="text" id="one"/>
<input type="text" id="two"/>
</div>
#parent:has(#one:focus) {
color: red;
}
just try making the element you want to style the parent that is what i did when i faced something like this