afee0dfa4d
- 品牌色橙#f08a31→HESUPIPE蓝#066fc0(取自官网主题CSS a:hover/导航主色),7槽位色板三处同步:theme.js/widget.js内联副本/style.css :root - chat.html/widget.js/js/chat.js:标题HESUPIPE Support、管道场景描述、欢迎语、热门话题Get Quotation/Pipe Specifications/Delivery & Shipping、WhatsApp+8615937108317、邮箱hesu@hesuu.com - 邀请卡文案管道化(pipe specs, MOQ, delivery timing)+GDPR小字;聊天面板footer GDPR行(复用.chat-footer) - admin.html VOLT→HESUPIPE;头像PIL重绘为品牌蓝底白H(512/128px) - widget-test.html色值同步+断言基准更新(浏览器断言9/9 Δ=0);.gitignore排除.playwright-mcp/ Co-Authored-By: Claude Code <noreply@anthropic.com>
474 lines
8.5 KiB
CSS
474 lines
8.5 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--w-primary: #066fc0;
|
|
--w-primary-rgb: 6, 111, 192;
|
|
--w-gradient-end: #0666bb;
|
|
--w-deep-text: #14517a;
|
|
--w-caption-text: #2174ab;
|
|
--w-soft-bg: #f3f9fe;
|
|
--w-border-soft: #bbdcf2;
|
|
--bg: #f5f5f5;
|
|
--chat-bg: #ffffff;
|
|
--ai-bubble: #f0f0f0;
|
|
--text: #333333;
|
|
--text-light: #666666;
|
|
--text-white: #ffffff;
|
|
--border: #e0e0e0;
|
|
--success: #34a853;
|
|
--shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.chat-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
background: var(--chat-bg);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
/* Header */
|
|
.chat-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 14px 18px;
|
|
background: var(--w-primary);
|
|
color: white;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-header .avatar {
|
|
width: 48px;
|
|
height: 48px;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 22px;
|
|
position: relative;
|
|
}
|
|
|
|
/* 头像通用:emoji 兜底层 + 品牌图片层 */
|
|
.avatar-emoji { line-height: 1; }
|
|
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
|
|
|
|
/* 在线状态点 */
|
|
.chat-header .avatar::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 1px;
|
|
right: 1px;
|
|
width: 14px;
|
|
height: 14px;
|
|
background: #22c55e;
|
|
border-radius: 50%;
|
|
border: 3px solid var(--w-primary);
|
|
}
|
|
|
|
.chat-header .info h1 {
|
|
font-size: 17px;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
}
|
|
|
|
.chat-header .info .status {
|
|
font-size: 13px;
|
|
opacity: 0.95;
|
|
margin: 0;
|
|
}
|
|
|
|
/* 头部操作按钮 */
|
|
.chat-header .actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.chat-header .action-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 8px;
|
|
background: rgba(255, 255, 255, 0.25);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: none;
|
|
transition: background 0.2s;
|
|
color: #fff;
|
|
}
|
|
|
|
.chat-header .action-btn:hover {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
}
|
|
|
|
/* Messages area */
|
|
.chat-messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
padding-bottom: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.message {
|
|
display: flex;
|
|
max-width: 80%;
|
|
}
|
|
|
|
.message.user {
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.message.assistant {
|
|
align-self: flex-start;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.message .bubble {
|
|
padding: 10px 16px;
|
|
border-radius: 16px;
|
|
line-height: 1.5;
|
|
font-size: 14px;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.message.user .bubble {
|
|
background: var(--w-primary);
|
|
color: var(--text-white);
|
|
border-bottom-right-radius: 4px;
|
|
}
|
|
|
|
.message.assistant .avatar {
|
|
width: 32px;
|
|
height: 32px;
|
|
background: var(--w-primary);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
color: white;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 2px 8px rgba(var(--w-primary-rgb),0.3);
|
|
}
|
|
|
|
.message.assistant .bubble {
|
|
background: #f3f4f6;
|
|
color: #1f2937;
|
|
padding: 12px 16px;
|
|
border-bottom-left-radius: 4px;
|
|
max-width: 280px;
|
|
}
|
|
|
|
.message .time {
|
|
font-size: 11px;
|
|
color: var(--text-light);
|
|
margin-top: 4px;
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.message.user .time {
|
|
text-align: right;
|
|
}
|
|
|
|
/* Typing indicator */
|
|
.typing-indicator {
|
|
display: none;
|
|
align-self: flex-start;
|
|
padding: 10px 16px;
|
|
background: var(--ai-bubble);
|
|
border-radius: 16px;
|
|
border-bottom-left-radius: 4px;
|
|
}
|
|
|
|
.typing-indicator.active {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
.typing-indicator span {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #999;
|
|
border-radius: 50%;
|
|
animation: typing 1.4s infinite;
|
|
}
|
|
|
|
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
|
|
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
|
|
|
|
@keyframes typing {
|
|
0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
|
|
30% { transform: translateY(-6px); opacity: 1; }
|
|
}
|
|
|
|
/* 消息区分隔线 */
|
|
.chat-separator {
|
|
height: 1px;
|
|
background: var(--w-primary);
|
|
opacity: 0.3;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 输入区域容器 */
|
|
.chat-input-container {
|
|
padding: 10px 10px;
|
|
background: white;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 输入容器 */
|
|
.input-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0;
|
|
padding: 8px 16px;
|
|
background: var(--w-soft-bg); /* 主题浅底 */
|
|
border-radius: 28px;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
/* 输入框 */
|
|
.chat-input-container input {
|
|
flex: 1;
|
|
padding: 0;
|
|
border: none;
|
|
font-size: 14px;
|
|
background: transparent;
|
|
outline: none;
|
|
min-height: 20px;
|
|
color: #1f2937;
|
|
}
|
|
|
|
.chat-input-container input:focus {
|
|
box-shadow: inset 0 0 0 2px rgba(var(--w-primary-rgb),0.2);
|
|
}
|
|
|
|
.chat-input-container input::placeholder {
|
|
color: #9ca3af;
|
|
}
|
|
|
|
/* 分隔线 */
|
|
.input-separator {
|
|
width: 1px;
|
|
height: 24px;
|
|
background: #e5e7eb;
|
|
margin: 0 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 发送按钮 */
|
|
.send-btn {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 12px;
|
|
background: linear-gradient(135deg, var(--w-primary), var(--w-gradient-end));
|
|
color: white;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 2px 8px rgba(var(--w-primary-rgb),0.25);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.send-btn:hover {
|
|
box-shadow: 0 4px 12px rgba(var(--w-primary-rgb),0.35);
|
|
}
|
|
|
|
.send-btn .send-icon {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.send-btn .send-text {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.send-btn:disabled {
|
|
background: #ccc;
|
|
cursor: not-allowed;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* Ended banner */
|
|
.chat-ended {
|
|
display: none;
|
|
text-align: center;
|
|
padding: 12px;
|
|
background: #e8f5e9;
|
|
color: var(--success);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.chat-ended.active {
|
|
display: block;
|
|
}
|
|
|
|
/* Help 区块 */
|
|
.help-block {
|
|
background: var(--w-soft-bg);
|
|
border-radius: 12px;
|
|
padding: 10px 14px;
|
|
margin-bottom: 16px;
|
|
border: 1px solid var(--w-border-soft);
|
|
}
|
|
.panel-top {
|
|
flex-shrink: 0;
|
|
padding: 10px 16px;
|
|
background: var(--w-soft-bg);
|
|
}
|
|
.help-block .help-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.help-block .help-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: #111827;
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.help-block .help-description {
|
|
font-size: 12px;
|
|
color: #6b7280;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.help-block .help-actions {
|
|
display: grid;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.help-block .call-btn {
|
|
background: #fff;
|
|
color: var(--w-deep-text);
|
|
border: 1px solid var(--w-border-soft);
|
|
padding: 6px 10px;
|
|
border-radius: 20px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
text-decoration: none;
|
|
flex-shrink: 0;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.help-block .call-btn:hover {
|
|
background: var(--w-soft-bg);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.help-block .call-btn svg {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* POPULAR TOPICS 区块 */
|
|
.popular-topics-fixed {
|
|
flex-shrink: 0;
|
|
padding: 12px 20px 8px;
|
|
background: white;
|
|
}
|
|
|
|
.chat-separator-topics {
|
|
height: 1px;
|
|
background: var(--w-primary);
|
|
opacity: 0.15;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.popular-topics-label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--w-caption-text);
|
|
letter-spacing: 0.14em;
|
|
margin-bottom: 8px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.popular-topics-grid {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.popular-topic-btn {
|
|
border-radius: 20px;
|
|
border: 1px solid var(--w-border-soft);
|
|
background: var(--w-soft-bg);
|
|
padding: 8px 16px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--w-deep-text);
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.popular-topic-btn:hover {
|
|
background: white;
|
|
}
|
|
|
|
/* 底部信息栏 */
|
|
.chat-footer {
|
|
padding: 10px 10px;
|
|
background: white;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: 11px;
|
|
color: var(--w-caption-text);
|
|
gap: 20px;
|
|
}
|
|
|
|
.chat-footer .footer-left {
|
|
flex: 1;
|
|
}
|
|
|
|
.chat-footer .footer-right {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-footer a {
|
|
color: var(--w-caption-text);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Mobile */
|
|
@media (max-width: 600px) {
|
|
.chat-container {
|
|
max-width: 100%;
|
|
}
|
|
.message {
|
|
max-width: 88%;
|
|
}
|
|
}
|