/* Ensure anchor-container is positioned relative for proper positioning */
.anchor-container.--relative {
  position: relative;
  display: flex;
  align-items: center;  /* Vertically center the buttons */
  justify-content: flex-start; /* Align buttons to the left */
  gap: 10px; /* Optional: Adds spacing between the buttons */
}

/* Style for the Scroll to Top Button */
#scrollTopButton {
  cursor: pointer;
  border: none;
  border-radius: 50%;
  position: absolute;
  transform: translateX(-100%);  /* Move the button to the left of the toggle */
  visibility: visible;
}

#scrollTopButton img {
  display: block;
  max-width: 100%;
  height: auto;
}


/* Initially hide the Toggle button */
#toggleButton {
  display: none;
  cursor: pointer;
  padding: 12px 16px;
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 16px;
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  height: 50px;
  backdrop-filter: brightness(1.2) contrast(0.6);
  text-transform: uppercase;
}

#toggleButton:after {
    content: "";
    background-image: url(../../features/anchor-menu/chevron.svg);
    font-weight: 900;
    margin-left: 5px;
    background-repeat: no-repeat;
    width: 16px;
    height: 8px;
    display: inline-block;
}

/* Show and fix the button when scrolled */
#toggleButton.fixed, #scrollTopButton.fixed {
  position: fixed;
  top: 24px;
  z-index: 3;
  display: block;
  opacity: 1;
  background: rgba(0, 0, 0, 0.13);
  height: 50px;

}

#toggleButton.open:after {
  transform: rotate(180deg);
}

#scrollTopButton {
  backdrop-filter: brightness(1.2) contrast(0.6);
}

/* Fixed position for idList */
#idList.fixed {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;

}

.scroll-up #idList.fixed {
  opacity: 0;
  transition-duration: .3s;
}

/* Adjust the positioning of the idList container */
#idList {
  z-index: 1;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  background-color: #f0f0f0;
  padding: 10px;
  border: 1px solid #ccc;
  width: fit-content;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#idList a {
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  color: #333;
  margin: 2px 0;
  text-transform: uppercase;
}

#idList a:hover {
  background-color: #ddd;
}

/* Button hover effect */
#toggleButton:hover {
  background-color: var(--primary-color);
  transition-duration: 0.3s;
  background-blend-mode: screen;
}

@media screen and (max-width:769px) {

  #toggleButton {
    font-size: 10px;
  }
  
}
