/* 聊天布局样式 */ /* 聊天容器 - 自适应布局 */ .chat-container { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; /* 允许flex子元素收缩 */ background: #fff; overflow: hidden; position: relative; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } /* 可调整高度的聊天容器 */ .chat-container-adjustable { /* display: flex; */ flex-direction: column; width: 100%; background: #fff; overflow: hidden; position: relative; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 高度将通过内联样式设置 */ } /* 聊天头部 */ .chat-header { flex-shrink: 0; height: 60px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 10; } .chat-header h1 { font-size: 18px; font-weight: 600; color: #1f2937; margin: 0; } /* 聊天消息列表容器 */ .chat-messages { flex: 1; min-height: 0; /* 允许flex子元素收缩 */ overflow-y: auto; overflow-x: hidden; padding: 20px; scroll-behavior: smooth; background: #f9fafb; position: relative; } /* 自定义滚动条 */ .chat-messages::-webkit-scrollbar { width: 6px; } .chat-messages::-webkit-scrollbar-track { background: transparent; } .chat-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; } .chat-messages::-webkit-scrollbar-thumb:hover { background: #9ca3af; } /* 新对话欢迎界面 */ .chat-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 40px 20px; } .chat-welcome h3 { font-size: 24px; font-weight: 600; color: #1f2937; margin-bottom: 12px; } .chat-welcome p { font-size: 16px; color: #6b7280; margin-bottom: 0; } /* 加载状态 */ .chat-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 16px; } .chat-loading .ant-spin { font-size: 24px; } /* 错误状态 */ .chat-error { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 40px 20px; } .chat-error h2 { font-size: 20px; font-weight: 600; color: #dc2626; margin-bottom: 12px; } .chat-error p { font-size: 14px; color: #6b7280; margin-bottom: 0; } /* 侧边栏滚动区域样式 */ .h-full.overflow-y-auto::-webkit-scrollbar { width: 6px; } .h-full.overflow-y-auto::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 3px; } .h-full.overflow-y-auto::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; transition: background-color 0.2s ease; } .h-full.overflow-y-auto::-webkit-scrollbar-thumb:hover { background: #9ca3af; } /* Firefox 滚动条样式 */ .h-full.overflow-y-auto { scrollbar-width: thin; scrollbar-color: #d1d5db #f8f9fa; } /* 响应式设计 */ @media (max-width: 1200px) { .chat-container { border-radius: 4px; } .chat-messages { padding: 16px; } } @media (max-width: 768px) { .chat-container { border-radius: 0; box-shadow: none; } .chat-messages { padding: 12px; } .chat-header { padding: 0 16px; height: 56px; } .chat-header h1 { font-size: 16px; } } @media (max-width: 480px) { .chat-messages { padding: 8px; } .chat-welcome { padding: 20px 12px; } .chat-welcome h3 { font-size: 18px; } .chat-welcome p { font-size: 14px; } } /* 全局按钮主题色统一 */ .ant-btn-primary { background-color: rgb(0, 104, 74) !important; border-color: rgb(0, 104, 74) !important; } .ant-btn-primary:hover { background-color: rgba(0, 104, 74, 0.8) !important; border-color: rgba(0, 104, 74, 0.8) !important; } .ant-btn-primary:focus { background-color: rgb(0, 104, 74) !important; border-color: rgb(0, 104, 74) !important; } .ant-btn-primary:active { background-color: rgba(0, 104, 74, 0.9) !important; border-color: rgba(0, 104, 74, 0.9) !important; } /* 禁用状态保持原样 */ .ant-btn-primary:disabled { background-color: rgba(0, 0, 0, 0.04) !important; border-color: #d9d9d9 !important; color: rgba(0, 0, 0, 0.25) !important; } /* 链接按钮主题色 */ .ant-btn-link { color: rgb(0, 104, 74) !important; } .ant-btn-link:hover { color: rgba(0, 104, 74, 0.8) !important; } .ant-btn-link:focus { color: rgb(0, 104, 74) !important; } .ant-btn-link:active { color: rgba(0, 104, 74, 0.9) !important; }