/* Back to top — desktop only (proacton.ru #scrollUp: bottom-right, bottom:20px).
 * Hidden ≤960px. On desktop Aimy sits ABOVE it (offset_y + CSS bottom:82px). */
.plp-btt{
  position:fixed;
  right:24px;
  bottom:20px;
  z-index:99989;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  margin:0;
  padding:0;
  border:0;
  border-radius:50%;
  background:#5B3DF5;
  background:linear-gradient(135deg,#6C4DFF 0%,#5B3DF5 55%,#3B2BBF 100%);
  color:#fff;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(91,61,245,.35);
  opacity:0;
  visibility:hidden;
  transform:translateY(16px);
  transition:opacity .3s ease,transform .3s ease,visibility .3s,bottom .25s ease,box-shadow .2s;
}
.plp-btt.is-visible{opacity:1;visibility:visible;transform:none}
.plp-btt:hover,.plp-btt:focus-visible{box-shadow:0 10px 26px rgba(91,61,245,.5);filter:brightness(1.08)}
.plp-btt:focus-visible{outline:2px solid #fff;outline-offset:2px}
.plp-btt__arrow{position:relative;z-index:1;display:block;width:20px;height:20px}
.plp-btt__ring{position:absolute;inset:0;width:48px;height:48px;transform:rotate(-90deg);pointer-events:none}
.plp-btt__ring circle{fill:none;stroke:rgba(255,255,255,.9);stroke-width:2;stroke-linecap:round;transition:stroke-dashoffset .1s linear}
html[data-plp-theme="dark"] .plp-btt{
  background:linear-gradient(135deg,#8B7CFF 0%,#6C4DFF 100%);
  box-shadow:0 8px 22px rgba(0,0,0,.4);
}

/* Aimy ABOVE back-to-top: BTT bottom 20 + height 48 + gap 14 = 82px (match plugin offset_y) */
#aimy-chat-root.aimy-chat-root--bottom-right,
.aimy-chat-root.aimy-chat-root--bottom-right{
  bottom:82px!important;
  right:24px!important;
}

/* While Aimy panel is open, hide BTT so it does not sit under the panel */
html[data-cbu-chat-open] .plp-btt,
.aimy-chat-root[data-open="1"] ~ .plp-btt{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* Mobile/tablet: no Back to top — Aimy alone bottom-right (no stacking fight) */
@media (max-width:960px){
  .plp-btt{
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  #aimy-chat-root.aimy-chat-root--bottom-right,
  .aimy-chat-root.aimy-chat-root--bottom-right{
    bottom:20px!important;
    right:18px!important;
  }
  /* cookie banner: lift Aimy only (BTT hidden) */
  html[data-cbu-open]:not([data-cbu-chat-open]) #aimy-chat-root.aimy-chat-root--bottom-right,
  html[data-cbu-open]:not([data-cbu-chat-open]) .aimy-chat-root.aimy-chat-root--bottom-right{
    margin-bottom:var(--cbu-lift,0px)!important;
  }
}
@media (prefers-reduced-motion:reduce){.plp-btt{transition:none}}
