/* نافذة الشات بوت */
.chatbot-box {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 340px;
  max-width: 95vw;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Tajawal', Arial, sans-serif;
  transition: box-shadow 0.2s;
}
.chatbot-box.open {
  display: flex;
  animation: chatbot-fade-in 0.4s;
}
@keyframes chatbot-fade-in {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* رأس الشات */
.chatbot-header {
  background: linear-gradient(90deg, #2193b0 0%, #6dd5ed 100%); /* تدرج أزرق سماوي عصري */
  color: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 1rem 1.2rem 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(33,147,176,0.10);
  position: relative;
}
.chatbot-close {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbot-close:hover {
  background: rgba(255,255,255,0.25);
}

.chatbot-header-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(95,44,130,0.10);
}

.chatbot-header-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

/* جسم الشات */
.chatbot-body {
  padding: 16px 18px 8px 18px;
  background: #fafbfc;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 320px;
}

.chatbot-faq-question {
  background: linear-gradient(90deg, #e0eafc 0%, #cfdef3 100%); /* تدرج أزرق فاتح */
  color: #1a237e;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  outline: none;
  box-shadow: 0 2px 8px rgba(33,147,176,0.04);
}
.chatbot-faq-question:focus,
.chatbot-faq-question:hover {
  background: linear-gradient(90deg, #b7eaff 0%, #e0eafc 100%);
}
.chatbot-faq-answer {
  background: #f4f8fb;
  color: #004d40;
  border-radius: 10px;
  margin: -4px 0 10px 0;
  padding: 10px 14px 10px 24px;
  font-size: 0.98rem;
  box-shadow: 0 2px 8px rgba(67,198,172,0.07);
  border-right: 3px solid #2193b0;
  direction: rtl;
}

/* قدم الشات */
.chatbot-footer {
  background: #f5f6fa;
  padding: 10px 18px;
  border-top: 1px solid #eee;
  text-align: center;
}
.whatsapp-support {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #25d366 60%, #00bfae 100%); /* تدرج أخضر تركوازي */
  color: #fff;
  border-radius: 8px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0,191,174,0.10);
}
.whatsapp-support i {
  font-size: 1.3em;
  margin-left: 7px;
}
.whatsapp-support:hover {
  background: linear-gradient(135deg, #00bfae 60%, #25d366 100%);
}

/* أيقونة الشات */
.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366 60%, #00bfae 100%); /* WhatsApp green */
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(33,147,176,0.18);
  font-size: 2rem;
  cursor: pointer;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
}
.chatbot-fab.show {
  display: flex;
  animation: chatbot-fab-pop 0.5s;
}
@keyframes chatbot-fab-pop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
.chatbot-fab:focus,
.chatbot-fab:hover {
  background: linear-gradient(135deg, #00bfae 60%, #25d366 100%);
  box-shadow: 0 6px 24px rgba(33,147,176,0.22);
}

/* استجابة الشاشات الصغيرة */
@media (max-width: 600px) {
  .chatbot-box {
    right: 8px;
    left: 8px;
    width: auto;
    min-width: 0;
    max-width: 98vw;
    bottom: 80px;
  }
  .chatbot-fab {
    right: 12px;
    bottom: 12px;
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }
}

/* حركة اللوجو الدائرية مع دوران */
@keyframes chatbot-logo-orbit {
  0% {
    transform: translateX(-120px) rotate(-360deg) scale(0.7);
    opacity: 0.2;
  }
  60% {
    opacity: 1;
  }
  80% {
    transform: translateX(8px) rotate(30deg) scale(1.1);
  }
  100% {
    transform: translateX(0) rotate(0deg) scale(1);
    opacity: 1;
  }
}

.chatbot-header-logo.animating {
  animation: chatbot-logo-orbit 1.1s cubic-bezier(0.7,0.2,0.2,1.1) forwards;
  z-index: 2;
}

/* إخفاء العنوان أثناء حركة اللوجو */
.chatbot-header-title.hide-title .chatbot-title-text {
  opacity: 0;
  pointer-events: none;
}

/* إظهار العنوان تدريجيًا بعد الحركة */
.chatbot-title-text.reveal {
  transition: opacity 0.5s;
  opacity: 1 !important;
} 