/* Floating Contact Widget CSS */

.floating-contact-widget {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.floating-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  color: #333333;
}

.floating-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  background-color: #f8f9fa;
}

.floating-item.wechat-item:hover .wechat-qrcode {
  opacity: 1;
  visibility: visible;
  transform: translateX(-130px) translateY(0);
}

.floating-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.floating-icon svg {
  width: 24px;
  height: 24px;
  color: var(--jm-color-primary, #333333);
}

.wechat-qrcode {
  position: absolute;
  right: 100%;
  bottom: 0;
  margin-right: 15px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-120px) translateY(0);
  transition: all 0.3s ease;
  z-index: 9999;
}

.wechat-qrcode img {
  width: 120px;
  height: 120px;
  display: block;
  border-radius: 4px;
}

/* Individual item styles */
.floating-item.whatsapp-item:hover {
  background-color: #25D366;
}

.floating-item.whatsapp-item:hover .floating-icon svg {
  color: #ffffff;
}

.floating-item.email-item:hover {
  background-color: #007bff;
}

.floating-item.email-item:hover .floating-icon svg {
  color: #ffffff;
}

.floating-item.back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.floating-item.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.floating-item.back-to-top:hover {
  background-color: #6c757d;
}

.floating-item.back-to-top:hover .floating-icon svg {
  color: #ffffff;
}

/* Responsive design */
@media (max-width: 768px) {
  .floating-contact-widget {
    right: 20px;
    bottom: 20px;
    gap: 10px;
  }
  
  .floating-item {
    width: 50px;
    height: 50px;
  }
  
  .floating-icon svg {
    width: 22px;
    height: 22px;
  }
  
  .wechat-qrcode {
    margin-right: 10px;
  }
  
  .wechat-qrcode img {
    width: 100px;
    height: 100px;
  }
  
  .floating-item.wechat-item:hover .wechat-qrcode {
    transform: translateX(-110px) translateY(0);
  }
}

@media (max-width: 480px) {
  .floating-contact-widget {
    right: 15px;
    bottom: 15px;
    gap: 8px;
  }
  
  .floating-item {
    width: 46px;
    height: 46px;
  }
  
  .floating-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .wechat-qrcode img {
    width: 90px;
    height: 90px;
  }
  
  .floating-item.wechat-item:hover .wechat-qrcode {
    transform: translateX(-100px) translateY(0);
  }
}
