/* /css/development/dropdown-button-rainbow-glow.css */

/* Container for the dropdown */
.rainbow-glow-dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown button */
.rainbow-glow-dropdown > button {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #343A40;
  color: white;
  border-radius: 50px;
  padding: 5px 20px;
  font-size: 18px;
  font-weight: bold;
  min-width: 140px;
  height: 20px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px #00f9ff;
}

/* Button hover effect */
.rainbow-glow-dropdown > button:hover {
  background-image: linear-gradient(
    90deg,
    #00C0FF 0%,
    #FFCF00 49%,
    #FC4F4F 80%,
    #00C0FF 100%
  );
  background-size: 200% auto;
  animation: slidebg 4s linear infinite;
  background-position: right center;
  transform: scale(1.08);
  box-shadow:
    0 0 20px #00f9ff,
    0 0 30px #00f9ff,
    0 0 40px #00f9ff;
}

/* Dropdown content box */
.rainbow-glow-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  margin-top: 2px; /* Reduce this to bring it closer */
  min-width: 200px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2c2f36, #3a3f47);
  box-shadow: 0 0 15px #00f9ff, 0 0 30px #00c0ff;
  border: 2px solid #00f9ff;
  text-align: center;
  animation: fadeInDropdown 0.4s ease-out forwards;
  z-index: 999;
}

/* Dropdown items */
.rainbow-glow-dropdown-content a {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: #00f9ff;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px #00f9ff;
}

/* Item hover effect */
.rainbow-glow-dropdown-content a:hover {
  background: linear-gradient(90deg, #00C0FF, #FFCF00, #FC4F4F, #00C0FF);
  background-size: 400% auto;
  animation: glowingBackground 4s linear infinite;
  color: white;
  text-shadow: 0 0 10px #ffffff, 0 0 20px #00f9ff;
}

/* Show dropdown on hover */
.rainbow-glow-dropdown:hover .rainbow-glow-dropdown-content {
  display: block;
}

/* Background animation */
@keyframes glowingBackground {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes fadeInDropdown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slidebg {
  to {
    background-position: 200% center;
  }
}
