.tts-to-top {
  position: fixed;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
  box-sizing: border-box;
}
.tts-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.tts-to-top:hover {
  transform: translateY(-2px) scale(1.03);
}
.tts-to-top:focus-visible {
  outline: 2px solid #4da3ff;
  outline-offset: 3px;
}
.tts-to-top .tts-to-top__svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.tts-to-top .tts-to-top__text {
  display: inline-block;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: currentColor;
  user-select: none;
  padding: 0 8px;
  white-space: nowrap;
}
.tts-progress-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.tts-progress-svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
}
.tts-progress-track,
.tts-progress-ring {
  fill: none;
  stroke-width: var(--tts-ring-width, 3px);
}
.tts-progress-track {
  stroke: var(--tts-track, rgba(255, 255, 255, 0.2));
}
.tts-progress-ring {
  stroke: var(--tts-ring-color, currentColor);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.08s linear;
}
.tts-progress-arrow {
  position: absolute;
  width: 42% !important;
  height: 42% !important;
}

/* progress text overlay is not used for the text variant */
.tts-to-top.tts-force-hidden {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .tts-to-top,
  .tts-progress-ring {
    transition: none;
  }
}
