/* Aurora Chat 前端容器级样式（不改变样例内部DOM与样式） */
.aurora-chat-container, [data-aurora-chat] {
  display: block;
}

/* 若样例未定义输出区滚动，可提供最小滚动能力（选择器尽量宽松但不覆盖样例定义） */
#aurora-chat-output, .aurora-chat-output, .aurora-chat pre.output {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 480px;
  overflow: auto;
}

/* 位置修饰类：为避免被样例内联样式覆盖，使用更高优先级与 !important */
#ai-chatbot-widget {
  z-index: 99999 !important; /* 提高层级，避免被主题悬浮按钮遮挡 */
}

#ai-chatbot-widget.pos-bottom-right {
  position: fixed !important;
  right: 20px !important;
  left: auto !important;
  bottom: 20px !important;
  top: auto !important;
}

#ai-chatbot-widget.pos-bottom-left {
  position: fixed !important;
  left: 20px !important;
  right: auto !important;
  bottom: 20px !important;
  top: auto !important;
}

/* 当悬浮在左侧时，对话面板从按钮左侧展开会溢出，改为从左侧贴齐展开 */
#ai-chatbot-widget.pos-bottom-left .ai-chatbot-container {
  left: 0 !important;
  right: auto !important;
  bottom: 70px !important; /* 与样例保持同等间距 */
}

#ai-chatbot-widget.pos-fixed-top {
  position: fixed !important;
  top: 20px !important;
  bottom: auto !important;
  right: 20px !important;
  left: auto !important;
}

/* 可选：侧边栏定位（因主题布局差异较大，仅提供最小化支持） */
#ai-chatbot-widget.pos-sidebar {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
}

/* 小屏幕下限制面板宽度，避免超出视口 */
@media (max-width: 480px) {
  #ai-chatbot-widget .ai-chatbot-container {
    width: calc(100vw - 40px) !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 20px !important;
  }
}
