/* Shared Ask Microglia button. On phones it is a 48px icon circle in the corner.
   While a video plays, or the circle would cover a video, photo, link, or card,
   it tucks into a small tab. The tab still opens the chat. */

@media (max-width: 640px) {
    body {
        padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    }

    #pillar-chat-btn,
    #hq-bot-bubble {
        position: fixed !important;
    }

    #pillar-chat-btn { z-index: 1000 !important; }
    /* Stay under the Master Agent certificate overlay (z-index 200). */
    #hq-bot-bubble { z-index: 140 !important; }

    #pillar-chat-btn,
    #hq-bot-bubble {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 50% !important;
        left: auto !important;
        top: auto !important;
        right: env(safe-area-inset-right, 0px) !important;
        bottom: env(safe-area-inset-bottom, 0px) !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
        overflow: hidden;
        cursor: pointer;
    }

    #pillar-chat-btn img,
    #hq-bot-bubble img {
        width: 48px !important;
        height: 48px !important;
        max-width: none !important;
        display: block;
    }

    #pillar-chat-btn.is-chat-tab,
    #hq-bot-bubble.is-chat-tab {
        width: 18px !important;
        height: 40px !important;
        min-width: 18px !important;
        min-height: 40px !important;
        border-radius: 12px 0 0 12px !important;
        right: 0 !important;
    }

    #pillar-chat-btn.is-chat-tab img,
    #hq-bot-bubble.is-chat-tab img {
        width: 44px !important;
        height: 44px !important;
    }
}

@media print {
    body { padding-bottom: 0 !important; }
    #pillar-chat-btn,
    #hq-bot-bubble { display: none !important; }
}
