﻿/* === SECTION: Autodigi launcher — CheckDi mascot skin ===
 *
 * Intent: replace the generic "contact" glyph on the floating contact button
 * with the CheckDi mascot, so the one widget that sits on every page is ours.
 *
 * Why CSS and not a vendor setting: the launcher belongs to Autodigi's
 * third-party chat widget (gateway.autodigi.net/bundle.js?wid=61f7652ef1b3...,
 * injected from the master pages). Their per-account config exposes only
 * color_mainbtn, position, tooltip and the channel list — the icon is hardcoded
 * in the bundle as `img#btn-main-img.src = "<cdn>/images/contact.png"`. No
 * dashboard field for it, so the swap has to happen on our side.
 *
 * Approach: paint the mascot as the button's own background and hide their
 * <img>. Deliberately NOT `content: url()` on the img — if a browser ignored
 * `content` we would be left with their glyph sitting on a background we had
 * already made transparent, which looks broken. With this shape the worst case
 * is simply their original button.
 *
 * The white disc and orange ring are baked into the .webp (ring is #ffab18,
 * the same colour as their color_mainbtn) so the asset IS the button face.
 * Their pulse animation is a box-shadow keyframe and is left untouched — it
 * still haloes out from the ring.
 *
 * Assumptions — re-check these if the button ever reverts to the glyph:
 *   - Their ids/classes are literal, not build-hashed: #btn-main (the 52x52
 *     circle), #btn-main-img (the icon), .unknown_prf (wrapper).
 *   - They write background-color and box-shadow INLINE on #btn-main, and an
 *     inline `width: 38px` on #btn-main-img when the panel closes. Hence
 *     !important here: an important declaration outranks a normal inline one.
 *   - Their own sheet carries `.unknown_prf .btn-main img { ... !important }`
 *     and `#btn-main-img { display: inline }`, and it is injected into <head>
 *     at runtime, i.e. after this file. An id selector (1,0,0) still outranks
 *     `.unknown_prf .btn-main img` (0,2,1) on important-vs-important.
 *   - They never swap the icon's src between open and closed states, so hiding
 *     it costs no affordance.
 *
 * Loaded by: internal.master, intl.master, simplemasterpage.master — every
 * master that actually injects the widget. mainth.master and
 * plaininternal.master both have the Autodigi script commented out, so they
 * carry no widget and deliberately do not link this file. If either is ever
 * re-enabled, add the link there too.
 *
 * Verified 2026-09-07 against the live widget on localhost:44384 (health
 * companies / intl nomads / direct motor make): mascot painted, their inline
 * background overridden, glyph hidden, pulse animation intact, open and close
 * both clean at 375px and 1280px.
 */

#btn-main {
    background: transparent url("/content/img/branding/checkdi-mascot-chip.webp") center / contain no-repeat !important;
}

#btn-main-img {
    display: none !important;
}
