/* Floating Buttons Menu - Professional Styling */

.floating-buttons-menu {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
  align-items: flex-end;
}

/* Individual Floating Buttons */
.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: white;
  font-weight: bold;
}

/* Stats Button */
.floating-stats-btn {
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.floating-stats-btn:hover {
  transform: scale(1.12) rotate(10deg);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.floating-stats-btn:active {
  transform: scale(0.95);
}

/* WhatsApp Button */
.floating-whatsapp-btn {
  background: linear-gradient(135deg, #25d366, #1f4f4f);
  text-decoration: none;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.12) rotate(-10deg);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.floating-whatsapp-btn:active {
  transform: scale(0.95);
}

/* Visitor Badge */
.floating-visitor-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  cursor: default;
  border: 3px solid rgba(255, 255, 255, 0.9);
  position: relative;
  animation: float-badge 3s ease-in-out infinite;
}

.floating-visitor-badge #visitorCount {
  font-size: 22px;
  font-weight: bold;
}

@keyframes float-badge {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Pulsing animation for active state */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.floating-visitor-badge.active {
  animation:
    pulse 2s infinite,
    float-badge 3s ease-in-out infinite;
}

/* Stats Panel Styling */
#statsPanel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 16px;
  min-width: 280px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

#statsPanel.show {
  max-height: 400px;
  opacity: 1;
}

#statsPanel h4 {
  margin: 0 0 10px 0;
  color: var(--primary, #0a3d62);
  font-size: 14px;
  font-weight: 600;
}

#statsPanel p {
  margin: 5px 0;
  color: #666;
  font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .floating-buttons-menu {
    bottom: 20px;
    right: 20px;
    gap: 12px;
  }

  .floating-btn {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .floating-visitor-badge {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }

  #statsPanel {
    min-width: 250px;
    padding: 12px;
    right: 0;
  }
}

@media (max-width: 480px) {
  .floating-buttons-menu {
    bottom: 15px;
    right: 15px;
    gap: 10px;
  }

  .floating-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .floating-visitor-badge {
    width: 45px;
    height: 45px;
    font-size: 14px;
  }

  #statsPanel {
    min-width: 220px;
    padding: 10px;
    font-size: 12px;
  }
}

/* Legacy WhatsApp Float Button (Hidden, using new menu) */
.whatsapp-float {
  display: none !important;
}

/* Ensure proper z-index layering */
.floating-buttons-menu {
  z-index: 999;
}

#statsBtn {
  position: relative;
}

#statsBtn::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

#statsBtn.has-update::after {
  display: flex;
  content: "!";
}
