/* 在线客服插件样式 */
.online-chat-box {
    position: fixed;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.online-chat-box[data-position="left"] {
    right: auto;
    left: 20px;
}

.chat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #2196F3;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.chat-item:hover {
    transform: scale(1.1);
    color: #fff;
}

.chat-icon {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

/* 图标图片样式 */
.chat-icon-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.3);
    display: block;
}

.chat-text {
    display: none;
    position: absolute;
    right: 60px;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 14px;
    animation: fadeIn 0.2s ease;
}

.online-chat-box[data-position="left"] .chat-text {
    right: auto;
    left: 60px;
}

.chat-item:hover .chat-text {
    display: block;
}

/* 二维码弹窗通用样式 */
.qrcode-popup {
    display: none;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    text-align: center;
    z-index: 10;
    min-width: 160px;
    animation: fadeIn 0.2s ease;
}

.online-chat-box[data-position="left"] .qrcode-popup {
    right: auto;
    left: 60px;
}

.qrcode-popup img {
    width: 140px;
    height: 140px;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.qrcode-popup p {
    margin: 10px 0 0;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.qrcode-popup .qrcode-number {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.chat-item:hover .qrcode-popup {
    display: block;
}

/* QQ客服样式 */
.chat-qq {
    background: #12B7F5;
}

.chat-qq:hover {
    background: #0D9DD9;
}

/* 微信客服样式 */
.chat-wechat {
    background: #07C160;
}

.chat-wechat:hover {
    background: #06AD56;
}

/* 电话样式 */
.chat-phone {
    background: #FF6B00;
}

.chat-phone:hover {
    background: #E55A00;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.online-chat-box[data-position="left"] .qrcode-popup {
    animation-name: fadeInLeft;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* 响应式适配 */
@media (max-width: 768px) {
    .online-chat-box {
        right: 10px;
    }
    
    .online-chat-box[data-position="left"] {
        left: 10px;
    }
    
    .chat-item {
        width: 45px;
        height: 45px;
    }
    
    .chat-text {
        right: 55px;
        font-size: 12px;
    }
    
    .qrcode-popup {
        right: 55px;
        padding: 10px;
        min-width: 140px;
    }
    
    .qrcode-popup img {
        width: 120px;
        height: 120px;
    }
    
    .qrcode-popup p {
        font-size: 12px;
    }
}
