I have a borderless input inside a div and next to the input has a magnifying glass, in that case it is a search field, as far as I know it is not possible with css and yes only with javascript, more suddenly someone can I need to give you an idea, so when I click on the input text the div has a custom border.
Below I will attach an image of how the component is, note that the outline is a gray div and inside it has an input and an img, when clicking on the input this gray div should turn blue.