/* Shagf AI assistant widget — floating launcher + chat panel (RTL). */
.shagf-assist { direction: rtl; font-family: inherit; }

.shagf-assist .sa-fab {
  position: fixed; bottom: 22px; left: 22px; z-index: 1050;
  display: flex; align-items: center; gap: 8px;
  background: #4338CA; color: #fff; border: none; cursor: pointer;
  padding: 12px 18px; border-radius: 30px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(67,56,202,.35);
}
.shagf-assist .sa-spark { font-size: 15px; }

.shagf-assist .sa-panel {
  position: fixed; bottom: 22px; left: 22px; z-index: 1051;
  width: 390px; max-width: calc(100vw - 44px);
  height: 540px; max-height: calc(100vh - 90px);
  background: #fff; border: 1px solid #E8EAF1; border-radius: 18px;
  box-shadow: 0 20px 50px rgba(20,22,40,.28);
  display: flex; flex-direction: column; overflow: hidden;
}
.shagf-assist .sa-head {
  background: #4338CA; color: #fff; padding: 13px 15px;
  display: flex; align-items: center; gap: 10px;
}
.shagf-assist .sa-av {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center;
}
.shagf-assist .sa-t { font-size: 14px; font-weight: 650; }
.shagf-assist .sa-s { font-size: 11px; opacity: .85; }
.shagf-assist .sa-x {
  margin-inline-start: auto; background: none; border: none; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; opacity: .9;
}
.shagf-assist .sa-msgs {
  flex: 1; overflow-y: auto; padding: 15px; background: #FBFBFE;
  display: flex; flex-direction: column; gap: 12px;
}
.shagf-assist .sa-msg {
  max-width: 85%; font-size: 13.5px; line-height: 1.55;
  padding: 10px 13px; border-radius: 14px;
}
.shagf-assist .sa-bot {
  align-self: flex-start; background: #fff; border: 1px solid #E8EAF1;
  color: #1B1E2B; border-bottom-right-radius: 4px;
}
.shagf-assist .sa-me {
  align-self: flex-end; background: #4338CA; color: #fff; border-bottom-left-radius: 4px;
}
.shagf-assist .sa-tool {
  align-self: flex-start; font-size: 11.5px; color: #3f37b8;
  background: #EEEFFD; padding: 6px 11px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 7px;
}
.shagf-assist .sa-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4338CA;
  animation: sa-pulse 1s infinite;
}
@keyframes sa-pulse { 0%,100% { opacity:.3 } 50% { opacity:1 } }
.shagf-assist .sa-chips {
  display: flex; flex-wrap: wrap; gap: 7px; padding: 0 15px 10px; background: #FBFBFE;
}
.shagf-assist .sa-chip {
  font-size: 12px; background: #fff; border: 1px solid #E8EAF1; color: #1B1E2B;
  border-radius: 16px; padding: 6px 11px; cursor: pointer;
}
.shagf-assist .sa-chip:hover { border-color: #4338CA; color: #4338CA; }
.shagf-assist .sa-composer {
  display: flex; gap: 8px; padding: 11px 12px; border-top: 1px solid #E8EAF1; background: #fff;
}
.shagf-assist .sa-composer input {
  flex: 1; border: 1px solid #E8EAF1; border-radius: 22px;
  padding: 9px 14px; font-size: 13.5px; outline: none; direction: rtl; font-family: inherit;
}
.shagf-assist .sa-composer input:focus { border-color: #4338CA; }
.shagf-assist .sa-composer button {
  background: #4338CA; color: #fff; border: none; width: 38px; height: 38px;
  border-radius: 50%; cursor: pointer; font-size: 16px; flex-shrink: 0;
}
.shagf-assist .sa-composer button[disabled] { opacity: .5; cursor: default; }
