/* JtA Back to Top (Scroll-Up Reveal) — v1.0.3 brand colours */
:root{
  /* Fallbacks if the site tokens aren't present */
  --jta-blue: var(--wp--preset--color--custom-jt-a-link-blue, #7ab8fa);
  --jta-red:  var(--wp--preset--color--custom-jt-a-link-red,  #ff5151);
  --jta-ink:  var(--wp--preset--color--contrast, #111111);
  --jta-base: var(--wp--preset--color--base, #ffffff);
}

.jta-back-to-top{
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0.5rem 0.875rem;
  border: 2px solid transparent;
  border-radius: 9999px;       /* match pill buttons */
  background: var(--jta-blue); /* brand blue like CTA */
  color: var(--jta-base);
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  cursor: pointer;
  z-index: 2147483647;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.jta-back-to-top.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Hover/focus to JtA red (like link hover tone) */
.jta-back-to-top:hover,
.jta-back-to-top:focus{
  background: var(--jta-red);
  color: var(--jta-base);
  border-color: var(--jta-red);
  outline: none;
}

/* High-contrast focus ring for keyboard users */
.jta-back-to-top:focus-visible{
  box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 6px rgba(0,0,0,.3);
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .jta-back-to-top{
    transition: opacity .01ms, transform .01ms, visibility .01ms;
  }
}

/* Mobile spacing */
@media (max-width: 480px){
  .jta-back-to-top{
    bottom: 1rem;
    right: 1rem;
  }
}
