/*
 * Back to top button
 * Eko DDD - Fixed scroll-to-top button with gradient
 */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--brand-purple),
    color-mix(in oklab, var(--brand-purple) 80%, var(--brand-green))
  );
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
  z-index: 120;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }

  .back-to-top svg {
    width: 22px;
    height: 22px;
  }
}
