/* ShAi chatbot — extracted from style.css for the landing page */
/* زر الشات بوت */
.chatbot-button {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  border: 3px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  transition: all 0.3s ease;
  padding: 0;
}

.chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.6);
}

.chatbot-button svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* نافذة الشات بوت */
.chatbot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chatbot-overlay.active {
  opacity: 1;
  visibility: visible;
}

.chatbot-window {
  position: fixed;
  bottom: 120px;
  left: 30px;
  width: 420px;
  height: 600px;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(11, 60, 136, 0.95) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.9);
  transition: all 0.4s ease;
}

.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(56, 189, 248, 0.05) 100%);
  border-radius: 24px 24px 0 0;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.chatbot-avatar img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.chatbot-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chatbot-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.chatbot-online {
  font-size: 12px;
  color: #22d3ee;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chatbot-online::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
}

.chatbot-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #94a3b8;
}

.chatbot-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  transform: rotate(90deg);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.5);
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22d3ee 0%, #38bdf8 100%);
  border-radius: 10px;
}

.chat-message {
  display: flex;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.chat-message.bot .chat-avatar {
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  border: 2px solid rgba(34, 211, 238, 0.3);
}

.chat-message.user .chat-avatar {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  border: 2px solid rgba(100, 116, 139, 0.3);
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message.bot .chat-bubble {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(56, 189, 248, 0.1) 100%);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: #e2e8f0;
  border-radius: 16px 16px 16px 4px;
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.3) 0%, rgba(71, 85, 105, 0.2) 100%);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #f1f5f9;
  border-radius: 16px 16px 4px 16px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.chat-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

/* إدخال الشات بوت */
.chatbot-input-area {
  padding: 20px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.5);
  border-radius: 0 0 24px 24px;
}

.chatbot-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 4px 4px 4px 16px;
  transition: all 0.3s ease;
}

.chatbot-input-wrapper:focus-within {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.chatbot-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 14px;
  padding: 10px 0;
}

.chatbot-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.chatbot-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #020617;
}

.chatbot-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.4);
}

.chatbot-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* أنيميشنات */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  /* شات بوت: نافذة كاملة الشاشة على الجوال */
  .chatbot-window {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
  }

  .chatbot-header {
    border-radius: 0;
    padding: 16px 20px;
  }

  .chatbot-input-area {
    border-radius: 0;
    /* رفع منطقة الإدخال فوق لوحة المفاتيح */
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  /* زر الشات بوت — أبعد عن حواف الشاشة */
  .chatbot-button {
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    left: 20px;
    width: 54px;
    height: 54px;
  }

  /* فقاعات الرسائل — عرض أوسع على الجوال */
  .chat-bubble {
    max-width: 85%;
    font-size: 13px;
  }
}

.chatbot-button .w-11{width:44px;height:44px}
.chatbot-window .w-5{width:20px;height:20px}
.chatbot-avatar .w-full{width:100%;height:100%}
.chatbot-window,.chatbot-window *{font-family:"IBM Plex Sans Arabic","Manrope",system-ui,sans-serif}
