/* ============================================================
   PrintCraft — Scroll-to-Top Button
   assets/css/scroll-top.css
   Add to assets.php after buy-now.css
   ============================================================ */

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;                       /* below modals/curtain */

  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--paper3);
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.12);

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease,
              transform 0.25s ease,
              background 0.15s,
              border-color 0.15s;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.scroll-top-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Push it up on mobile so it clears any bottom browser chrome */
@media (max-width: 600px) {
  .scroll-top-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
  }
}
@media (max-width: 600px) {
  .scroll-top-btn {
    bottom: 56px; /* clears the 44px tab + a little breathing room */
  }
}