/* "Back to top" button (views/partials/back-to-top.ejs). A round button
   fixed bottom-right, stacked just above the live-chat bubble so the two
   never overlap. Hidden until the visitor scrolls down. Pages set its
   colours with --back-to-top-bg and --back-to-top-bg-hover. */
.back-to-top {
  position: fixed;
  z-index: 999;
  right: 28px;
  bottom: 96px;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  background: var(--back-to-top-bg, #1e5bfa);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(11, 21, 48, 0.22);
  cursor: pointer;
  opacity: 0;
  place-items: center;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}

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

.back-to-top:hover {
  background: var(--back-to-top-bg-hover, #164bd6);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--back-to-top-bg, #1e5bfa);
  outline-offset: 3px;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 560px) {
  .back-to-top {
    right: 20px;
    bottom: 88px;
    width: 44px;
    height: 44px;
  }
}

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