/* ============ WHATSAPP FLOATING BUTTON ============ */

/* Wave animation - smooth floating motion */
@keyframes whatsapp-wave {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Glow pulse animation for enhanced visual appeal */
@keyframes whatsapp-glow {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4),
                0 0 20px rgba(37, 211, 102, 0.3),
                inset 0 -2px 8px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6),
                0 0 30px rgba(37, 211, 102, 0.5),
                inset 0 -2px 8px rgba(0, 0, 0, 0.1);
  }
}

/* Button Container - Enhanced styling */
.whatsapp-button {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  z-index: 998;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  outline: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4),
              0 0 20px rgba(37, 211, 102, 0.3),
              inset 0 -2px 8px rgba(0, 0, 0, 0.1);
  animation: whatsapp-wave 3s ease-in-out infinite, 
             whatsapp-glow 3s ease-in-out infinite;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.whatsapp-button:hover,
.admin-help-btn:hover {
  transform: translateY(-4px) scale(1.08);
}

.whatsapp-button-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.whatsapp-button:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.7),
              0 0 36px rgba(37, 211, 102, 0.6),
              inset 0 -2px 8px rgba(0, 0, 0, 0.15);
}

.whatsapp-button:active {
  transform: scale(0.95);
}

/* Tooltip */
.whatsapp-tooltip {
  position: absolute;
  background: rgba(37, 211, 102, 0.95);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  right: 70px;
  bottom: 50%;
  transform: translateY(50%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid rgba(37, 211, 102, 0.95);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.whatsapp-button:hover .whatsapp-tooltip {
  opacity: 1;
  right: 70px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .whatsapp-button {
    width: 54px;
    height: 54px;
    bottom: 82px;
    right: 20px;
    font-size: 24px;
    box-shadow: 0 2px 12px rgba(37, 211, 102, 0.35),
                0 0 16px rgba(37, 211, 102, 0.25);
  }

  .admin-help-btn {
    right: 20px;
    width: 54px;
    height: 54px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}

@media (max-width: 480px) {
  .whatsapp-button {
    width: 50px;
    height: 50px;
    bottom: 78px;
    right: 16px;
    font-size: 22px;
  }

  .admin-help-btn {
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

/* Help button styling for consistency */
.admin-help-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-green), #1b5e20);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  outline: none;
}

.admin-help-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.admin-help-btn:active {
  transform: scale(0.95);
}

/* Prevent button from overlapping content */
@media (max-width: 600px) {
  body {
    padding-bottom: 0;
  }
}

/* Dark mode support (if applicable) */
@media (prefers-color-scheme: dark) {
  .whatsapp-button {
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.5),
                0 0 24px rgba(37, 211, 102, 0.4),
                inset 0 -2px 8px rgba(0, 0, 0, 0.3);
  }

  .whatsapp-button:hover {
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.7),
                0 0 36px rgba(37, 211, 102, 0.6),
                inset 0 -2px 8px rgba(0, 0, 0, 0.3);
  }

  .whatsapp-tooltip {
    background: rgba(37, 211, 102, 0.95);
  }

  .whatsapp-tooltip::after {
    border-left-color: rgba(37, 211, 102, 0.95);
  }
}
