#scroll-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 0.5em;
  width: 50px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-secondary);
  background-color: var(--color-primary);
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.75;
  transition: ease-in-out 0.15s opacity;
}

#scroll-to-top.hidden {
  opacity: 0;
  pointer-events: none;
}

#scroll-to-top:hover {
  opacity: 0.9;
}

#scroll-to-top span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
}

#scroll-to-top svg {
  width: 1.25em;
  height: 0.725em;
  fill: currentColor;
}

@media (min-width: 576px) {
  #scroll-to-top {
    right: 64px;
    bottom: 32px;
  }
}

@media (min-width: 1400px) {
  #scroll-to-top {
    right: 100px;
    bottom: 50px;
  }
}

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