/* Floating Action Buttons Styles */
.floating-buttons {
  position: fixed;
  right: 30px;
  bottom: 130px;
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
  z-index: 9998;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50px;
  background: #25d366;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  text-decoration: none;
  opacity: 1;
  transform: scale(1);
  position: relative;
  animation: pulseAndBounce 2s infinite ease-in-out;
}

/* Speech Bubble Tail (Triangle) - Left Side */
.floating-btn::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 12px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #25d366;
  transform: rotate(15deg);
}

/* Pulse Ring Effect */
.floating-btn::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50px;
  border: 2px solid #25d366;
  opacity: 0;
  animation: pulseRing 2s infinite ease-out;
}

/* Main attention-grabbing animation: Pulse + Bounce */
@keyframes pulseAndBounce {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  10% {
    transform: scale(1.05) translateY(-5px);
  }
  20% {
    transform: scale(1) translateY(0);
  }
  30% {
    transform: scale(1.05) translateY(-3px);
  }
  40% {
    transform: scale(1) translateY(0);
  }
}

/* Pulse ring animation */
@keyframes pulseRing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Hide buttons when collapsed */
.floating-buttons.collapsed .floating-btn:not(.toggle-btn) {
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

.floating-btn:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
  animation: none; /* Stop animation on hover */
}

/* Add a subtle glow on hover */
.floating-btn:hover::after {
  animation: none;
  opacity: 0.3;
  transform: scale(1.1);
}

.floating-btn svg {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.floating-btn:hover svg {
  transform: scale(1.1);
}

.floating-buttons:not(.collapsed) .toggle-btn svg.close-icon {
  display: block !important;
}

.toggle-btn {
  background: #bde8f5;
  border: none;
}

.toggle-btn::before,
.toggle-btn::after {
  display: none;
}

.toggle-btn svg {
  fill: white;
}

.floating-buttons:not(.collapsed) .toggle-btn svg.close-icon {
  transform: rotate(0deg);
}

.floating-buttons.collapsed .toggle-btn svg.close-icon {
  transform: rotate(90deg);
}

.floating-buttons:not(.collapsed) .toggle-btn svg.menu-icon {
  display: none;
}

.floating-buttons.collapsed .toggle-btn svg.close-icon {
  display: none;
}

.floating-buttons.collapsed .toggle-btn svg.menu-icon {
  display: block;
}

.floating-buttons:not(.collapsed) .toggle-btn svg.menu-icon {
  display: none;
}

@media (max-width: 768px) {
  .floating-buttons {
    right: 15px;
    bottom: 15px;
    gap: 12px;
  }

  .floating-btn {
    width: 55px;
    height: 55px;
    border-radius: 50px;
  }

  .floating-btn::before {
    bottom: -3px;
    left: 10px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #25d366;
  }

  .floating-btn svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .floating-buttons {
    right: 10px;
    bottom: 10px;
    gap: 10px;
  }

  .floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50px;
  }

  .floating-btn::before {
    bottom: -3px;
    left: 8px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #25d366;
  }

  .floating-btn svg {
    width: 20px;
    height: 20px;
  }
}
