/* chat.css - 悬浮在线客服前端样式 */

#chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#chat-widget-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0084ff;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

#chat-widget-btn:hover {
    transform: scale(1.05);
}

#chat-widget-btn svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

#chat-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    flex-direction: column;
    overflow: hidden;
}

#chat-window.open {
    display: flex;
}

#chat-header {
    background: #0084ff;
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-close-btn {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

#chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f4f7f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.visitor {
    background: #0084ff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message.admin {
    background: #e4e6eb;
    color: #1c1e21;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

#chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eef;
    background: #fff;
}

#chat-input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
    font-size: 14px;
}

#chat-send-btn {
    background: #0084ff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    margin-left: 10px;
    cursor: pointer;
    font-weight: bold;
}
