.wach-scrolltop {
  position: fixed;
  right: var(--wach-scrolltop-offset-x, 24px);
  bottom: var(--wach-scrolltop-offset-y, 24px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(32, 32, 32, var(--wach-scrolltop-bg-opacity, 0.88));
  color: var(--wach-scrolltop-icon-color, #fff);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, background-color 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.wach-scrolltop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.wach-scrolltop:hover {
  background: rgba(16, 16, 16, var(--wach-scrolltop-bg-opacity, 0.88));
}

.wach-scrolltop:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.wach-scrolltop__icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 767px) {
  .wach-scrolltop {
    bottom: calc(var(--wach-scrolltop-offset-y, 24px) + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wach-scrolltop {
    transition: none;
  }
}
