/* ==========================================================================
   tawk.to is switched off (issue #1736)
   --------------------------------------------------------------------------
   READ THIS BEFORE YOU DELETE THE FILE.

   tawk.to is NOT in this repository. There is no script tag to remove. It is
   injected by Google Tag Manager — container `GTM-TWF8Q5Q`, which an admin
   typed into `settings.custom.head_js`. That blob carries other tags as well,
   so it is never edited by hand.

   So switching tawk off is three jobs, and two of them are code:

     1. `views/wrapper.php` asks tawk itself to hide, through `Tawk_API`. That
        is tawk's own off switch and it is what really removes the bubble.
     2. THIS FILE hides the bubble from the first paint, so nothing flashes in
        the corner while tawk boots, and so the bubble is still gone if tawk
        ever renames its API.
     3. A HUMAN pauses the tawk tag in the GTM dashboard, so the script stops
        being downloaded at all.

   Belt and braces on purpose. Each layer works without the other two.

   WHEN THE GTM TAG IS PAUSED, DELETE THIS FILE, its `<link>` and the small
   `Tawk_API` script, both in `views/wrapper.php`. Nothing else depends on them.

   WHAT IS MATCHED, AND WHY IT LOOKS ODD
   -------------------------------------
   Measured in the browser on 2026-08-20, on the version GTM is serving. The
   bubble is an iframe, and it is not the shape anybody would guess:

     - its id is generated fresh on every page load (`f8a6p4b9cpv1787234366234`);
     - it has NO class, and no `tawk` prefix on anything in the DOM;
     - its `src` is `about:blank`, so there is no tawk.to URL to match either;
     - its parent is a `<div>` with a generated id and no class.

   What IS stable is the inline `style` attribute. tawk writes its whole
   appearance into it, every declaration `!important`, and `resize:none` on an
   iframe is unusual enough to be a reliable fingerprint. Nothing of ours sets
   it inline on an iframe, and this file is panel-only, so it cannot reach a
   storefront embed.

   AND WHY `display: none` IS NOT USED ON IT. That same inline style ends with
   `display:block !important`. An `!important` declaration in a style attribute
   beats an `!important` rule in a stylesheet, so `display: none !important`
   here would simply lose — this was tried, in the browser, and the bubble
   stayed. The three properties below are ones tawk does NOT set inline, so
   they are the ones that win. Together they leave a 0x0 box that paints
   nothing and cannot be clicked.

   The rule above them is for tawk's OTHER markup — older widgets, and the
   greeting bubble — which does carry the `tawk` prefix and a real tawk.to
   `src`. It costs nothing and covers us if GTM serves a different build.
   ========================================================================== */

/* tawk where it names itself. */
iframe[src*="tawk.to"],
[id^="tawk"],
[class^="tawk-"],
[class*=" tawk-"] {
	display: none !important;
	pointer-events: none !important;
}

/* tawk where it does not: the generated-id, about:blank iframes, matched on
   the one part of them that does not change. */
iframe[style*="resize:none !important"] {
	/* Paints nothing. */
	content-visibility: hidden !important;
	/* Takes no space and takes no clicks, so our own chat bubble owns the
	   corner underneath it. */
	scale: 0 !important;
	clip-path: inset(100%) !important;
}
