/* 扣子智能客服样式优化 */

/* 确保客服浮动按钮在合适的位置 */
[data-testid='chat-app-sdk'] {
  z-index: 1000 !important;
}

/* 扣子浮动按钮位置调整到页面中间偏右 */
[data-testid='chat-app-sdk'] > div:first-child,
[data-testid='chat-app-sdk'] .coze-float-button,
.coze-web-chat-float-btn,
.coze-chat-float-btn {
  position: fixed !important;
  right: 50px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  bottom: unset !important;
  left: unset !important;
}

/* 额外的强制位置规则 - 确保覆盖所有可能的选择器 */
div[style*='position'][style*='bottom'],
div[style*='position: fixed'][style*='right'] {
  top: 50% !important;
  bottom: unset !important;
  transform: translateY(-50%) !important;
}

/* 客服浮动球样式优化 */
.coze-chat-float-btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.3s ease !important;
}

.coze-chat-float-btn:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

/* 聊天窗口样式优化 */
.coze-chat-window {
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden !important;
}

/* 聊天窗口标题栏 */
.coze-chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

/* 聊天区域滚动条样式 */
.coze-chat-content::-webkit-scrollbar {
  width: 6px !important;
}

.coze-chat-content::-webkit-scrollbar-track {
  background: #f1f1f1 !important;
  border-radius: 3px !important;
}

.coze-chat-content::-webkit-scrollbar-thumb {
  background: #c1c1c1 !important;
  border-radius: 3px !important;
}

.coze-chat-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .coze-chat-window {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
  }

  /* 移动端浮动按钮位置调整 */
  [data-testid='chat-app-sdk'] > div:first-child,
  [data-testid='chat-app-sdk'] .coze-float-button,
  .coze-web-chat-float-btn,
  .coze-chat-float-btn {
    right: 20px !important;
    top: 60% !important;
  }
}

/* 确保客服组件不被其他元素覆盖 */
.coze-chat-container * {
  box-sizing: border-box !important;
}

/* 优化输入框样式 */
.coze-chat-input {
  border-radius: 20px !important;
  border: 1px solid #e1e5e9 !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.coze-chat-input:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
  outline: none !important;
}

/* 发送按钮样式 */
.coze-chat-send-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  border-radius: 20px !important;
  color: white !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.coze-chat-send-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3) !important;
}

/* 消息气泡样式 */
.coze-message-bubble {
  border-radius: 16px !important;
  padding: 12px 16px !important;
  max-width: 80% !important;
  word-wrap: break-word !important;
}

.coze-message-user {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  margin-left: auto !important;
}

.coze-message-bot {
  background: #f8f9fa !important;
  color: #333 !important;
  border: 1px solid #e9ecef !important;
}
