/*
 * Storefront shopper assistant (spec shop-chat): the page-side rules around the toc-live-chat widget that the lazy
 * loader mounts. The widget draws its own panel inside a shadow root; its colours and font come from the --mr-* tokens
 * at runtime (the loader patches the widget theme), so nothing here hard-codes a colour.
 */

/* The launcher sits above the mobile bottom bar when the theme shows one. */
toc-live-chat {
  bottom: calc(20px + var(--mr-mobile-nav-height, 0px)) !important;
}

/* Below 992px the info drawer handles sit bottom right as round buttons: the chat button goes above them. */
@media (max-width: 991.98px) {
  body:has(.mr-drawer-handles) toc-live-chat {
    bottom: calc(5rem + var(--mr-mobile-nav-height, 0px)) !important;
  }

  body:has(.mr-drawer-handles) .mr-shopchat-toast {
    bottom: calc(5.5rem + var(--mr-mobile-nav-height, 0px));
  }
}

/* One short line when the assistant cannot be loaded (service unreachable). */
.mr-shopchat-toast {
  position: fixed;
  right: 16px;
  bottom: calc(24px + var(--mr-mobile-nav-height, 0px));
  max-width: min(320px, calc(100vw - 32px));
  padding: .7rem 1rem;
  background: var(--mr-surface);
  color: var(--mr-text);
  border: 1px solid var(--mr-border-strong);
  border-radius: var(--mr-radius-sm);
  box-shadow: var(--mr-shadow);
  font-family: var(--mr-font-body);
  font-size: .9rem;
  line-height: 1.4;
  z-index: 2147483646;
}

@media print {
  toc-live-chat,
  .mr-shopchat-toast { display: none !important; }
}
