@charset "utf-8";

/* ============================================================
   文章分享主体样式（v2：缩小图标 + 弹窗防御性隐藏）
   ============================================================ */

/* ========== 分享主体容器 ========== */
.share-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 15px auto 0;
    padding: 12px 40px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    position: relative;
}

/* ========== 分享标签（::before 伪元素） ========== */
.share-wrap::before {
    content: '分享到：';
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
    margin-right: 4px;
}

/* ========== 分享按钮（缩小到 24×24） ========== */
.share-wrap .share-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px !important;
    height: 24px !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}
.share-wrap .share-btn img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
}
.share-wrap .share-btn:hover {
    transform: scale(1.15);
    opacity: 0.85;
}

/* ========== 微信二维码弹窗（默认隐藏） ========== */
.share-wx-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    width: 200px;
    display: none;            /* 默认隐藏 */
}
.share-wx-popup[style*="display: block"],
.share-wx-popup[style*="display:block"] {
    display: block;            /* JS 显示时优先于默认 */
}

/* ========== 弹窗顶部 ========== */
.share-wx-popup .share-wx-top {
    background: #b81b1b;
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.share-wx-popup .share-wx-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}
.share-wx-popup .share-wx-close {
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    user-select: none;
    background: none;
    border: none;
    padding: 0;
}
.share-wx-popup .share-wx-close:hover {
    opacity: 1;
}

/* ========== 弹窗二维码区 ========== */
.share-wx-popup .share-wx-qrcode {
    padding: 12px;
    text-align: center;
    background: #ffffff;
}
.share-wx-popup .share-wx-qrcode img {
    display: inline-block;
    width: 140px;
    height: 140px;
    border: 0;
    vertical-align: middle;
}
.share-wx-popup .share-wx-url {
    margin: 8px 0 0;
    padding: 6px;
    background: #f5f5f5;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
    word-break: break-all;
    line-height: 1.4;
    text-align: left;
    max-height: 50px;
    overflow-y: auto;
    user-select: all;
    -webkit-user-select: all;
}

/* ========== 平板：≤991px ========== */
@media (max-width: 991px) {
    .share-wrap {
        padding: 12px 20px;
    }
}

/* ========== 手机：≤767px ========== */
@media (max-width: 767px) {
    .share-wrap {
        padding: 10px 12px;
        gap: 8px;
        min-height: 45px;
    }
    .share-wrap::before {
        margin-right: 0;
    }
    .share-wrap .share-btn {
        width: 20px !important;
        height: 20px !important;
    }
    .share-wx-popup {
        width: 180px;
    }
    .share-wx-popup .share-wx-qrcode img {
        width: 120px;
        height: 120px;
    }
}
