/* ============================================================
   Article Ask — زر "اسأل الذكاء الاصطناعي عن المقال" + نافذة المحادثة
   مظهر بريميوم للديسكتوب والموبايل. الأصول تُحمَّل lazy في الأقسام
   المفعَّلة فقط — صفر تأثير على باقي الموقع.
   البادئة: aask-
   ============================================================ */

/* ====================== CTA داخل المقال ====================== */
.aask-cta-wrap {
  margin: 26px 0 18px;
}
.aask-cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  text-align: right;
  color: #fff;
  background: linear-gradient(120deg, #4F46E5 0%, #7C3AED 35%, #2563EB 70%, #4F46E5 100%);
  background-size: 280% 280%;
  animation: aaskFlow 7s ease infinite;
  box-shadow: 0 10px 28px -8px rgba(79, 70, 229, 0.55), 0 2px 8px rgba(79, 70, 229, 0.25);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.aask-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(79, 70, 229, 0.65), 0 4px 12px rgba(79, 70, 229, 0.3); }
.aask-cta:active { transform: translateY(0) scale(0.99); }
@keyframes aaskFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* حلقة نبض حول الزر — تلفت النظر */
.aask-cta-ring {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.55);
  animation: aaskPulse 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: -1;
}
@keyframes aaskPulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}
.aask-cta-ico {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  animation: aaskTwinkle 2.4s ease-in-out infinite;
}
@keyframes aaskTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(8deg); }
}
.aask-cta-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aask-cta-title {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.4;
}
.aask-cta-sub {
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.88;
  line-height: 1.5;
}
.aask-cta-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  opacity: 0.85;
  animation: aaskNudge 1.6s ease-in-out infinite;
}
@keyframes aaskNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}
/* لمعة تمسح الزر */
.aask-cta-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 55%;
  left: -60%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: aaskShine 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes aaskShine {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

/* ====================== Overlay + النافذة ====================== */
.aask-ov {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.aask-ov.aask-open { opacity: 1; pointer-events: auto; }

.aask-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 580px;
  max-height: min(86vh, 760px);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFF 100%);
  border-radius: 24px;
  box-shadow: 0 30px 80px -18px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  transform: translateY(26px) scale(0.97);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.21, 1.02, 0.55, 1), opacity 0.25s ease;
}
.aask-ov.aask-open .aask-modal { transform: translateY(0) scale(1); opacity: 1; }

/* مقبض سحب (موبايل) */
.aask-handle {
  display: none;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: #CBD5E1;
  margin: 10px auto 0;
}

