/* 侧边栏客服组件 */
.customer-service {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

/* 主切换按钮 */
.cs-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.cs-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.cs-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* 图标变白色 */
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 客服面板 */
.cs-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 15px 10px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
}

.cs-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 关闭按钮 */
.cs-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.cs-close:hover {
    background: #e0e0e0;
}

.cs-icon-small {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* 客服选项项 */
.cs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    position: relative;
}

.cs-item:last-child {
    margin-bottom: 0;
}

.cs-item:hover {
    background: #f5f5f5;
    transform: translateX(-5px);
}

.cs-item-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.cs-item span {
    font-size: 14px;
    font-weight: 500;
}

/* WhatsApp 样式 */
.cs-item.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
}

.cs-item.whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
    transform: translateX(-5px);
}

.cs-item.whatsapp .cs-item-icon {
    filter: brightness(0) invert(1); /* 图标变白色 */
}

.cs-item.whatsapp span {
    color: #fff;
}

/* 返回顶部样式 */
.cs-item.back-to-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.cs-item.back-to-top:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateX(-5px);
}

.cs-item.back-to-top .cs-item-icon {
    filter: brightness(0) invert(1); /* 图标变白色 */
}

.cs-item.back-to-top span {
    color: #fff;
}

/* 返回顶部按钮显示/隐藏 */
.cs-item.back-to-top {
    display: none;
}

.cs-item.back-to-top.show {
    display: flex;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .customer-service {
        right: 15px;
        bottom: 15px;
    }
    
    .cs-toggle {
        width: 50px;
        height: 50px;
    }
    
    .cs-icon {
        width: 24px;
        height: 24px;
    }
    
    .cs-panel {
        bottom: 60px;
        min-width: 130px;
        padding: 12px 8px;
    }
    
    .cs-item {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .cs-item-icon {
        width: 18px;
        height: 18px;
    }
}