/* Live chat launcher. Colours come from the brand tokens in /api/brand.css
   and theme.css so every tenant and theme matches. */
.support-launcher {
  position: fixed;
  z-index: 17;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(23, 20, 15, 0.24));
  color: var(--on-accent);
  cursor: pointer;
}
.support-launcher[hidden] {
  display: none;
}
.support-launcher:focus-visible {
  outline: 2px solid var(--focus-ring, var(--accent));
  outline-offset: 2px;
}

/* The launcher gives way to anything that takes over the screen. */
body.support-chat-open .support-launcher,
body.market-filter-open .support-launcher,
body.trade-entry-open .support-launcher,
body.signin-page-open .support-launcher,
body.account-page-open .support-launcher,
body:not(.market-detail-route):has(.trade-drawer.open) .support-launcher {
  display: none;
}
body:has(.support-launcher:not([hidden])) .toast-region {
  bottom: 88px;
}

@media (max-width: 700px) {
  .support-launcher {
    right: 16px;
    bottom: calc(100px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
  }
  /* The market page pins its Yes and No buttons at the same offset. */
  body.market-detail-route .support-launcher {
    bottom: calc(208px + env(safe-area-inset-bottom));
  }
  body:has(.support-launcher:not([hidden])) .toast-region {
    bottom: calc(160px + env(safe-area-inset-bottom));
  }
}
