.back-to-top {
  background: $b2t-sidebar-bg-color;
  cursor: pointer;
  font-size: $b2t-font-size;
  margin: 20px - $sidebar-offset -10px -20px;
  opacity: $b2t-opacity;
  text-align: center;
  visibility: hidden;

  if (!hexo-config('back2top.scrollpercent')) {
    span {
      display: none;
    }
  }

  &:hover {
    opacity: $b2t-opacity-hover;
  }

  +tablet-mobile() {
    if (!hexo-config('sidebar.onmobile')) {
      display: none;
    }
  }

  &.back-to-top-on {
    visibility: visible;
    the-transition();
  }
}
