/*
 * 推广返佣页面。这里刻意不用 flex gap / inset / aspect-ratio 等较新的写法:
 * 安卓厂商浏览器(如 vivo 自带浏览器)仍是 Chromium 78 左右的内核,用了会排版错乱。
 */
.promo-page {
    display: none;
    position: fixed;
    z-index: 4650;
    top: var(--mobile-social-viewport-top, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    padding-bottom: var(--mobile-social-nav-height, 0px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #f5f6f8;
    color: #0f1419;
    font-size: 14px;
}
.promo-page.show { display: block; }
html.promo-page-open, html.promo-page-open body { overflow: hidden; }

/* 标题栏样式沿用 .mobile-hub-header / .mobile-hub-close(和通知、联系页面一致),这里只补背景。 */
.promo-header { background: #fff; }

.promo-body { max-width: 640px; margin: 0 auto; padding: 12px 14px 28px; box-sizing: border-box; }
.promo-loading, .promo-empty { padding: 60px 16px; text-align: center; color: #536471; }
.promo-empty b { display: block; margin-bottom: 14px; color: #0f1419; }

.promo-modes { display: flex; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: #e9ecef; }
.promo-modes button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: #536471; font-size: 15px; font-weight: 700; }
.promo-modes button.active { background: #fff; color: #0f1419; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

.promo-hero {
    padding: 18px 16px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff5a36, #e8233f);
    color: #fff;
    box-shadow: 0 6px 18px rgba(232, 35, 63, .22);
}
.promo-hero.is-vip { background: linear-gradient(135deg, #f5b545, #e2802a); box-shadow: 0 6px 18px rgba(226, 128, 42, .22); }
.promo-hero-label { font-size: 13px; opacity: .9; }
.promo-hero-value { margin: 4px 0 12px; font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.promo-hero-value small { margin-left: 4px; font-size: 16px; font-weight: 700; }
.promo-hero-row { display: flex; margin-bottom: 14px; }
.promo-hero-row div { flex: 1; }
.promo-hero-row span { display: block; font-size: 12px; opacity: .85; }
.promo-hero-row b { display: block; margin-top: 2px; font-size: 16px; }
.promo-settle {
    display: block;
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: #e8233f;
    font-size: 16px;
    font-weight: 800;
}
.promo-settle:disabled { opacity: .6; }
.promo-hero-foot { margin-top: 10px; font-size: 12px; text-align: center; opacity: .9; }
.promo-progress { margin: 2px 0 6px; }
.promo-progress-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.promo-progress-bar i { display: block; height: 100%; border-radius: 4px; background: #fff; }
.promo-progress span { display: block; margin-top: 8px; font-size: 13px; }

.promo-stats { display: flex; margin: 12px 0; padding: 14px 0; border-radius: 14px; background: #fff; }
.promo-stats div { flex: 1; text-align: center; }
.promo-stats div + div { border-left: 1px solid #eff3f4; }
.promo-stats b { display: block; font-size: 18px; font-weight: 800; }
.promo-stats span { display: block; margin-top: 2px; font-size: 12px; color: #536471; }

.promo-card { margin-bottom: 12px; padding: 14px; border-radius: 14px; background: #fff; }
.promo-card-title { margin-bottom: 10px; font-size: 15px; font-weight: 800; }
.promo-link { display: flex; align-items: center; padding: 8px 8px 8px 12px; border-radius: 10px; background: #f5f6f8; }
.promo-link span { flex: 1; min-width: 0; margin-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1d9bf0; font-size: 14px; }
.promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 17px;
    background: #0f1419;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.promo-btn svg { width: 16px; height: 16px; margin-right: 4px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.promo-qr { display: flex; align-items: center; margin-top: 12px; }
.promo-qr img, .promo-qr-img { width: 120px; height: 120px; flex: 0 0 120px; margin-right: 14px; border: 1px solid #eff3f4; border-radius: 10px; background: #f5f6f8; box-sizing: border-box; }
.promo-qr-placeholder { display: flex; align-items: center; justify-content: center; color: #8b98a5; font-size: 12px; }
.promo-qr-side { flex: 1; min-width: 0; }
.promo-qr-side p { margin: 0 0 10px; color: #536471; font-size: 13px; line-height: 1.5; }
.promo-qr-side p { margin-bottom: 0; }
/* 保存二维码 / 分享:二维码下方一行,等宽并排(用 margin 不用 gap,老安卓 WebView 不认 flex gap) */
.promo-qr-actions { display: flex; margin-top: 12px; }
.promo-qr-actions .promo-btn { flex: 1 1 0; min-width: 0; height: 38px; border-radius: 19px; background: #f5f6f8; color: #0f1419; }
.promo-qr-actions .promo-btn + .promo-btn { margin-left: 10px; }
.promo-code { margin-top: 10px; color: #536471; font-size: 13px; }
.promo-code b { color: #0f1419; letter-spacing: 1px; }

.promo-tabs { display: flex; border-radius: 14px 14px 0 0; background: #fff; border-bottom: 1px solid #eff3f4; }
.promo-tabs button { flex: 1; height: 46px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #536471; font-size: 15px; font-weight: 700; }
.promo-tabs button.active { border-bottom-color: #e8233f; color: #0f1419; }
.promo-list { margin-bottom: 12px; border-radius: 0 0 14px 14px; background: #fff; }
.promo-list-empty { padding: 32px 16px; text-align: center; color: #8b98a5; }
.promo-row { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f2f3f5; }
.promo-row:last-child { border-bottom: 0; }
.promo-row-main { flex: 1; min-width: 0; margin-right: 10px; }
.promo-row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.promo-row-main span { display: block; margin-top: 3px; color: #8b98a5; font-size: 12px; }
.promo-row-side { text-align: right; }
.promo-row-side strong { display: block; margin-bottom: 4px; color: #e8233f; font-size: 15px; }
.promo-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-style: normal; white-space: nowrap; }
.promo-badge.is-ok { background: #e7f8ef; color: #00a35c; }
.promo-badge.is-warn { background: #fff4e0; color: #d98200; }
.promo-badge.is-muted { background: #f2f3f5; color: #8b98a5; }
/* 不合格的邀请(风控拦截):红字,不计入收益 */
.promo-badge.is-danger { background: #fdecee; color: #f4212e; }
.promo-row.is-blocked .promo-row-main b, .promo-row.is-blocked .promo-row-main span { color: #f4212e; }

.promo-rules { padding: 14px; border-radius: 14px; background: #fff; color: #536471; font-size: 13px; line-height: 1.6; }
.promo-rules b { display: block; margin-bottom: 6px; color: #0f1419; font-size: 14px; }
.promo-rules p { margin: 0 0 8px; }
.promo-rules strong { color: #0f1419; }
.promo-rules-title { margin: 12px 0 8px; color: #0f1419; font-size: 14px; font-weight: 800; }
.promo-flow { display: flex; align-items: center; margin-bottom: 10px; }
.promo-flow i { flex: 0 0 18px; text-align: center; color: #8b98a5; font-style: normal; }
.promo-flow-node { flex: 1; min-width: 0; padding: 8px 4px; border-radius: 10px; background: #f5f6f8; text-align: center; }
.promo-flow-node.is-me { background: #fdecef; }
.promo-flow-node b { display: block; margin: 0; color: #0f1419; font-size: 14px; }
.promo-flow-node span { display: block; margin-top: 2px; font-size: 11px; color: #8b98a5; }
.promo-example { padding: 8px 10px; border-radius: 8px; background: #fff8ec; }
.promo-tier-table { width: 100%; margin-bottom: 8px; border-collapse: collapse; font-size: 13px; }
.promo-tier-table th { padding: 6px 8px; background: #f5f6f8; color: #536471; font-weight: 700; text-align: left; }
.promo-tier-table td { padding: 7px 8px; border-bottom: 1px solid #f2f3f5; color: #0f1419; }
.promo-tier-table tr.is-current td { background: #fdecef; font-weight: 800; }
.promo-tier-table em { margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: #e8233f; color: #fff; font-size: 11px; font-style: normal; }
.promo-month { color: #0f1419; }
.promo-rules-foot { margin-top: 10px; color: #8b98a5; font-size: 12px; }

/* 电脑版:放在中间内容栏的位置,和其它侧栏页面一致 */
html.desktop-x-layout .promo-page {
    top: 0;
    left: calc(50% - 425px + 230px);
    right: auto;
    width: 620px;
    padding-bottom: 0;
    z-index: 2600;
    border-left: 1px solid #eff3f4;
    border-right: 1px solid #eff3f4;
}

/* 取消加好友功能:隐藏所有加好友入口 */
.detail-author-friend,
.profile-add-friend { display: none !important; }

/* 安卓:联系、推广返佣页的返回键和"通知"页(#notificationBackBtn)同一个图标、同一尺寸。
   本文件在 android.css 之后加载,同样用 !important 覆盖那边 28px 的文字箭头尺寸。 */
html.is-android .mobile-hub-close.has-vector-icon {
    display: -webkit-box !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 0 0 4px !important; /* 和通知页返回键的水平位置对齐 */
    padding: 0 !important;
    color: #0f1419;
}
html.is-android .mobile-hub-close.has-vector-icon svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 邀请记录标签旁的人数 */
.promo-tab-count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: #1d9bf0; color: #fff; font-size: 12px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 2px; }
.promo-group-title { padding: 12px 16px 6px; font-size: 13px; font-weight: 700; color: #0f1419; }
.promo-group-title em { margin-left: 4px; font-style: normal; font-weight: 400; color: #8b98a5; }
.promo-list-empty.is-small { padding: 10px 16px 14px; font-size: 13px; }
