Chat invite display notification instead of opening chat window?

Chat invite display notification instead of opening chat window?

We're trying to improve the usability of our mobile site and one of the big issues is that the chat window can be rather intrusive. We have several triggers that send a chat invite, but on mobile the chat window covers the entire screen and having to close a window repeatedly while browsing the site doesn't make for a good user experience.

The alternatives we'd like to try are to either prevent these invites on the mobile version of the site, or to prevent the chat window from opening automatically and instead show a notification or text bubble on the chat button indicating that a chat invite has been received. Here's a very simple example of what I'm talking about.

I think this may be possible using the Javascript APIs to customize the widget, but I'm not sure exactly where to start. Does anyone have any experience or ideas on implementing a solution like this? Alternative solutions to the intrusiveness issue would be helpful as well. Thank you!