/* ============================================================
   Member Pro – 前端样式
   ============================================================ */

/* ── 价格表 ── */
.mp-pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mp-pricing-item {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 36px 28px 32px;
    text-align: center;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mp-pricing-item:hover {
    border-color: #2271b1;
    box-shadow: 0 8px 30px rgba(34,113,177,.15);
    transform: translateY(-4px);
}

.mp-pricing-item h3 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1e293b;
}

.mp-price {
    font-size: 46px;
    font-weight: 700;
    color: #2271b1;
    margin: 12px 0 4px;
    line-height: 1.1;
}

.mp-billing {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
}

.mp-trial {
    display: inline-block;
    background: #ecfdf5;
    color: #059669;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin: 6px 0 12px;
}

.mp-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    margin: 12px 0 20px;
}

/* ── 按钮 ── */
.mp-button {
    display: inline-block;
    background: #2271b1;
    color: #fff !important;
    padding: 11px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s;
}
.mp-button:hover { background: #135e96; }

/* ── 无权限提示 ── */
.mp-access-denied {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    margin: 40px 0;
}
.mp-access-denied h3 { color: #dc2626; margin-top: 0; }
.mp-access-denied p  { color: #7f1d1d; }

/* ── 账户页 ── */
.mp-account { max-width: 900px; margin: 40px auto; }
.mp-account h2 {
    font-size: 20px;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 8px;
    margin: 32px 0 16px;
}

.mp-table-wrap { overflow-x: auto; }

.mp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 14px;
}
.mp-table th {
    background: #f1f5f9;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #cbd5e1;
}
.mp-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}
.mp-table tr:last-child td { border-bottom: none; }
.mp-table tbody tr:hover { background: #f8fafc; }

/* ── 状态徽章 ── */
.mp-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
}
.mp-badge-active    { background: #dcfce7; color: #166534; }
.mp-badge-cancelled { background: #fee2e2; color: #991b1b; }
.mp-badge-expired   { background: #f3f4f6; color: #6b7280; }
.mp-badge-paused    { background: #fef3c7; color: #92400e; }

/* ── 优惠券表单 ── */
.mp-coupon-form {
    max-width: 480px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
}
.mp-coupon-form h3 { margin-top: 0; font-size: 16px; }

.mp-coupon-input-wrap {
    display: flex;
    gap: 8px;
}
.mp-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
}
.mp-input:focus { border-color: #2271b1; box-shadow: 0 0 0 3px rgba(34,113,177,.2); }

.mp-coupon-result {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
}
.mp-coupon-result.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.mp-coupon-result.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ── 通知 ── */
.mp-notice { color: #64748b; font-style: italic; }

/* ── Checkout 结账页 ── */
.mp-checkout {
    max-width: 560px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.mp-checkout h2 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 24px;
}

.mp-checkout-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px 24px;
    text-align: center;
    margin: 40px auto;
    max-width: 560px;
}

.mp-checkout-section {
    margin-bottom: 22px;
}
.mp-checkout-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
}

/* Select */
.mp-checkout-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    outline: none;
    cursor: pointer;
}
.mp-checkout-select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,.2);
}

/* Price Box */
.mp-checkout-price-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.mp-checkout-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 15px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}
.mp-checkout-price-row:last-child { border-bottom: none; }

.mp-checkout-discount-row { color: #059669; }
.mp-checkout-discount-row span:first-child { font-style: italic; }

.mp-checkout-total-row {
    margin-top: 4px;
    padding-top: 10px !important;
    border-top: 2px solid #cbd5e1 !important;
    font-weight: 700;
    font-size: 18px;
    color: #1e293b;
}

/* Coupon Wrap (inside checkout) */
.mp-checkout-coupon-wrap {
    display: flex;
    gap: 8px;
}
.mp-checkout-coupon-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}
.mp-checkout-coupon-msg.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.mp-checkout-coupon-msg.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Payment Options */
.mp-checkout-pay-options { padding: 4px 0; }
.mp-checkout-pay-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #374151;
    cursor: pointer;
}
.mp-checkout-pay-option input[type="radio"] { accent-color: #2271b1; }

/* Button variants */
.mp-button-sm {
    padding: 8px 16px !important;
    font-size: 13px !important;
}
.mp-button-lg {
    padding: 14px 40px !important;
    font-size: 17px !important;
    width: 100%;
    display: block;
}
.mp-button-ghost {
    background: transparent !important;
    color: #2271b1 !important;
    border: 1px solid #2271b1 !important;
}
.mp-button-ghost:hover {
    background: #eef5fb !important;
}

/* Result area */
.mp-checkout-result {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
}
.mp-checkout-result.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.mp-checkout-result.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Access denied custom message */
.mp-access-denied-custom {
    margin: 12px 0 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 6px;
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .mp-pricing-table { grid-template-columns: 1fr; }
    .mp-coupon-input-wrap,
    .mp-checkout-coupon-wrap { flex-direction: column; }
    .mp-table { font-size: 13px; }
    .mp-table th, .mp-table td { padding: 8px 10px; }
    .mp-checkout { padding: 0 16px; }
}
