/* Keep the launcher below Hummingbird's offcanvas backdrop (1040).
   This also provides a stacking fallback for browsers without :has(). */
html body #bingc-phone-button {
  z-index: 1000 !important;
}

/* Hide Binotel only while a SHOP overlay is open. The callback's own
   bingc-active/bingc-passive windows must not trigger this rule. */
html body:has(
  .offcanvas.show,
  .offcanvas.showing,
  .offcanvas.hiding,
  .offcanvas-backdrop.show,
  .modal.show,
  .modal-backdrop,
  #ukrbee-phone-modal.open,
  #ukrbee-newsletter-modal:not([hidden]),
  dialog[open]
) :is(#bingc-phone-button, #bingc-active, #bingc-passive) {
  display: none !important;
}

@media (max-width: 991.98px) {
  html body #bingc-phone-button {
    width: 56px !important;
    height: 56px !important;
    top: auto !important;
    right: auto !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  html body #bingc-phone-button,
  html body #bingc-phone-button * {
    animation: none !important;
    transition: none !important;
  }

  html body #bingc-phone-button .bingc-phone-button-circle {
    width: 56px !important;
    height: 56px !important;
    transform: none !important;
  }

  html body #bingc-phone-button .bingc-phone-button-circle-outside {
    opacity: 0 !important;
  }

  html body #bingc-phone-button #bingc-phone-button-tooltip {
    display: none !important;
  }

  /* Keep the existing text available to screen readers. */
  html body #bingc-phone-button #bingc-phone-button-icon-text {
    display: block !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html body #bingc-phone-button #bingc-phone-button-icon-icon {
    display: block !important;
    width: 22px !important;
    height: 30px !important;
    top: 13px !important;
    left: 17px !important;
    right: auto !important;
    bottom: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}
