/* Tooltip container */
.tooltip-container {
  position: relative;
  display: inline-block;
  margin: 20px;
}

/* Icon styling */
.icon {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

/* SVG Animation: Rotate and scale effect */
.icon svg {
  transition: transform 0.5s ease-in-out;
}

.icon:hover svg {
  transform: rotate(360deg) scale(1.2);
}

/* Tooltip styling */
.tooltip {
  visibility: hidden;
  max-width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 10px;
  position: absolute;
  top: 200%; /* Position above the icon */
  right: -100%;
  margin-left: -100px; /* Center the tooltip */
  opacity: 0;
  transition:
    opacity 0.5s,
    transform 0.5s;
  transform: translateY(-10px);
}

/* Tooltip Arrow */
.tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: 45px;
  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent #333 transparent;
}

/* Show tooltip on hover */
.tooltip-container:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(30px);
  }
  60% {
    transform: translateY(15px);
  }
}

.tooltip-container:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  animation: bounce 0.6s ease;
}