/* ====================== الهيدر ====================== */
.aask-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  background:
    radial-gradient(1100px 220px at 85% -60%, rgba(124, 58, 237, 0.16), transparent 60%),
    radial-gradient(900px 200px at 10% -50%, rgba(37, 99, 235, 0.14), transparent 60%);
  border-bottom: 1px solid #EEF2F7;
}
.aask-avatar {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(124, 58, 237, 0.35);
}
.aask-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(124, 58, 237, 0.55);
  border-left-color: rgba(37, 99, 235, 0.45);
  animation: aaskSpin 3.2s linear infinite;
}
@keyframes aaskSpin { to { transform: rotate(360deg); } }
.aask-head-txt { flex: 1 1 auto; min-width: 0; }
.aask-head-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aask-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #047857;
  background: #D1FAE5;
  border-radius: 20px;
  padding: 2px 8px;
}
.aask-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  animation: aaskBlink 1.4s ease-in-out infinite;
}
@keyframes aaskBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.aask-head-sub { font-size: 12px; color: #64748B; margin-top: 2px; }
.aask-quota {
  display: none;
  font-size: 11px;
  font-weight: 700;
  color: #4338CA;
  background: #EEF2FF;
  border-radius: 20px;
  padding: 2px 9px;
  margin-top: 5px;
  width: fit-content;
}
.aask-quota.aask-quota-low { color: #B45309; background: #FEF3C7; }
.aask-close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #F1F5F9;
  color: #475569;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}
.aask-close:hover { background: #E2E8F0; transform: rotate(90deg); }

/* شريحة عنوان المقال */
.aask-art-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 18px 0;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #E8EDF5;
  border-radius: 12px;
  font-size: 12px;
  color: #475569;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.aask-art-chip .aask-art-ico { flex: 0 0 auto; font-size: 14px; }
.aask-art-chip .aask-art-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: #1E293B;
}

/* ====================== جسم المحادثة ====================== */
.aask-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aask-list {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
  padding: 16px 18px 8px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; /* momentum scroll على iOS */
  touch-action: pan-y;
}
.aask-list::-webkit-scrollbar { width: 5px; }
.aask-list::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }

/* welcome */
.aask-welcome { text-align: center; padding: 16px 8px 10px; }
.aask-welcome-emoji {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 10px;
  display: inline-block;
  animation: aaskFloat 3s ease-in-out infinite;
}
@keyframes aaskFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.aask-welcome-title { font-size: 16px; font-weight: 800; color: #0F172A; margin-bottom: 5px; }
.aask-welcome-text { font-size: 13px; color: #64748B; line-height: 1.7; max-width: 380px; margin: 0 auto; }

/* اقتراحات */
.aask-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px 4px 6px;
}
.aask-suggest button {
  border: 1px solid #E0E7FF;
  background: linear-gradient(180deg, #FFFFFF, #F5F7FF);
  color: #4338CA;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(67, 56, 202, 0.08);
}
.aask-suggest button:hover {
  background: #EEF2FF;
  border-color: #C7D2FE;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(67, 56, 202, 0.14);
}

/* رسائل */
.aask-msg { display: flex; margin-bottom: 12px; animation: aaskMsgIn 0.28s ease; }
@keyframes aaskMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.aask-msg-user { justify-content: flex-start; }
.aask-msg-bot, .aask-msg-typing, .aask-msg-error { justify-content: flex-end; flex-direction: row-reverse; gap: 8px; }
.aask-bot-ico {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  box-shadow: 0 0 0 1px #E0E7FF;
  align-self: flex-end;
}
.aask-bubble {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.7;
  word-wrap: break-word;
}
.aask-msg-user .aask-bubble {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px -2px rgba(99, 102, 241, 0.35);
  white-space: pre-wrap;
}
.aask-msg-bot .aask-bubble {
  background: #fff;
  color: #1E293B;
  border-bottom-left-radius: 6px;
  border: 1px solid #EAEFF7;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.aask-msg-error .aask-bubble {
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  color: #991B1B;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}
/* typing dots */
.aask-typing-bubble {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 14px 18px;
}
.aask-typing-bubble span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #A5B4FC;
  animation: aaskDots 1.2s ease-in-out infinite;
}
.aask-typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.aask-typing-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aaskDots {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}
/* (رسالة "نُشر كتعليق" استُبدلت بزر الواتساب — انظر .aask-wa-* في الأسفل) */

/* === تنسيق إجابة المساعد (Markdown → HTML آمن — classes: acask-*) === */
.aask-bubble .acask-p { margin: 0 0 8px; }
.aask-bubble .acask-p:last-child { margin-bottom: 0; }
.aask-bubble .acask-h {
  font-weight: 800;
  font-size: 14.5px;
  color: #4338CA;
  margin: 10px 0 6px;
}
.aask-bubble .acask-h:first-child { margin-top: 0; }
.aask-bubble .acask-ul, .aask-bubble .acask-ol { margin: 4px 0 10px; padding-right: 20px; }
.aask-bubble .acask-ul li, .aask-bubble .acask-ol li { margin-bottom: 5px; }
.aask-bubble .acask-hr { border: none; border-top: 1px dashed #CBD5E1; margin: 10px 0; }
.aask-bubble code {
  background: rgba(99, 102, 241, 0.08);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 13px;
  direction: ltr;
  display: inline-block;
}

/* ====================== الإدخال ====================== */
.aask-composer {
  flex: 0 0 auto;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #EEF2F7;
  /* لو الحقول كثيرة (أحلام + سؤال أمني) على شاشة قصيرة: الحقول نفسها تسكرول
     بدل ما تزق قائمة الرسائل لصفر — السكرول دايماً مظبوط */
  max-height: 46%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.aask-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.aask-name-row label { font-size: 11.5px; color: #64748B; font-weight: 700; white-space: nowrap; }
.aask-name {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.aask-name:focus { border-color: #A5B4FC; background: #fff; }
.aask-input-row { display: flex; gap: 8px; align-items: flex-end; }
.aask-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: #0F172A;
  background: #F8FAFC;
  outline: none;
  resize: none;
  max-height: 110px;
  line-height: 1.5;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.aask-input:focus {
  border-color: #818CF8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}
.aask-send {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.45);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.aask-send:hover { transform: translateY(-1px); box-shadow: 0 7px 16px -2px rgba(99, 102, 241, 0.55); }
.aask-send:disabled { opacity: 0.55; cursor: default; transform: none; }
.aask-send.aask-sending svg { animation: aaskSendPulse 0.9s ease-in-out infinite; }
@keyframes aaskSendPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.84); } }

/* ====================== شاشة الشير (فتح سؤال إضافي) ====================== */
.aask-share {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(248, 250, 255, 0.96);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: aaskMsgIn 0.25s ease;
}
.aask-share-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid #E8EDF5;
  border-radius: 20px;
  box-shadow: 0 18px 50px -12px rgba(15, 23, 42, 0.25);
  padding: 20px;
  text-align: center;
}
.aask-share-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: #B45309;
  background: #FEF3C7;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 10px;
}
.aask-share-title { font-size: 17px; font-weight: 800; color: #0F172A; margin: 0 0 6px; }
.aask-share-text { font-size: 13px; color: #64748B; line-height: 1.7; margin: 0 0 14px; }
.aask-share-article {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: right;
  background: #F8FAFC;
  border: 1px solid #EEF2F7;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 14px;
}
.aask-share-img {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}
.aask-share-article-info { flex: 1 1 auto; min-width: 0; }
.aask-share-article-label { font-size: 10.5px; color: #94A3B8; font-weight: 700; margin-bottom: 3px; }
.aask-share-article-title {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aask-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: #1877F2;
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px -4px rgba(24, 119, 242, 0.5);
  transition: transform 0.18s, box-shadow 0.18s;
}
.aask-share-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 20px -4px rgba(24, 119, 242, 0.6); }
.aask-share-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  margin-top: 12px;
  min-height: 20px;
}
.aask-share-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #C7D2FE;
  border-top-color: #4F46E5;
  border-radius: 50%;
  animation: aaskSpin 0.8s linear infinite;
}
.aask-share-cancel {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 10px;
  cursor: pointer;
  text-decoration: underline;
}

/* ====================== موبايل: bottom sheet ====================== */
@media (max-width: 640px) {
  .aask-ov { padding: 0; align-items: flex-end; }
  .aask-modal {
    max-width: 100%;
    height: auto;
    max-height: 92dvh;
    min-height: 55dvh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }
  .aask-ov.aask-open .aask-modal { transform: translateY(0); }
  .aask-handle { display: block; }
  .aask-head { padding-top: 10px; }
  .aask-bubble { max-width: 88%; font-size: 14px; }
  .aask-cta { padding: 14px 14px; gap: 11px; }
  .aask-cta-title { font-size: 15px; }
  .aask-cta-sub { font-size: 11.5px; }
  .aask-cta-ico { width: 42px; height: 42px; }
}

/* ====================== تقليل الحركة ====================== */
@media (prefers-reduced-motion: reduce) {
  .aask-cta, .aask-cta-ring, .aask-cta-ico, .aask-cta-arrow, .aask-cta-shine,
  .aask-avatar::after, .aask-welcome-emoji, .aask-live::before {
    animation: none !important;
  }
  .aask-modal, .aask-ov { transition-duration: 0.15s !important; }
}

/* ====================== الزر العائم (FAB) — فوق زر الاستكشاف ====================== */
/* position:fixed → صفر CLS. كل الأنيميشن transform/opacity → GPU، صفر تأثير PageSpeed */
.aask-fab {
  position: fixed;
  /* فوق زر الاستكشاف وفوق فقاعات إشعاراته:
     75px (مكانه) + 58px (ارتفاعه) + 10px + ~44px (فقاعة الإشعار) + هامش */
  bottom: 192px;
  left: 18px;
  z-index: 997;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #2563EB 100%);
  background-size: 220% 220%;
  animation: aaskFlow 6s ease infinite, aaskFabEnter 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 8px 24px -6px rgba(79, 70, 229, 0.6), 0 2px 8px rgba(79, 70, 229, 0.3);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.aask-fab:hover { transform: scale(1.08); box-shadow: 0 12px 30px -6px rgba(79, 70, 229, 0.7); }
.aask-fab:active { transform: scale(0.96); }
/* لو زر الاستكشاف مش موجود في القسم ده → الزر ياخد مكانه */
.aask-fab.aask-fab-low { bottom: 75px; }
@keyframes aaskFabEnter {
  0% { opacity: 0; transform: scale(0.4) translateY(40px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
/* حلقة نبض */
.aask-fab-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5);
  animation: aaskPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.aask-fab-core {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.aask-fab-emoji {
  font-size: 27px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  animation: aaskFabBob 2.8s ease-in-out infinite;
}
@keyframes aaskFabBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-3px) rotate(-6deg); }
  60% { transform: translateY(0) rotate(5deg); }
}
.aask-fab-spark {
  position: absolute;
  top: 6px;
  right: 7px;
  animation: aaskTwinkle 2s ease-in-out infinite;
}
/* نقطة تنبيه خضراء — تثير الفضول */
.aask-fab-dot {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22C55E;
  border: 2px solid #fff;
  animation: aaskBlink 1.6s ease-in-out infinite;
}
/* فقاعة تلميح تظهر وتختفي دورياً — CSS فقط */
.aask-fab-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: #fff;
  color: #1E293B;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  padding: 8px 13px;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 8px 22px -6px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(226, 232, 240, 0.8);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.85);
  transform-origin: 22px bottom;
  animation: aaskBubblePeek 9s ease-in-out infinite 1.4s;
}
.aask-fab-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 18px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #fff;
}
@keyframes aaskBubblePeek {
  0%, 8%   { opacity: 0; transform: translateY(8px) scale(0.85); }
  12%, 38% { opacity: 1; transform: translateY(0) scale(1); }
  44%, 100% { opacity: 0; transform: translateY(8px) scale(0.85); }
}
@media (min-width: 769px) {
  .aask-fab { width: 62px; height: 62px; bottom: 205px; }
  .aask-fab.aask-fab-low { bottom: 80px; }
  .aask-fab-emoji { font-size: 29px; }
}

/* ====================== زر واتساب — "ابعت الإجابة لنفسك" ====================== */
.aask-wa-wrap {
  margin: 2px 38px 14px 0;
  animation: aaskMsgIn 0.35s ease;
}
.aask-wa-cap {
  font-size: 12px;
  font-weight: 800;
  color: #047857;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.aask-wa-cap .aask-wa-cap-emoji {
  display: inline-block;
  animation: aaskFabBob 2.2s ease-in-out infinite;
}
.aask-wa-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 12px 14px;
  text-align: right;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, #059669 0%, #10B981 35%, #0D9488 70%, #059669 100%);
  background-size: 260% 260%;
  animation: aaskFlow 5.5s ease infinite;
  box-shadow: 0 8px 22px -6px rgba(16, 185, 129, 0.55), 0 2px 7px rgba(16, 185, 129, 0.25);
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.aask-wa-btn:hover { transform: translateY(-2px); box-shadow: 0 13px 30px -6px rgba(16, 185, 129, 0.65); }
.aask-wa-btn:active { transform: scale(0.985); }
/* حلقة نبض خضراء */
.aask-wa-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: aaskWaPulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: -1;
}
@keyframes aaskWaPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.aask-wa-ico {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  animation: aaskTwinkle 2.3s ease-in-out infinite;
}
.aask-wa-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aask-wa-title { font-size: 14px; font-weight: 800; line-height: 1.45; }
.aask-wa-sub { font-size: 11.5px; font-weight: 600; opacity: 0.92; line-height: 1.5; }
.aask-wa-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  opacity: 0.9;
  animation: aaskNudge 1.5s ease-in-out infinite;
}
/* لمعة تمسح الزر */
.aask-wa-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  left: -55%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: aaskShine 3.6s ease-in-out infinite;
  pointer-events: none;
}
@media (max-width: 640px) {
  .aask-wa-wrap { margin-right: 34px; }
  .aask-wa-title { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .aask-fab, .aask-fab-ring, .aask-fab-emoji, .aask-fab-spark, .aask-fab-dot, .aask-fab-bubble,
  .aask-wa-btn, .aask-wa-btn::before, .aask-wa-ico, .aask-wa-arrow, .aask-wa-shine, .aask-wa-cap .aask-wa-cap-emoji {
    animation: none !important;
  }
  .aask-fab-bubble { opacity: 0; }
}

/* ====================== ثيمات الأقسام المتخصصة ====================== */
/* كل قسم تفاعلي له زر عائم بهوية لونية تناسبه + نافذة بنفس الأكسنت.
   الثيم class يتحط على الـ FAB وعلى الـ overlay (aask-th-*) */

/* — الأحلام 🌙: ليلي بنفسجي عميق — */
.aask-fab--dream { background: linear-gradient(135deg, #312E81 0%, #6D28D9 45%, #4338CA 100%); background-size: 220% 220%; box-shadow: 0 8px 24px -6px rgba(109, 40, 217, 0.65), 0 2px 8px rgba(49, 46, 129, 0.4); }
.aask-fab--dream .aask-fab-ring { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.55); }
.aask-th-dream .aask-send { background: linear-gradient(135deg, #4338CA, #7C3AED); }
.aask-th-dream .aask-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(109, 40, 217, 0.45); }
.aask-th-dream .aask-suggest button { color: #5B21B6; border-color: #DDD6FE; }

/* — الأدعية 🤲: زمردي هادئ بلمسة ذهبية — */
.aask-fab--dua { background: linear-gradient(135deg, #065F46 0%, #0D9488 45%, #B45309 130%); background-size: 220% 220%; box-shadow: 0 8px 24px -6px rgba(13, 148, 136, 0.6), 0 2px 8px rgba(6, 95, 70, 0.35); }
.aask-fab--dua .aask-fab-ring { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
.aask-th-dua .aask-send { background: linear-gradient(135deg, #047857, #0D9488); }
.aask-th-dua .aask-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(13, 148, 136, 0.45); }
.aask-th-dua .aask-suggest button { color: #065F46; border-color: #A7F3D0; }

/* — الترددات 📡: سماوي تقني — */
.aask-fab--freq { background: linear-gradient(135deg, #0369A1 0%, #06B6D4 50%, #2563EB 100%); background-size: 220% 220%; box-shadow: 0 8px 24px -6px rgba(6, 182, 212, 0.6), 0 2px 8px rgba(3, 105, 161, 0.35); }
.aask-fab--freq .aask-fab-ring { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.55); }
.aask-th-freq .aask-send { background: linear-gradient(135deg, #0284C7, #06B6D4); }
.aask-th-freq .aask-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(6, 182, 212, 0.45); }
.aask-th-freq .aask-suggest button { color: #075985; border-color: #BAE6FD; }

/* — الخدمات السعودية 🇸🇦: أخضر سعودي — */
.aask-fab--service { background: linear-gradient(135deg, #14532D 0%, #16A34A 55%, #0D9488 100%); background-size: 220% 220%; box-shadow: 0 8px 24px -6px rgba(22, 163, 74, 0.6), 0 2px 8px rgba(20, 83, 45, 0.35); }
.aask-fab--service .aask-fab-ring { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
.aask-th-service .aask-send { background: linear-gradient(135deg, #15803D, #16A34A); }
.aask-th-service .aask-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(22, 163, 74, 0.45); }
.aask-th-service .aask-suggest button { color: #14532D; border-color: #BBF7D0; }

/* أفاتار النافذة بالإيموجي بدل الـ SVG في أوضاع الأقسام */
.aask-avatar-emoji { font-size: 22px; line-height: 1; }

/* ====================== خيارات الأقسام (بيلز بريميوم بدل select) ====================== */
.aask-opts { margin-bottom: 10px; }
.aask-opt-group {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.aask-opt-group[hidden] { display: none; }
.aask-opt-group:last-child { margin-bottom: 0; }
.aask-opt-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: #64748B;
  min-width: 38px;
}
.aask-opt-pills {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.aask-opt-pill {
  position: relative;
  border: 1.5px solid #E2E8F0;
  background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
  color: #475569;
  font-size: 12.5px;
  font-weight: 800;
  font-family: inherit;
  padding: 7px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  -webkit-tap-highlight-color: transparent;
}
.aask-opt-pill:hover {
  border-color: #C7D2FE;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.14);
}
.aask-opt-pill.on {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 5px 14px -3px rgba(99, 102, 241, 0.55);
  animation: aaskPillPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.aask-opt-pill.on::after {
  content: '✓';
  font-size: 10px;
  margin-right: 5px;
  opacity: 0.95;
}
@keyframes aaskPillPop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
/* كشف صف الحالة الاجتماعية بأنيميشن لطيف */
.aask-opt-reveal { animation: aaskOptReveal 0.35s cubic-bezier(0.21, 1.02, 0.55, 1); }
@keyframes aaskOptReveal {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}
/* ثيمات البيلز حسب القسم */
.aask-th-dream .aask-opt-pill.on { background: linear-gradient(135deg, #4338CA, #7C3AED); }
.aask-th-dua .aask-opt-pill.on { background: linear-gradient(135deg, #047857, #0D9488); }
.aask-th-freq .aask-opt-pill.on { background: linear-gradient(135deg, #0284C7, #06B6D4); }
.aask-th-service .aask-opt-pill.on { background: linear-gradient(135deg, #15803D, #16A34A); }

/* ====================== السؤال الأمني — ستايل بريميوم ====================== */
.aask-sec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.aask-sec-chip {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 800;
  color: #92400E;
  background: linear-gradient(180deg, #FEF3C7, #FDE68A55);
  border: 1px solid #FDE68A;
  border-radius: 20px;
  padding: 6px 12px;
  white-space: nowrap;
}
.aask-sec-row input {
  flex: 1 1 120px;
  min-width: 0;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.aask-sec-row input:focus {
  border-color: #FCD34D;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.2);
}

/* ====================== زر "استفسر مرة أخرى" — بعد كل إجابة ====================== */
.aask-again-wrap { animation: aaskMsgIn 0.35s ease; }
.aask-again {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 13px 16px;
  text-align: right;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, #4F46E5 0%, #7C3AED 40%, #2563EB 80%, #4F46E5 100%);
  background-size: 260% 260%;
  animation: aaskFlow 6s ease infinite;
  box-shadow: 0 8px 22px -6px rgba(79, 70, 229, 0.55), 0 2px 7px rgba(79, 70, 229, 0.25);
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.aask-again:hover { transform: translateY(-2px); box-shadow: 0 13px 30px -6px rgba(79, 70, 229, 0.65); }
.aask-again:active { transform: scale(0.985); }
.aask-again::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5);
  animation: aaskPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: -1;
}
.aask-again-ico {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 21px;
  animation: aaskTwinkle 2.3s ease-in-out infinite;
}
.aask-again-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aask-again-title { font-size: 14.5px; font-weight: 800; line-height: 1.45; }
.aask-again-sub { font-size: 11.5px; font-weight: 600; opacity: 0.92; line-height: 1.5; }
.aask-again-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  opacity: 0.9;
  animation: aaskNudge 1.5s ease-in-out infinite;
}
.aask-again-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  left: -55%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: aaskShine 3.8s ease-in-out infinite;
  pointer-events: none;
}
/* ثيمات زر الاستفسار حسب القسم */
.aask-th-dream .aask-again { background: linear-gradient(120deg, #312E81 0%, #6D28D9 45%, #4338CA 90%, #312E81 100%); background-size: 260% 260%; box-shadow: 0 8px 22px -6px rgba(109, 40, 217, 0.6); }
.aask-th-dua .aask-again { background: linear-gradient(120deg, #065F46 0%, #0D9488 45%, #047857 90%, #065F46 100%); background-size: 260% 260%; box-shadow: 0 8px 22px -6px rgba(13, 148, 136, 0.55); }
.aask-th-freq .aask-again { background: linear-gradient(120deg, #0369A1 0%, #06B6D4 50%, #2563EB 90%, #0369A1 100%); background-size: 260% 260%; box-shadow: 0 8px 22px -6px rgba(6, 182, 212, 0.55); }
.aask-th-service .aask-again { background: linear-gradient(120deg, #14532D 0%, #16A34A 55%, #0D9488 90%, #14532D 100%); background-size: 260% 260%; box-shadow: 0 8px 22px -6px rgba(22, 163, 74, 0.55); }
