/**
 * @file
 * Back to top: small circular button, bottom-right or bottom-left. Uses --r-bg, --r-tx.
 * pointer-events: none when hidden. Respects prefers-reduced-motion. Hidden in print.
 */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.solo-back-to-top-sentinel-wrapper {
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.solo-back-to-top-sentinel {
  width: 1px;
  height: var(--solo-back-to-top-sentinel-height, 400px);
  pointer-events: none;
}

.solo-back-to-top {
  --solo-z-back-to-top: 99999;
  position: fixed;
  bottom: 1.5rem;
  z-index: var(--solo-z-back-to-top);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;  /* ~44px touch-friendly */
  height: 2.75rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background-color: var(--r-bg, #333);
  color: var(--r-tx, #fff);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.solo-back-to-top--bottom-right {
  right: 1.5rem;
  left: auto;
}

.solo-back-to-top--bottom-left {
  left: 1.5rem;
  right: auto;
}

.solo-back-to-top--outline {
  background-color: transparent;
  border-color: var(--r-tx, #fff);
  color: var(--r-tx, #fff);
}

.solo-back-to-top--outline:hover,
.solo-back-to-top--outline:focus {
  color: var(--r-tx, #fff);
}

@media (max-width: 767px) {
  .solo-back-to-top.solo-back-to-top--hide-small {
    display: none !important;
  }
}

.solo-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.solo-back-to-top:hover,
.solo-back-to-top:focus {
  color: var(--r-tx, #fff);
  transform: translateY(-2px);
}

.solo-back-to-top:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.solo-back-to-top__icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .solo-back-to-top {
    transition: none;
  }
  .solo-back-to-top:hover,
  .solo-back-to-top:focus {
    transform: none;
  }
}

@media print {
  .solo-back-to-top-sentinel-wrapper,
  .solo-back-to-top-sentinel,
  .solo-back-to-top {
    display: none !important;
  }
}
