body { direction: rtl; }
#aiFaBtn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #0073aa;
  color: white;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  z-index: 99999;
}
#aiFaBox {
  position: fixed;
  bottom: 90px;
  left: 20px;
  width: 340px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
}
#aiFaBox.open { display: flex; animation: fadeIn .25s; }
.ai-fa-header {
  background: #0073aa;
  color: white;
  padding: 10px;
  text-align: center;
  position: relative;
}
#aiFaClose {
  position: absolute;
  left: 10px;
  top: 5px;
  cursor: pointer;
}
.ai-fa-body {
  display: flex;
  flex-direction: column;
  padding: 10px;
}
#aiFaInput {
  resize: none;
  padding: 8px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 8px;
}
#aiFaSend {
  background: #0073aa;
  color: white;
  border: none;
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
#aiFaResponse {
  padding: 10px;
  border-top: 1px solid #eee;
  background: #f9f9f9;
  font-size: 14px;
}
.thinking {
  color: gray;
  font-style: italic;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9);}
  to { opacity: 1; transform: scale(1);}
}