/* كبسوولة "اسأل الذكاء الاصطناعي" */
.mi-cta{
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  border: none; cursor: pointer;
}
.mi-cta--pill{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 9999px;
  background: linear-gradient(135deg,#ff7a18,#ff6105);
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s;
}
.mi-cta--pill:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0,0,0,.28);
  opacity: .96;
}
.mi-cta__dot{
  width: 10px; height: 10px; border-radius: 50%;
  background:#ffe8d6; box-shadow: 0 0 0 3px rgba(255,255,255,.25) inset;
}
.mi-cta__label{ white-space: nowrap; letter-spacing: .2px; }
/* للموبايل: تتحول لدائرة */
@media (max-width: 480px){
  .mi-cta--pill{ padding: 0; width: 56px; height: 56px; border-radius: 50%; justify-content: center; }
  .mi-cta__label{ display:none; }
  .mi-cta__dot{ width: 12px; height: 12px; background:#fff; }
}

/* صندوق الدردشة */
.mi-chat{
  position:fixed; bottom:90px; right:20px; z-index:9999;
  width:340px; height:480px; display:none; flex-direction:column;
  background:#fff; border-radius:14px; overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
}
.mi-chat.open{ display:flex; }

/* الهيدر */
.mi-chat__header{
  background:#121212; color:#fff; padding:10px 12px;
  display:flex; align-items:center; justify-content:space-between; font-weight:600;
}
.mi-chat__close{ background:transparent; border:none; color:#fff; font-size:22px; cursor:pointer; }

/* الجسم والرسائل */
.mi-body{ flex:1; overflow:auto; padding:12px; background:#fafafa; }
.mi-msg{ margin:8px 0; max-width:80%; padding:8px 12px; border-radius:10px; line-height:1.5; }
.mi-msg.bot{ background:#f1f1f1; color:#222; align-self:flex-start; }
.mi-msg.user{ background:#ff6105; color:#fff; align-self:flex-end; }
.mi-time{ display:block; font-size:11px; opacity:.7; margin-top:4px; }

/* شريط الإدخال */
.mi-input{ display:flex; gap:6px; align-items:center; border-top:1px solid #eee; padding:10px; background:#fff; }
.mi-input input{ flex:1; border:1px solid #ddd; border-radius:10px; padding:10px 12px; font-size:14px; outline:none; }
.mi-input button{ border:none; border-radius:10px; padding:10px 12px; cursor:pointer; background:#121212; color:#fff; }
.mi-input .btn-secondary{ background:#e9e9e9; color:#222; }

/* شريحة المرفق */
#miChip{ display:none; font-size:12px; background:#fff3e9; color:#a34a05; border:1px dashed #ff6105; padding:4px 8px; border-radius:8px; margin:0 10px 10px; cursor:pointer; }

/* مؤشر الكتابة */
#miTyping{ display:none; font-size:12px; color:#777; padding:6px 12px; }
#miTyping.show{ display:block; }
