/* Keep the help launcher, hint and desktop panel anchored to the right. */
.zx-chat-launcher,
.zx-chat-panel {
  left: auto;
  right: 20px;
}
.zx-chat-panel { transform-origin: bottom right; }
.zx-chat-hint {
  left: auto;
  right: 104px;
  transform: translateX(6px);
}
.zx-chat-hint::before {
  left: auto;
  right: -7px;
  border-left: 0;
  border-right: 1px solid var(--zx-border);
  transform: rotate(-45deg);
}
@media (max-width: 575px) {
  .zx-chat-launcher { right: 16px; }
  .zx-chat-hint { right: 92px; }
  .zx-chat-panel { left: 0; right: 0; }
}


/* Original Peñi from the desktop app, with a transparent silhouette. */
.zx-chat-launcher,
.zx-chat-launcher:hover,
.zx-chat-launcher[aria-expanded="true"] {
  width: 96px;
  height: 120px;
  padding: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}
.zx-chat-launcher picture { display: block; width: 100%; height: 100%; }
.zx-chat-launcher img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  filter: drop-shadow(0 3px 4px rgba(60, 20, 70, .2));
}
.zx-chat-panel {
  bottom: 152px;
  height: min(620px, calc(100vh - 172px));
}
.zx-chat-panel__avatar {
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.zx-chat-hint { right: 128px; bottom: 54px; }
@media (max-width: 575px) {
  .zx-chat-launcher,
  .zx-chat-launcher:hover,
  .zx-chat-launcher[aria-expanded="true"] { width: 80px; height: 100px; }
  .zx-chat-hint { right: 108px; bottom: 42px; max-width: calc(100vw - 124px); }
  .zx-chat-panel { bottom: 0; height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .zx-chat-launcher:hover { transform: none; }
}

/* Live eye tracking and the original desktop scratch animation. */
.zx-chat-launcher .zx-peni-gaze,
.zx-chat-launcher .zx-peni-scratch {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(60, 20, 70, .2));
}
.zx-chat-launcher .zx-peni-scratch {
  display: none;
  position: absolute;
  width: 137.5%;
  left: -18.75%;
  top: 0;
}
.zx-chat-launcher.is-peni-scratching .zx-peni-gaze { visibility: hidden; }
.zx-chat-launcher.is-peni-scratching .zx-peni-scratch { display: block; }

/* Head poses use the same full silhouette frame as the scratch sequence. */
.zx-chat-launcher.has-peni-head .zx-peni-gaze {
  position: absolute;
  width: 137.5%;
  left: -18.75%;
  top: 0;
}

/* Mouse clicks must not draw the browser's rectangular focus ring around Peni. */
.zx-chat-launcher:focus:not(:focus-visible) { outline: none; }


/* Peni is available on desktop; mobile shopping stays free of chat overlays. */
@media (max-width: 767px) {
  .zx-chat-launcher,
  .zx-chat-hint,
  .zx-chat-panel {
    display: none !important;
  }
  /* Resizing an open desktop chat must not lock scrolling on mobile. */
  html.zx-chat-open,
  html.zx-chat-open body {
    overflow: auto;
  }
}
