/* 客服挂件基础样式 */
#cs-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 浮动按钮 */
#cs-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#cs-button:hover {
    transform: scale(1.1);
}

#cs-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* 聊天窗口 */
#cs-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.3s ease;
}

#cs-window.active {
    display: flex;
    animation: cs-slide-in 0.3s ease forwards;
}

@keyframes cs-slide-in {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 窗口头部 */
.cs-header {
    background: #2d6a4f;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.cs-close {
    cursor: pointer;
    font-size: 20px;
    opacity: 0.8;
}

/* 消息列表 */
#cs-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.msg-user {
    align-self: flex-end;
    background: #2d6a4f;
    color: white;
    border-bottom-right-radius: 2px;
}

.msg-admin {
    align-self: flex-start;
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 2px;
}

/* 输入区域 */
.cs-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.cs-input-area input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.cs-input-area button {
    background: #2d6a4f;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}
