/* Scroll to Top Button Styles */

.scroll-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background-color: var(--color-accent-dark); /* Deep blue from your color palette */
  color: var(--color-fg-inverse); /* White text */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(7, 17, 41, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  z-index: 999;
  border: none;
}

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

.scroll-to-top:hover {
  background-color: var(--color-mariner); /* Lighter blue on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(7, 17, 41, 0.2);
}

.scroll-to-top:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(32, 87, 214, 0.4);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Animation for the button */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.scroll-to-top:active {
  animation: pulse 0.3s ease;
}

/* Ensure button works well on mobile */
@media (max-width: 768px) {
  .scroll-to-top {
    width: 40px;
    height: 40px;
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}
