/* ══════════════════════════════════════════════════
   会员计划网格小部件
   ══════════════════════════════════════════════════ */

.mbr-plans-wrap {
    width: 100%;
}

.mbr-plans-title {
    font-size: 22px;
    font-weight: 600;
    color: #111;
    margin: 0 0 20px;
}

/* ── 网格 ── */
.mbr-plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ── 卡片 ── */
.mbr-plan-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, border-color .2s;
}

.mbr-plan-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
    border-color: #f7931e;
}

.mbr-plan-card.is-current {
    border-color: #f7931e;
}

/* ── 当前会员标签 ── */
.mbr-plan-current-tag {
    position: absolute;
    top: -1px;
    right: 16px;
    background: #f7931e;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 0 0 6px 6px;
}

/* ── 名称 ── */
.mbr-plan-name {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 400;
    color: #111;
}

/* ── 价格行 ── */
.mbr-plan-price-row {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin: 8px 0 4px;
}

.mbr-plan-currency {
    font-size: 18px;
    font-weight: 500;
    color: #111;
}

.mbr-plan-amount {
    font-size: 36px;
    font-weight: 500;
    color: #111;
    line-height: 1;
}

.mbr-plan-period {
    font-size: 13px;
    color: #999;
    margin-left: 2px;
}

.mbr-plan-expire {
    font-size: 12px;
    color: #f7931e;
    margin-bottom: 4px;
}

/* ── 按钮 ── */
.mbr-plan-action {
    margin: 12px 0 0;
}

.mbr-plan-btn {
    display: block;
    text-align: center;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff !important;
    background: #f7931e;
    text-decoration: none !important;
    transition: opacity .2s, transform .15s;
    cursor: pointer;
    border: none;
}

.mbr-plan-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.mbr-plan-btn.is-active {
    background: #f5f5f7;
    color: #999 !important;
    cursor: default;
    pointer-events: none;
}

.mbr-plan-btn.is-outline {
    background: transparent;
    color: #555 !important;
    border: 1.5px solid #d1d5db;
    cursor: default;
}

.mbr-plan-btn.is-outline:hover {
    background: #f9fafb;
    border-color: #bbb;
    transform: none;
}

.mbr-plan-btn.is-owned {
    background: #f5f5f7;
    color: #999 !important;
    cursor: default;
    pointer-events: none;
}

/* 扫光特效 */
.mbr-plan-btn.btn-sweep {
    position: relative;
    overflow: hidden;
}

.mbr-plan-btn.btn-sweep::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
    animation: mbrSweep 3s ease-in-out infinite;
}

@keyframes mbrSweep {
    0%   { left: -60%; }
    100% { left: 120%; }
}

/* ── 权益描述 ── */
.mbr-plan-desc {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #666;
    line-height: 1.8;
}

.mbr-plan-desc p {
    margin: 0 0 6px;
}

.mbr-plan-desc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mbr-plan-desc li {
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.mbr-plan-desc li .uc-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f0fdf4;
    flex-shrink: 0;
    font-style: normal;
}

.mbr-plan-desc li .uc-check::before {
    content: '';
    display: block;
    width: 3.5px;
    height: 7px;
    border: solid #22c55e;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

/* ══════════════════════════════════════════════════
   支付弹窗
   ══════════════════════════════════════════════════ */
.mbr-pay-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbr-pay-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.mbr-pay-dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 720px;
    max-width: 92vw;
    padding: 32px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.mbr-pay-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.mbr-pay-close:hover {
    color: #333;
}

.mbr-pay-title {
    font-size: 30px !important;
    font-weight: 400 !important;
    color: #222 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #222 !important;
    margin: 0 0 20px !important;
    padding-bottom: 20px !important;
}

/* ── 套餐信息 ── */
.mbr-pay-info {
    display: flex;
    background: #f7f7f8;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 28px;
    align-items: center;
}

.mbr-pay-info-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.mbr-pay-info-item:first-child {
    flex: 2.5;
    align-items: flex-start;
}

.mbr-pay-info-label {
    font-size: 12px;
    color: #999;
}

.mbr-pay-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

/* ── 二维码区域 ── */
.mbr-pay-body {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 20px;
}

.mbr-pay-qr-side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mbr-pay-qrcode {
    width: 196px;
    height: 196px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.mbr-pay-qrcode.is-loading {
    position: relative;
    background: #f8f8f8;
}

.mbr-pay-qrcode.is-loading::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: mbrSkeleton 1.5s ease-in-out infinite;
}

@keyframes mbrSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.mbr-pay-qrcode img,
.mbr-pay-qrcode canvas {
    display: block;
}

/* ── 金额区域 ── */
.mbr-pay-amount-side {
    padding-top: 12px;
}

.mbr-pay-amount-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.mbr-pay-amount-value {
    font-family: MiSans-Heavy, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(90.31deg, rgb(251, 0, 255) -0.85%, rgb(255, 121, 0) 101.44%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 12px;
}

.mbr-pay-amount-currency {
    font-size: 22px;
    margin-right: 2px;
}

/* ── 状态 ── */
.mbr-pay-status {
    font-size: 11px;
    color: #f7931e;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.mbr-pay-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f7931e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: mbrSpin 0.8s linear infinite;
}

@keyframes mbrSpin {
    to { transform: rotate(360deg); }
}

/* ── 协议 ── */
.mbr-pay-agreement {
    font-size: 11px;
    color: #999;
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

/* ── 二维码下方方法栏 ── */
.mbr-pay-methods-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #999;
    margin-top: 8px;
}

.mbr-pay-methods-bar img {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* ── 支付方式图标按钮 ── */
.mbr-pay-method-icons {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
}

.mbr-pay-method-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.mbr-pay-method-icon-btn .mbr-pay-method-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.15s;
}

.mbr-pay-method-icon-btn .mbr-pay-method-icon-label {
    font-size: 11px;
    color: #999;
}

.mbr-pay-method-icon-btn.is-active .mbr-pay-method-icon-wrap {
    border-color: #f7931e;
    background: #fff7f2;
}

.mbr-pay-method-icon-btn.is-active .mbr-pay-method-icon-label {
    color: #f7931e;
}

.mbr-pay-method-icon-btn:hover .mbr-pay-method-icon-wrap {
    border-color: #f7931e;
}

.mbr-pay-method-icon-btn img {
    width: 26px;
    height: 26px;
}

/* ── 支付成功 ── */
.mbr-pay-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 196px;
    height: 196px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fffaf6;
}

.mbr-pay-success svg {
    flex-shrink: 0;
}

.mbr-pay-success-text {
    font-size: 14px;
    font-weight: 600;
    color: #f46c18;
}

/* ══════════════════════════════════════════════════
   响应式
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .mbr-plans-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .mbr-plans-grid {
        grid-template-columns: 1fr !important;
    }

    .mbr-pay-dialog {
        width: 95vw;
        padding: 24px 20px;
    }

    .mbr-pay-body {
        flex-direction: column;
        align-items: center;
    }
}
