.shared-livechat-page {
    --shared-chat-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
}

.shared-livechat-page #tcChatFallback,
.shared-livechat-page #ag-chat-widget-root.shared-chat-widget {
    bottom: var(--shared-chat-bottom);
}

.default-livechat-page #tcChatFallback,
.default-livechat-page #ag-chat-widget-root.shared-chat-widget {
    right: 15px;
}

.shared-livechat-page #tcChatStatus {
    bottom: calc(var(--shared-chat-bottom) + 72px);
}

.shared-livechat-page .box-contact {
    bottom: calc(var(--shared-chat-bottom) + 72px);
}

.shared-livechat-page #model_ifram { z-index: 1000002; }

.shared-livechat-page:has(> .box-popup-home) :is(#ag-chat-widget-root, #tcChatFallback, #tcChatStatus) {
    z-index: 90;
}

@media (max-width: 480px) {
    .shared-livechat-page #ag-chat-widget-root.shared-chat-widget > .ag-chat-launcher {
        bottom: var(--shared-chat-bottom);
    }

    body:has(> .shared-livechat-template) #ag-chat-widget-root.shared-chat-widget > .ag-chat-launcher.open {
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
}
