/**
 * Scroll to Top Button Styles
 */

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
#scrollToTopButton {
  position: fixed;
  bottom: 30px;
  right: 15px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-verde-mosaico);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(80px);
  transition: all 0.4s ease;
  z-index: 998;
  box-shadow: 0 2px 8px rgba(60, 60, 59, 0.2);
  left: auto;
}

#scrollToTopButton.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

#scrollToTopButton:hover {
  transform: translateX(0) translateY(-5px);
  box-shadow: 0 4px 12px rgba(60, 60, 59, 0.25);
}

#scrollToTopButton:active {
  transform: translateX(0) translateY(-2px);
}

#scrollToTopButton i {
  color: var(--color-bege-delicado);
  font-size: 24px;
}

/* Ajustes Mobile - Previne scroll horizontal */
@media screen and (max-width: 767px) {
  #scrollToTopButton {
    right: 20px !important;
    bottom: 20px;
    width: 48px;
    height: 48px;
    transform: translateX(0) translateY(100px);
    left: auto !important;
    max-width: none;
    max-height: none;
  }
  
  /* Garante que o botão não ultrapasse a viewport */
  html {
    overflow-x: hidden;
  }
  
  body {
    overflow-x: hidden;
    position: relative;
  }

  #scrollToTopButton.visible {
    transform: translateX(0) translateY(0);
  }

  #scrollToTopButton:hover {
    transform: translateX(0) translateY(-5px);
  }

  #scrollToTopButton:active {
    transform: translateX(0) translateY(-2px);
  }

  #scrollToTopButton i {
    font-size: 22px;
  }
}

@media screen and (min-width: 768px) {
  #scrollToTopButton {
    width: 55px;
    height: 55px;
    bottom: 40px;
    right: 20px;
  }

  #scrollToTopButton i {
    font-size: 26px;
  }
}

@media screen and (min-width: 1024px) {
  #scrollToTopButton {
    width: 60px;
    height: 60px;
    bottom: 50px;
    right: 25px;
  }

  #scrollToTopButton i {
    font-size: 28px;
  }
}

