/*
 * Floating back-to-top page utility.
 *
 * The control is independent of the footer layout so it remains available
 * throughout long pages after the visitor has scrolled away from the top.
 */

.back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 20px));
  z-index: 890;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(115, 192, 238, .32);
  border-radius: 15px;
  background: rgba(223, 243, 253, .96);
  color: var(--isp-ink) !important;
  box-shadow: 0 12px 30px rgba(68, 68, 68, .12);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 12px, 0) scale(.96);
  transition:
    opacity .2s ease,
    transform .24s cubic-bezier(.2, .72, .25, 1),
    visibility 0s linear .24s,
    background-color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition-delay: 0s;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: rgba(115, 192, 238, .62);
  background: var(--isp-primary, #73c0ee);
  box-shadow: 0 15px 34px rgba(115, 192, 238, .26);
  transform: translate3d(0, -2px, 0) scale(1);
}

body.isp-menu-open .back-to-top,
body.isp-search-open .back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 10px, 0) scale(.96);
}

@media (max-width: 700px) {
  .back-to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 16px));
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none !important;
  }
}
