/* The companion uses the empty outer margins; the product widget is untouched. */
.companion {
  --companion-color: #38bdf8;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 15;
  width: 48px;
  text-align: center;
  will-change: transform;
}
.companion-hello {
  position: relative;
  display: block;
  width: 48px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  transform: rotate(var(--companion-tilt, 0deg));
  transition: transform .2s;
}
.companion-hello img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1) drop-shadow(0 3px 7px var(--companion-color));
  user-select: none;
}
.companion-pause {
  display: block;
  margin: 7px auto 0;
  padding: 4px 6px;
  min-width: 44px;
  min-height: 24px;
  border: 0;
  border-radius: 4px;
  background: #000b;
  color: #a1a1ae;
  font-size: 10px;
  line-height: 1.3;
  opacity: .85;
}
.companion:hover .companion-pause,
.companion:focus-within .companion-pause { opacity: 1; color: #f4f4f6; }
.companion-whisper {
  position: absolute;
  top: 88px;
  left: 50%;
  width: 110px;
  transform: translateX(-50%);
  color: #b2b2be;
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
  display: none;
}
.companion-trail { position: absolute; inset: 0; pointer-events: none; }
.companion-trail i {
  position: absolute;
  left: 21px;
  top: 36px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--companion-color);
  opacity: 0;
}
.companion[data-flying="true"] { pointer-events: none; }
.companion[data-flying="true"] .companion-trail i { animation: companion-dust .7s ease-out infinite; }
.companion[data-flying="true"] .companion-trail i:nth-child(2) { animation-delay: -.23s; left: 13px; }
.companion[data-flying="true"] .companion-trail i:nth-child(3) { animation-delay: -.46s; left: 29px; }
.companion[data-flying="true"] .companion-pause { opacity: 0; }
.companion[data-flying="true"] .companion-whisper { opacity: 0; }
.companion[data-paused="true"] .companion-hello img { filter: invert(1); }
@keyframes companion-dust {
  0% { opacity: .65; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(24px) scale(.2); }
}
@media (min-width: 1440px) { .companion-whisper { display: block; } }
@media (max-width: 1279px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .companion { display: none !important; }
}
