I'm facing an issue with my web page that has a bootstrap modal which pops up when a button is clicked. I've added a print media query to print the content of the modal, but it's causing a problem. When I include the media query in the CSS, the modal data prints correctly but it prevents the parent page from being printed (using ctrl+P) when the modal is closed. Is there a way to allow both functionalities - printing the parent page and the modal separately? I'm looking for a solution to dynamically attach the print media query so that only the modal content is printed without interfering with the parent page printing. Any suggestions or assistance would be greatly appreciated.