.back-to-top {
  position: fixed;
  right: 104px;
  bottom: 24px;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow:
    0 20px 36px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.92);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
  isolation: isolate;
  overflow: hidden;
  will-change: transform, opacity;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    rgba(232, 56, 59, 0.95),
    rgba(89, 131, 188, 0.95),
    rgba(232, 56, 59, 0.95)
  );
  opacity: 1;
  z-index: 0;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
}

.back-to-top::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: inherit;
  background: #000;
  z-index: 1;
  pointer-events: none;
}

.back-to-top:hover {
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.back-to-top:hover img,
.back-to-top:focus-visible img {
  animation: back-to-top-idle 1.1s ease-in-out infinite;
}

.back-to-top:hover::before {
  animation: back-to-top-border-spin 1.2s linear infinite;
}

.back-to-top:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.88);
  outline-offset: 4px;
}

.back-to-top img {
  display: block;
  width: 30px;
  height: 30px;
  opacity: 1;
  object-fit: contain;
  position: relative;
  z-index: 2;
  transform: rotate(0deg);
  will-change: transform, opacity;
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.08))
    drop-shadow(0 2px 8px rgba(255, 173, 51, 0.12));
}

.back-to-top__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.back-to-top__icon::before {
  content: none;
}

.back-to-top__icon::after {
  content: none;
}

.back-to-top.is-launching {
  pointer-events: none;
}

.back-to-top.is-launching img {
  animation: back-to-top-launch var(--back-to-top-duration, 900ms) cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

@keyframes back-to-top-launch {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  18% {
    transform: translateY(-3px) scale(1.02);
    opacity: 1;
  }

  100% {
    transform: translateY(-18px) scale(0.9);
    opacity: 0;
  }
}

@keyframes back-to-top-idle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(0deg);
  }
}

@keyframes back-to-top-border-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .back-to-top {
    right: 20px;
    bottom: 92px;
    width: 46px;
    height: 46px;
  }

  .back-to-top img {
    width: 26px;
    height: 26px;
  }
}
