/* ─────────────────────────────────────────────
   B2 VIP Shortcode — 前端样式
   完全使用 B2 主题 CSS 变量，保持风格一致
───────────────────────────────────────────── */

/* fallback变量（B2主题存在时会被覆盖） */
:root {
    --b2-color-main:    #4e6ef2;
    --b2-color-border:  #e8e8e8;
    --b2-card-bg:       #fff;
    --b2-text-main:     #333;
    --b2-text-sub:      #888;
    --b2-radius:        12px;
    --b2-shadow:        0 2px 16px rgba(0,0,0,.08);
}

/* ── 容器 ── */
.b2vsc-wrap {
    padding: 24px 0;
    font-family: inherit;
}

/* ── 头部标题 ── */
.b2vsc-header {
    text-align: center;
    margin-bottom: 32px;
}
.b2vsc-title {
    font-size: 1.9em;
    font-weight: 700;
    color: var(--b2-text-main, #333);
    margin: 0 0 8px;
}
.b2vsc-subtitle {
    font-size: 1em;
    color: var(--b2-text-sub, #888);
    margin: 0;
}

/* ── 卡片列表 ── */
.b2vsc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.b2vsc-item {
    flex: 1 1 240px;
    max-width: 320px;
    min-width: 220px;
}
.b2vsc-card {
    background: var(--b2-card-bg, #fff);
    border: 1px solid var(--b2-color-border, #e8e8e8);
    border-radius: var(--b2-radius, 12px);
    box-shadow: var(--b2-shadow, 0 2px 16px rgba(0,0,0,.08));
    padding: 28px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.b2vsc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,.13);
}

/* ── VIP名称 ── */
.b2vsc-name {
    font-size: 1.25em;
    font-weight: 700;
    margin: 0 0 12px;
    text-align: center;
}

/* ── 价格区 ── */
.b2vsc-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 20px;
}
.b2vsc-symbol {
    font-size: .9em;
    color: var(--b2-text-sub, #888);
}
.b2vsc-amount {
    font-size: 2.4em;
    font-weight: 800;
    color: var(--b2-text-main, #333);
    line-height: 1;
}
.b2vsc-period {
    font-size: .85em;
    color: var(--b2-text-sub, #888);
    margin-left: 2px;
}

/* ── 权益列表 ── */
.b2vsc-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    flex: 1;
}
.b2vsc-features li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--b2-color-border, #f0f0f0);
    font-size: .88em;
    color: var(--b2-text-sub, #aaa);
}
.b2vsc-features li.allow {
    color: var(--b2-text-main, #333);
}
.b2vsc-features li:last-child {
    border-bottom: none;
}
.b2vsc-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78em;
    font-weight: 700;
    background: #f0f0f0;
    color: #bbb;
    margin-left: 8px;
}
.b2vsc-features li.allow .b2vsc-icon {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ── 按钮 ── */
.b2vsc-btn-wrap {
    margin-top: auto;
}
.b2vsc-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    background: var(--vip-color, var(--b2-color-main, #4e6ef2));
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    letter-spacing: .04em;
}
.b2vsc-btn:hover {
    opacity: .88;
    transform: scale(1.02);
}
.b2vsc-btn:active {
    transform: scale(.98);
}

/* ── FAQ ── */
.b2vsc-faq {
    margin-top: 48px;
}
.b2vsc-faq-title {
    text-align: center;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--b2-text-main, #333);
}
.b2vsc-faq-item {
    border: 1px solid var(--b2-color-border, #e8e8e8);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--b2-card-bg, #fff);
}
.b2vsc-faq-q {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: .95em;
    color: var(--b2-text-main, #333);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background .15s;
}
.b2vsc-faq-q:hover {
    background: rgba(0,0,0,.02);
}
.b2vsc-faq-arrow {
    font-size: .7em;
    transition: transform .25s;
    color: var(--b2-text-sub, #aaa);
}
.b2vsc-faq-item.open .b2vsc-faq-arrow {
    transform: rotate(180deg);
}
.b2vsc-faq-a {
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    font-size: .88em;
    line-height: 1.7;
    color: var(--b2-text-sub, #666);
    transition: max-height .3s ease, padding .3s ease;
}
.b2vsc-faq-item.open .b2vsc-faq-a {
    max-height: 200px;
    padding: 0 18px 14px;
}

/* ── 错误提示 ── */
.b2vsc-error {
    padding: 12px 16px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: .9em;
}

/* ── 响应式 ── */
@media (max-width: 600px) {
    .b2vsc-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .b2vsc-amount {
        font-size: 2em;
    }
}

/* ── 定价套餐前端 ── */
.b2vsc-plan-badge {
    height: 4px;
    border-radius: 4px 4px 0 0;
    margin: -28px -24px 20px;
}
.b2vsc-plan-card-front .b2vsc-name {
    text-align: center;
    font-size: 1.1em;
}
.b2vsc-plan-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    background: var(--vip-color, #4e6ef2);
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity .2s, transform .1s;
    letter-spacing: .04em;
}
.b2vsc-plan-btn:hover { opacity:.88; transform:scale(1.02); color:#fff; }

/* ═══════════════════════════════════════════
   Software 风格
═══════════════════════════════════════════ */

/* 周期切换 */
.b2vsc-sw-period-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    background: var(--b2-color-border, #e8e8e8);
    border-radius: 999px;
    padding: 3px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.b2vsc-period-btn {
    padding: 7px 22px;
    border: none;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    font-size: .9em;
    font-weight: 500;
    color: var(--b2-text-sub, #888);
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.b2vsc-period-btn.active {
    background: var(--b2-card-bg, #fff);
    color: var(--b2-text-main, #333);
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
}
.b2vsc-save-badge {
    font-size: .72em;
    background: #e74c3c;
    color: #fff;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 600;
}

/* 卡片列表 */
.b2vsc-sw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
    align-items: stretch;
}
.b2vsc-sw-item {
    flex: 1 1 220px;
    max-width: 280px;
    min-width: 200px;
    background: var(--b2-card-bg, #fff);
    border: 1px solid var(--b2-color-border, #e8e8e8);
    padding: 32px 24px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow .2s, transform .2s;
}
.b2vsc-sw-item:first-child { border-radius: var(--b2-radius,12px) 0 0 var(--b2-radius,12px); }
.b2vsc-sw-item:last-child  { border-radius: 0 var(--b2-radius,12px) var(--b2-radius,12px) 0; }
.b2vsc-sw-item:only-child  { border-radius: var(--b2-radius,12px); }
.b2vsc-sw-item + .b2vsc-sw-item { border-left: none; }

/* 推荐高亮 */
.b2vsc-sw-featured {
    background: var(--sw-color, #4e6ef2);
    border-color: var(--sw-color, #4e6ef2);
    transform: scaleY(1.04);
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    border-radius: var(--b2-radius,12px) !important;
}
.b2vsc-sw-featured .b2vsc-sw-name { color: #fff !important; }
.b2vsc-sw-featured .b2vsc-sw-sym,
.b2vsc-sw-featured .b2vsc-sw-amount,
.b2vsc-sw-featured .b2vsc-sw-period { color: #fff; }
.b2vsc-sw-featured .b2vsc-sw-features li { color: rgba(255,255,255,.85); }
.b2vsc-sw-featured .b2vsc-sw-features li.allow { color: #fff; }
.b2vsc-sw-featured .b2vsc-sw-icon { color: #fff; }
.b2vsc-sw-featured .b2vsc-sw-icon { background: rgba(255,255,255,.25) !important; color: #fff !important; }
.b2vsc-sw-featured .b2vsc-sw-divider { background: rgba(255,255,255,.3) !important; }
.b2vsc-sw-featured .b2vsc-sw-btn {
    background: #fff !important;
    color: var(--sw-color, #4e6ef2) !important;
}
.b2vsc-sw-featured .b2vsc-sw-btn:hover { opacity: .9; }

/* 推荐标签 */
.b2vsc-sw-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: var(--sw-color, #4e6ef2);
    border: 2px solid var(--sw-color, #4e6ef2);
    font-size: .72em;
    font-weight: 700;
    padding: 2px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

/* 卡片内容 */
.b2vsc-sw-name {
    font-size: 1.05em;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}
.b2vsc-sw-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 20px;
}
.b2vsc-sw-sym   { font-size: .85em; color: var(--b2-text-sub, #888); }
.b2vsc-sw-amount { font-size: 2.4em; font-weight: 800; color: var(--b2-text-main, #333); line-height: 1; }
.b2vsc-sw-period { font-size: .82em; color: var(--b2-text-sub, #888); margin-left: 2px; }
.b2vsc-sw-divider { height: 1px; background: var(--b2-color-border, #e8e8e8); margin-bottom: 18px; }

/* 权益列表 */
.b2vsc-sw-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    flex: 1;
}
.b2vsc-sw-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: .86em;
    color: var(--b2-text-sub, #aaa);
    border-bottom: 1px solid rgba(0,0,0,.04);
}
.b2vsc-sw-features li.allow { color: var(--b2-text-main, #333); }
.b2vsc-sw-features li:last-child { border-bottom: none; }
.b2vsc-sw-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72em;
    font-weight: 700;
    background: #f0f0f0;
    color: #bbb;
    flex-shrink: 0;
}
.b2vsc-sw-features li.allow .b2vsc-sw-icon { background: #e8f5e9; color: #2e7d32; }

/* 按钮 */
.b2vsc-sw-btn {
    width: 100%;
    padding: 11px 0;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: .95em;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    letter-spacing: .03em;
    margin-top: auto;
}
.b2vsc-sw-btn:hover { opacity: .85; transform: scale(1.02); }

/* 响应式 */
@media (max-width: 640px) {
    .b2vsc-sw-list { flex-direction: column; gap: 12px; }
    .b2vsc-sw-item,
    .b2vsc-sw-item:first-child,
    .b2vsc-sw-item:last-child { border-radius: var(--b2-radius,12px) !important; border: 1px solid var(--b2-color-border,#e8e8e8); max-width:100%; }
    .b2vsc-sw-item + .b2vsc-sw-item { border-left: 1px solid var(--b2-color-border,#e8e8e8); }
    .b2vsc-sw-featured { transform: none; }
}
