/**
 * 中讯社统一分享组件
 * 适用：PC 列表页、PC 详情页、H5 详情页
 * 图标顺序：微信、微博、小红书、QQ空间、QQ
 */
.cnso-share {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0;
    vertical-align: middle;
}

.cnso-share__label {
    font-size: 14px;
    color: #666;
    margin-right: 4px;
    line-height: 1;
}

.cnso-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    padding: 0;
    outline: none;
    box-sizing: border-box;
}

.cnso-share__btn:hover,
.cnso-share__btn:active {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cnso-share__btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}

/* 微信 */
.cnso-share__btn--wechat {
    color: #07c160;
    border-color: #07c160;
}
.cnso-share__btn--wechat:hover {
    background: #07c160;
    color: #fff;
}

/* 微博 */
.cnso-share__btn--weibo {
    color: #e6162d;
    border-color: #e6162d;
}
.cnso-share__btn--weibo:hover {
    background: #e6162d;
    color: #fff;
}

/* 小红书 */
.cnso-share__btn--xiaohongshu {
    color: #fe2c55;
    border-color: #fe2c55;
}
.cnso-share__btn--xiaohongshu:hover {
    background: #fe2c55;
    color: #fff;
}

/* QQ空间 */
.cnso-share__btn--qzone {
    color: #ffc028;
    border-color: #ffc028;
}
.cnso-share__btn--qzone:hover {
    background: #ffc028;
    color: #fff;
}

/* QQ */
.cnso-share__btn--qq {
    color: #12b7f5;
    border-color: #12b7f5;
}
.cnso-share__btn--qq:hover {
    background: #12b7f5;
    color: #fff;
}

/* 列表页 compact 样式 */
.cnso-share--compact .cnso-share__btn {
    width: 26px;
    height: 26px;
}
.cnso-share--compact .cnso-share__btn svg {
    width: 14px;
    height: 14px;
}
.cnso-share--compact .cnso-share__label {
    font-size: 12px;
}

/* H5 / 移动端适配 */
@media (max-width: 768px) {
    .cnso-share__btn {
        width: 36px;
        height: 36px;
    }
    .cnso-share__btn svg {
        width: 20px;
        height: 20px;
    }
    .cnso-share__label {
        font-size: 14px;
    }
}

/* 微信二维码弹窗 */
.cnso-share-wechat-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.cnso-share-wechat-modal.active {
    display: flex;
}

.cnso-share-wechat-modal__box {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    max-width: 280px;
    width: 86%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cnso-share-wechat-modal__title {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
}

.cnso-share-wechat-modal__qrcode {
    width: 180px;
    height: 180px;
    margin: 0 auto 12px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
}

.cnso-share-wechat-modal__qrcode img {
    width: 180px;
    height: 180px;
}

.cnso-share-wechat-modal__tips {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.cnso-share-wechat-modal__close {
    display: inline-block;
    padding: 6px 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    background: #fff;
}

.cnso-share-wechat-modal__close:hover {
    border-color: #0b357b;
    color: #0b357b;
}

/* Toast 提示 */
.cnso-share-toast {
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    white-space: nowrap;
}

.cnso-share-toast.active {
    display: block;
}
