.back-to-top-actions {
  position: fixed;
  top: 50%;
  right: calc(1.25rem + env(safe-area-inset-right));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.back-to-top {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  background: #0f4c81;
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 76, 129, 0.24);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, background-color 180ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #0b3861;
  outline: 3px solid rgba(255, 127, 36, 0.45);
  outline-offset: 2px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

@media (max-width: 640px) {
  .back-to-top-actions {
    right: calc(1rem + env(safe-area-inset-right));
  }
}
