/* تنسيقات عامة للأيقونات */
.close-btn, .close-widget-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover, .close-widget-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.close-btn:active, .close-widget-btn:active {
  transform: scale(0.95);
}

/* تنسيقات الويدجت */
.whatsapp-widget {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 1001;
}

.whatsapp-main-button {
  position: relative;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
}

.whatsapp-main-button.open {
  transform: rotate(360deg);
}

.pulse-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid #25D366;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
}

/* الويدجت المنبثقة */
.whatsapp-widget-popup {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 300px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

.widget-header {
  background: #075E54;
  color: white;
  padding: 15px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.company-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-avatar {
  width: 40px;
  height: 40px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-details h6 {
  margin: 0;
  font-size: 14px;
}

.status {
  font-size: 12px;
  opacity: 0.8;
}

.status.online {
  color: #4CAF50;
}

.close-widget-btn {
  width: 32px;
  height: 32px;
}

.widget-content {
  padding: 15px;
}

.welcome-message {
  background: #f0f0f0;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.quick-reply-btn, .custom-message-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  text-align: right;
}

.quick-reply-btn:hover, .custom-message-btn:hover {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

/* الرسوم المتحركة */
@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  70% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(0.8);
    opacity: 0;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* للجوال */
@media (max-width: 768px) {
  .whatsapp-widget {
    bottom: 20px;
    left: 20px;
  }
  
  .whatsapp-widget-popup {
    width: 280px;
    left: -110px;
  }
}

/* شبكة عرض الأيقونات */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.icon-item:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
}