/* Awad AI Simple v4.2 - Styles */

/* الزر الرئيسي */
.awad-ai-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin: 12px 0;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}
.awad-ai-trigger:hover {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}
.awad-ai-trigger:active { transform: translateY(0); }

/* Modal Overlay */
.awad-ai-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 20px;
  direction: rtl;
  animation: awad-fadein 0.2s;
}
@keyframes awad-fadein { from { opacity: 0; } to { opacity: 1; } }

.awad-ai-modal {
  background: #fff;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: awad-slideup 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}
@keyframes awad-slideup {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

.awad-ai-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #f3f4f6;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s;
  z-index: 5;
}
.awad-ai-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.awad-ai-content {
  padding: 32px 26px 24px;
  text-align: center;
}
.awad-ai-content h3 {
  font-size: 20px;
  color: #1f2937;
  margin: 0 0 8px;
  font-weight: 700;
}
.awad-ai-content p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 16px;
}
.awad-ai-sub { font-size: 13px !important; }

.awad-ai-icon {
  font-size: 50px;
  margin-bottom: 10px;
}

/* النص المعروض للتأكيد */
.awad-ai-text-box {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.7;
  text-align: right;
  max-height: 250px;
  overflow-y: auto;
  margin: 16px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* قائمة البيانات الناقصة */
.awad-ai-list {
  list-style: none;
  padding: 0;
  margin: 14px auto 18px;
  max-width: 240px;
  text-align: right;
}
.awad-ai-list li {
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #1f2937;
}

/* الأزرار */
.awad-ai-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* بطاقات الخيارات */
.awad-ai-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.awad-ai-option-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: all 0.2s;
}
.awad-ai-option-card:hover {
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
  transform: translateY(-2px);
}
.awad-ai-option-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.awad-ai-option-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}
.awad-ai-option-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
}

/* حقل الكتابة في الـ modal */
.awad-ai-write-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 130px;
  direction: rtl;
  text-align: right;
  box-sizing: border-box;
  margin-top: 12px;
  transition: border-color 0.15s;
}
.awad-ai-write-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.awad-ai-hint-text {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
  text-align: right;
}

.awad-ai-btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.awad-ai-btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.awad-ai-btn-primary:hover {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.awad-ai-btn-ghost {
  background: #f3f4f6;
  color: #4b5563;
}
.awad-ai-btn-ghost:hover {
  background: #e5e7eb;
}

/* Loading */
.awad-ai-center { padding: 50px 26px !important; }
.awad-ai-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #ede9fe;
  border-top-color: #8b5cf6;
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: awad-spin 0.8s linear infinite;
}
@keyframes awad-spin { to { transform: rotate(360deg); } }

/* Highlight بعد الاعتماد */
.awad-ai-highlight {
  animation: awad-pulse 2s ease-out;
}
@keyframes awad-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Mobile */
@media (max-width: 480px) {
  .awad-ai-content { padding: 26px 18px 20px; }
  .awad-ai-buttons { flex-direction: column-reverse; }
  .awad-ai-btn { width: 100%; }
}
