I'm facing an issue with a button that is part of an InfoWindow component. The button is not created in the HTML code directly but is called whenever the card component opens. I have integrated this InfoCard into two different sections of the application, and for each section, I modify the position of the button using ::ng-deep to ensure that the changes are applied. However, the problem arises when switching from one page to another - child1 inherits the CSS styling of child2's button, and vice versa if child1 is opened before child2. One solution I thought of was to assign a specific class to each button and then adjust the CSS by targeting these classes (e.g., .class1.button and .class2.button). Unfortunately, since the button remains hidden until triggered by the showInfo button, adding a class to a hidden element proves challenging due to display:none being set via TypeScript. Can anyone offer advice on how to resolve this dilemma?