/* ==========================================================================
   FlipDesk helpdesk "?" (#fd_frame): the site's AI helpdesk agent.
   Project rule: it must stay reachable and working on the main pages. It may be
   moved, or hidden while a pop-up is showing, but the open chat must never break.

   This is the ONE place for sitewide #fd_frame rules (CHG-0147). Every master
   that loads the FlipDesk widget links this file via Insight.AssetVersion.Url.
   Page-specific tweaks (e.g. MyAccount.aspx, GenieMeetDetails.aspx) stay in
   their pages. Any position override must use :not(.fd-open), so it never moves
   the open chat. The vendor adds .fd-open while the chat or its notification
   bubble is open.
   ========================================================================== */

@media (max-width: 640px) {
    /* Pages with the bottom tab bar: lift the closed bubble above the bar */
    body:has(.sf-ajax-tabs .ajax__tab_header) #fd_frame:not(.fd-open) { bottom: 84px !important; }

    /* Open chat on a phone: the vendor only goes full screen when it adds
       .fd-mobile-view, which it doesn't always do. Without this, a 450px panel
       hangs off the left edge. */
    #fd_frame.h-open-container.fd-open {
        top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
        width: 100% !important; height: 100% !important; max-height: 100% !important;
    }
}
