.cd-top {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-position: center !important;
  background-size: 18px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
  z-index: 1100;
}

/* Visible state
-------------------------------------------------- */

.cd-top.cd-top--show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Labelled desktop version
-------------------------------------------------- */

.cd-top.cd-top--labelled {
  width: auto;
  min-width: 118px;
  height: 34px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  background-position: 12px center !important;
  background-size: 18px !important;
}

.cd-top.cd-top--labelled::after {
  content: "Back to top";
  display: block;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* Hover
-------------------------------------------------- */

.cd-top.cd-top--show:hover, .cd-top.cd-top--show:focus-visible {
  opacity: 0.82;
  color: #fff;
  text-decoration: none;
}

/* Reduced motion
-------------------------------------------------- */

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

