/**
 * Scroll to Top Button
 * Site-wide scroll-to-top functionality
 */

/* Scroll to top button container */
.sa-scroll-to-top {
  position: fixed;
  bottom: 132px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #f8f9fa;
  color: #021a4f;
  border: 2px solid #e9ecef;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(2, 26, 79, 0.15);
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
}

/* Show state */
.sa-scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Hover state */
.sa-scroll-to-top:hover {
  background-color: #021a4f;
  color: white;
  border-color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(2, 26, 79, 0.25);
  transform: translateY(-2px) scale(1.05);
}

/* Active state */
.sa-scroll-to-top:active {
  transform: translateY(0) scale(0.95);
}

/* Arrow icon */
.sa-scroll-to-top::before {
  content: "↑";
  font-size: 20px;
  line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sa-scroll-to-top {
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 16px;
  }

  .sa-scroll-to-top::before {
    font-size: 18px;
  }
}

/* Ensure smooth scrolling is enabled */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .sa-scroll-to-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .sa-scroll-to-top:hover {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
