.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 50%;
  background-color: var(--bs-primary, #0d6efd);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease,
    background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
  background-color: #0b5ed7;
  color: #fff;
}

.back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .back-to-top {
    bottom: 1.75rem;
    left: 1.75rem;
    width: 1.875rem;
    height: 1.875rem;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
  }
}
