/* مساعد ذكي — نفس هيكل صفحة الدعم، حقل نص فقط بدون مرفقات */
.chat-page--ai .chat-input-wrap--text-only {
  padding: 0 16px;
}

.chat-page--ai .chat-msg__bubble {
  white-space: pre-wrap;
}

.chat-page--ai .ai-chat-external-link {
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 800;
}

.chat-page--ai .chat-msg--admin .ai-chat-external-link {
  color: #a8e6cf;
}

.chat-page--ai .chat-msg--user .ai-chat-external-link {
  color: #e8f5f0;
}

.chat-msg--error .chat-msg__bubble {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.chat-page--ai .ai-chat-pending-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #515459;
}

.chat-page--ai .chat-msg--ai-pending .chat-msg__bubble {
  background: #e8eceb;
  color: #515459;
}

.chat-footer--ai {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.ai-chat-footer-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-chat-footer-row .chat-input-wrap {
  flex: 1;
  min-width: 0;
}

.ai-chat-textarea {
  min-height: 48px;
  max-height: 140px;
  resize: none;
  line-height: 1.45;
  field-sizing: content;
}

@supports not (field-sizing: content) {
  .ai-chat-textarea {
    min-height: 48px;
  }
}

.ai-chat-err-box {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  box-sizing: border-box;
}
