#wt001-chatbot {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, "Microsoft YaHei", sans-serif;
}

#wt001-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #0a2463;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

#wt001-chatbot-toggle:hover {
    transform: scale(1.05);
}

#wt001-chatbot-window {
    width: 360px;
    height: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    overflow: hidden;
    transition: opacity 0.2s;
}

#wt001-chatbot-window.hidden {
    display: none;
}

#wt001-chatbot-header {
    background: #0a2463;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    user-select: none;
    -webkit-user-select: none;
}

#wt001-chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

#wt001-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7f8fa;
}

/* ========== 消息气泡基础样式 ========== */
.wt001-msg {
    margin-bottom: 12px;
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.65;
    font-size: 14px;
    word-wrap: break-word;
}

.wt001-msg.user {
    background: #0a2463;
    color: #fff;
    margin-left: auto;
}

.wt001-msg.bot {
    background: #fff;
    color: #333;
    border: 1px solid #e5e7eb;
}

/* ========== Markdown 渲染样式 ========== */
.wt001-msg.bot strong {
    color: #000;
    font-weight: 700;
}

.wt001-msg.bot code {
    background: #f0f1f3;
    color: #c7254e;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
    font-family: Consolas, Monaco, monospace;
}

.wt001-msg.bot ul,
.wt001-msg.bot ol {
    margin: 6px 0;
    padding-left: 22px;
}

.wt001-msg.bot li {
    margin-bottom: 3px;
    line-height: 1.6;
}

.wt001-msg.bot ul li {
    list-style: disc;
}

.wt001-msg.bot ol li {
    list-style: decimal;
}

.wt001-msg.bot br {
    display: block;
    margin: 4px 0;
}

/* ========== 表格样式 ========== */
.wt001-msg.bot .wt001-table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.wt001-msg.bot .wt001-table thead th {
    background: #f0f2f5;
    color: #374151;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.wt001-msg.bot .wt001-table tbody td {
    padding: 9px 12px;
    color: #374151;
    border-bottom: 1px solid #f0f1f3;
    vertical-align: top;
}

.wt001-msg.bot .wt001-table tbody tr:last-child td {
    border-bottom: none;
}

.wt001-msg.bot .wt001-table tbody tr:nth-child(even) td {
    background: #fafbfc;
}

/* ========== 打字动画 ========== */
.wt001-msg.bot.typing::after {
    content: '●●●';
    animation: blink 1s infinite;
    color: #0a2463;
    margin-left: 4px;
}

@keyframes blink {
    50% { opacity: 0.3; }
}

/* ========== 输入区域 ========== */
#wt001-chatbot-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

#wt001-chatbot-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#wt001-chatbot-input:focus {
    border-color: #0a2463;
}

#wt001-chatbot-send {
    background: #0a2463;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

#wt001-chatbot-send:hover {
    background: #0d2d7a;
}

#wt001-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 移动端适配 ========== */
@media (max-width: 480px) {
    #wt001-chatbot-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
    }
    #wt001-chatbot {
        bottom: 16px;
        right: 16px;
    }
    #wt001-chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}
