/* chat widget */
.chat-toggle {
    position: fixed;
    right: 20px;
    bottom: 100px;
    width: 64px;
    border-radius: 14px;
    background: #1890FF;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    gap: 5px;
}

.chat-toggle span {
    font-size: 11px;
    line-height: 1;
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
}
.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    right: 20px;
    bottom: 30px;
    width: 350px;
    height: 500px;
    background: #EDEDED;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
}
.chat-window.active {
    display: flex;
}

.chat-header {
    background: #1890FF;
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
.chat-close:hover {
    opacity: 0.8;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #EDEDED;
}

.chat-msg {
    margin-bottom: 12px;
    display: flex;
}
.chat-msg-user {
    justify-content: flex-end;
}
.chat-msg-bot {
    justify-content: flex-start;
}
.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}
.chat-msg-user .chat-bubble {
    background: #1890FF;
    color: #fff;
    border-bottom-right-radius: 6px;
}
.chat-msg-bot .chat-bubble {
    background: #FFFFFF;
    color: #000;
    border-bottom-left-radius: 6px;
}

.chat-footer {
    display: flex;
    padding: 10px;
    background: #F6F6F6;
    border-top: 1px solid #E0E0E0;
}
.chat-input {
    flex: 1;
    height: 36px;
    border: 1px solid #DDD;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
}
.chat-input:focus {
    border-color: #1890FF;
}
.chat-send {
    margin-left: 8px;
    padding: 0 20px;
    height: 36px;
    background: #1890FF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.chat-send:hover {
    background: #096DD9;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}
.chat-body::-webkit-scrollbar-thumb {
    background: #CCC;
    border-radius: 3px;
}

/* suggestions */
.bot-suggestions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #DDD;
}
.sug-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}
.sug-item {
    font-size: 13px;
    color: #1890FF;
    padding: 4px 0;
    cursor: pointer;
}
.sug-item:hover {
    color: #096DD9;
    text-decoration: underline;
}

/* matched question label */
.bot-question {
    font-size: 12px;
    color: #1890FF;
    background: #E6F4FF;
    border-left: 3px solid #1890FF;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.bot-answer {
    color: #333;
}