[SalesForce] Updates to Salesforce’s CSS not working in LWC

I have a lightning web component and on it I have

<lightning-input-field 
    field-name="Resource__c" 
    onchange={onResourceSelection} 
    data-lookup-id="temResourceLookup"
    value={resourceRecId}
    variant="label-hidden">
</lightning-input-field>

I want to change some of the styling so on the input and so I have this on the css portion of the component.

.slds-input:focus, .slds-input:active {
    outline: 0;
    border-color: rgb(255, 0, 0);
    background-color: rgb(255, 255, 0);
    box-shadow: 0 0 5px rgb(0, 255, 0);
}

Nothing changes. Does anyone know what I need to do to get the style to use the CSS I have supplied?

Best Answer

As @Mohith mentioned Styling hooks are the official way. You can achieve the same with

.slds-input:active{
    --lwc-colorBorderInputActive: rgb(255, 0, 0);
    --lwc-colorBackgroundInputActive: rgb(255, 255, 0);
    --lwc-shadowButtonFocus: 0 0 5px rgb(0, 255, 0);
}

Also, Styling hooks are still in beta so maybe there could be changes to the property conventions. Read more able SLDS Hooks here.