/* Keep the page-scroll control above the accessibility trigger and below panels. */
.pawza-back-to-top {
  position: fixed;
  right: calc(27px + env(safe-area-inset-right, 0px));
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  box-shadow: 0 4px 14px rgba(67, 56, 202, .25);
  cursor: pointer;
  zoom: var(--pawza-a11y-inverse-scale, 1);
}

.pawza-back-to-top[hidden] { display: none; }
.pawza-back-to-top:hover { background: #4f46e5; }
.pawza-back-to-top:active { background: #4338ca; }
.pawza-back-to-top:focus-visible { outline: 3px solid #f5b942; outline-offset: 3px; }
.pawza-back-to-top svg { display: block; pointer-events: none; }

@media (max-width: 600px) {
  .pawza-back-to-top {
    right: calc(17px + env(safe-area-inset-right, 0px));
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
}

/* Orders uses the same edge inset as the accessibility control. */
@media (max-width: 768px) {
  body.future-mobile-view { --future-mobile-floating-inset: 22px; }
  body.future-mobile-view .pawza-back-to-top {
    z-index: 1001;
    left: auto;
    right: calc(var(--future-mobile-floating-inset) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--future-mobile-floating-inset) + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 520px) {
  body.future-mobile-view { --future-mobile-floating-inset: 14px; }
}

@media print {
  .pawza-back-to-top { display: none !important; }
}
