/* Ava Soot Chat Widget - minimal, RTL friendly */
#avaSootChatRoot{display:contents;}

.ava-chat-launcher{
  position:fixed;
  inset-inline-end:16px;
  inset-block-end:16px;
  z-index:2147483000;
  border:none;
  border-radius:999px;
  padding:12px 14px;
  cursor:pointer;
  background:#0b5cff;
  color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  display:flex;
  align-items:center;
  gap:8px;
}

html[lang="en"] .ava-chat-launcher {
  inset-inline-start: 16px;  /* سمت چپ در حالت LTR */
  inset-inline-end: auto;    /* حذف سمت راست */
}

.ava-chat-launcher .dot{
  width:10px;height:10px;border-radius:50%;
  background:rgba(255,255,255,.75);
  box-shadow:0 0 0 6px rgba(255,255,255,.16);
}
.ava-chat-panel{
  position:fixed;
  inset-inline-end:16px;
  inset-block-end:72px;
  width:min(380px, calc(100vw - 32px));
  height:min(520px, calc(100vh - 120px));
  z-index:2147483001;
  background:#fff;
  border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,.22);
  overflow:hidden;
  display:none;
  direction:rtl;
  font-family:inherit;
}
.ava-chat-panel.open{display:flex;flex-direction:column;}
.ava-chat-head{
  padding:12px 12px;
  border-bottom:1px solid rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:rgba(11,92,255,.06);
}
.ava-chat-title{font-weight:700;font-size:14px;}
.ava-chat-status{font-size:12px;opacity:.75}
.ava-chat-close{
  border:none;background:transparent;
  font-size:20px; line-height:1;
  cursor:pointer; opacity:.7;
}
.ava-chat-body{
  padding:12px;
  overflow:auto;
  flex:1;
  background:#fff;
}
.ava-chat-msg{
  max-width:90%;
  padding:10px 12px;
  border-radius:14px;
  margin:8px 0;
  font-size:13px;
  line-height:1.7;
  animation: ava-chat-fade-in .2s ease;
  /*white-space:pre-wrap;*/
  /*word-wrap:break-word;*/
}
.ava-chat-msg.user{margin-inline-start:auto;background:#0b5cff;color:#fff;border-bottom-right-radius:6px;}
.ava-chat-msg.bot{margin-inline-end:auto;background:#f3f5f7;color:#111;border-bottom-left-radius:6px;}
.ava-chat-msg.ava-thinking{
  font-style:italic;
  opacity:.9;
  display:flex;
  align-items:center;
  gap:8px;
}

.ava-msg{
  display:flex;
  width:100%;
}
.ava-msg .ava-bubble{
  max-width:90%;
  padding:10px 12px;
  border-radius:14px;
  font-size:13px;
  line-height:1.7;
  animation: ava-chat-fade-in .2s ease;
  /*white-space:pre-wrap;*/
  /*word-wrap:break-word;*/
}
.ava-msg.ava-user{justify-content:flex-start;}
.ava-msg.ava-user .ava-bubble{
  background:#0b5cff;
  color:#fff;
  border-bottom-right-radius:6px;
}
.ava-msg.ava-ai{justify-content:flex-end;}
.ava-msg.ava-ai .ava-bubble{
  background:#f3f5f7;
  color:#111;
  border-bottom-left-radius:6px;
}
.ava-msg.ava-thinking .ava-bubble{
  font-style:italic;
  opacity:.9;
  display:flex;
  align-items:center;
  gap:8px;
}
.ava-history{
  padding:12px;
}
.ava-tabs .nav-link{
  font-size:13px;
}
.ava-tabs .nav-link.active{
  font-weight:600;
}
.ava-history-head{
  font-size:13px;
}
.ava-history-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
}
.ava-tabs li {
  width: 49%;
}
.offcanvas, .offcanvas-xxl, .offcanvas-xl, .offcanvas-lg, .offcanvas-md, .offcanvas-sm {
  /*--bs-offcanvas-width: 500px !important;*/
}
.ava-history-item{
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  background:#f8fafc;
}
.ava-history-item.active{
  border-color:#0b5cff;
  background:#eaf0ff;
}
.ava-history-item-title{
  font-size:12px;
  font-weight:600;
}
.ava-history-item-meta{
  font-size:11px;
  opacity:.7;
}
.ava-chat-foot{
  padding:10px;
  border-top:1px solid rgba(0,0,0,.06);
  display:flex;
  gap:8px;
  background:#fff;
}
.ava-chat-input{
  flex:1;
  border:1px solid rgba(0,0,0,.15);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
  font-family:inherit;
}
.ava-chat-send{
  border:none;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  background:#0b5cff;
  color:#fff;
  font-family:inherit;
}
.ava-chat-send[disabled]{opacity:.5;cursor:not-allowed;}
.ava-typing-dots{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.ava-typing-dots i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
  opacity:.6;
  animation: ava-typing-bounce 1s infinite ease-in-out;
}
.ava-typing-dots i:nth-child(2){animation-delay:.15s;}
.ava-typing-dots i:nth-child(3){animation-delay:.3s;}
@keyframes ava-typing-bounce{
  0%, 80%, 100%{transform:translateY(0); opacity:.4;}
  40%{transform:translateY(-4px); opacity:1;}
}
@keyframes ava-chat-fade-in{
  from{opacity:0; transform:translateY(4px);}
  to{opacity:1; transform:translateY(0);}
}
@media (prefers-color-scheme: dark){
  .ava-chat-panel{background:#0f1115;color:#fff;}
  .ava-chat-body{background:#0f1115;}
  .ava-chat-head{background:rgba(11,92,255,.18); border-bottom-color:rgba(255,255,255,.10);}
  .ava-chat-foot{background:#0f1115;border-top-color:rgba(255,255,255,.10);}
  .ava-chat-input{background:#151823;color:#fff;border-color:rgba(255,255,255,.18);}
  .ava-chat-msg.bot{background:#151823;color:#fff;}
}
.c-animation{
  margin: auto;
  width: 70%;
  height: 50%;
  display: block;
}

#avaMessages{
  height: 78vh;
}
