/* The live chat bubble, carrying the QuickAST mark instead of Odoo's balloon.

   im_livechat.channel has no image field, and the button template renders a
   fixed <i class="fa fa-commenting">, so there is nothing to configure. The
   widget also lives in a shadow root, which puts its internals deliberately
   out of reach of this page, and that is the property the whole embed relies
   on to leave the Webflow styling untouched.

   The one supported way in is the part the button exposes on itself. A part
   can be styled but not descended into, so the icon cannot be selected and
   removed. It is a font glyph though, drawn in the text colour, so making that
   colour transparent takes it out of sight and leaves the circle, the shadow
   and the drag behaviour exactly as Odoo built them. The !important is not
   decoration: the template writes color and background-color as an inline
   style from the channel's own fields, and an inline style outranks this file.

   The image is the 256x256 webclip already vendored for the apple-touch-icon,
   so it is the mark as QuickAST published it and it costs no new asset. */

.o-livechat-root::part(openChatButton) {
    color: transparent !important;
    background-image: url("/tke_quickast_website/static/src/img/62a1c6a184cdced8b58e94ea_webclip.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Clear of the cookie banner (#868, UI test of 4 October 2026).

   Odoo stacks the chat host at the highest z-index there is, so the bubble
   was drawn on top of the banner's "Cookie Settings" button at phone width.
   Lowering the host would put the chat window itself under the banner, so
   the bubble moves instead: static/src/js/quickast_consent.js marks <html>
   while the banner is up and measures how far it reaches from the bottom of
   the screen, and the bubble is lifted by exactly that. translate rather
   than bottom or top: Odoo's chat hub positions the bubble with inline
   offsets it rewrites on scroll and on a drag, and translate is not one of
   the properties it touches. Behind the
   full-screen preferences dialog the bubble would float over a modal, so it
   is hidden there until the visitor has answered. */

html[data-tke-cc-banner="open"] .o-livechat-root::part(openChatButton) {
    translate: 0 calc(-1 * var(--tke-cc-banner-lift, 0px));
}

html[data-tke-cc-preferences="open"] .o-livechat-root::part(openChatButton) {
    visibility: hidden;
}
