/* Loaded on every front-end page (not gated to a shortcode) — small,
   sitewide UI touches that don't belong to any one page's own stylesheet. */

/* One-time entrance animation for the site title in the header — plays
   once per page load (a plain CSS animation on mount, not a scroll-repeat
   effect), never again until the page is reloaded. */
@keyframes cvs-site-title-intro {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.wp-block-site-title a {
  display: inline-block;
  animation: cvs-site-title-intro 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Floating scroll button: jumps to the top of the page when scrolled
   down, or to the bottom when at/near the top — direction + visibility
   are toggled by cvs-scroll-button.js based on scroll position. */
.cvs-scroll-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--cvs-primary-strong, #0f4c3a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cvs-scroll-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.cvs-scroll-btn:hover {
  transform: translateY(-2px);
}
.cvs-scroll-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}
.cvs-scroll-btn.is-down svg {
  transform: rotate(180deg);
}

@media (max-width: 639px) {
  .cvs-scroll-btn {
    bottom: 14px;
    left: 14px;
    width: 40px;
    height: 40px;
  }
}
