/**
 * 单篇内容收费 - 前台样式
 */

.wpma-paywall {
    position: relative;
    margin: 32px 0;
}

/* 预览区末尾的渐隐，暗示下面还有内容 */
.wpma-paywall-fade {
    height: 90px;
    margin-top: -90px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
}

.wpma-paywall-body {
    padding: 28px 24px;
    text-align: center;
    border: 1px solid #e6e8eb;
    border-radius: 10px;
    background: #fafbfc;
}

.wpma-paywall-icon .dashicons {
    width: 34px;
    height: 34px;
    font-size: 34px;
    color: #b8bec5;
}

.wpma-paywall-title {
    margin: 10px 0 4px;
    font-size: 19px;
    line-height: 1.4;
}

.wpma-paywall-hint {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 14px;
}

.wpma-paywall-price {
    margin-bottom: 18px;
    color: #d4380d;
}

.wpma-paywall-price .wpma-currency {
    font-size: 18px;
    vertical-align: 2px;
}

.wpma-paywall-price .wpma-amount {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.wpma-paywall-price .wpma-price-unit {
    margin-left: 6px;
    color: #8c8c8c;
    font-size: 13px;
}

/* 支付方式 */
.wpma-paywall-methods {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.wpma-method {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.wpma-method input {
    margin: 0;
}

/* 按钮 */
.wpma-btn {
    display: inline-block;
    padding: 10px 28px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.wpma-btn-primary {
    background: #d4380d;
    border-color: #d4380d;
    color: #fff;
}

.wpma-btn-primary:hover,
.wpma-btn-primary:focus {
    background: #ad2102;
    border-color: #ad2102;
    color: #fff;
}

.wpma-btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.wpma-btn-ghost {
    background: transparent;
    border-color: #d4380d;
    color: #d4380d;
}

.wpma-btn-ghost:hover,
.wpma-btn-ghost:focus {
    background: rgba(212, 56, 13, 0.06);
    color: #d4380d;
}

.wpma-paywall-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.wpma-paywall-status.is-error {
    color: #cf1322;
}

.wpma-paywall-unavailable {
    color: #8c8c8c;
    font-size: 14px;
}

/* 会员引导 */
.wpma-paywall-upsell {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed #e0e0e0;
}

.wpma-paywall-upsell p {
    margin: 0 0 12px;
    color: #595959;
    font-size: 14px;
}

/* 下载区 */
.wpma-download-box {
    margin: 28px 0;
    padding: 20px 22px;
    border: 1px solid #e6e8eb;
    border-left: 3px solid #52c41a;
    border-radius: 8px;
    background: #fafffa;
}

.wpma-download-title {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.wpma-download-title .dashicons {
    color: #52c41a;
    vertical-align: -4px;
}

.wpma-download-actions {
    margin: 0 0 8px;
}

.wpma-download-note {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    word-break: break-all;
}

/* 深色主题下渐隐层要跟着变，否则会出现一条白带 */
@media (prefers-color-scheme: dark) {
    .wpma-paywall-fade {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #1a1a1a 85%);
    }

    .wpma-paywall-body {
        border-color: #333;
        background: #202020;
    }

    .wpma-method {
        border-color: #3a3a3a;
        background: #262626;
        color: #e0e0e0;
    }

    .wpma-download-box {
        border-color: #333;
        background: #1e2a1e;
    }
}

@media (max-width: 600px) {
    .wpma-paywall-body {
        padding: 22px 16px;
    }

    .wpma-paywall-price .wpma-amount {
        font-size: 28px;
    }

    .wpma-btn {
        width: 100%;
    }
}

/* 微信扫码支付 */
.wpma-qrcode-box {
    margin-top: 18px;
}

.wpma-qrcode-canvas {
    display: inline-block;
    padding: 10px;
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    background: #fff;
    line-height: 0;
}

.wpma-qrcode-tip {
    margin: 12px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.wpma-qrcode-tip strong {
    color: #09bb07;
}

/* 分类会员墙 */
.wpma-member-wall .wpma-paywall-icon .dashicons {
    color: #d4380d;
}

.wpma-member-wall-level {
    margin: 0 0 16px;
    color: #595959;
    font-size: 14px;
}

.wpma-member-wall-sub {
    margin: 12px 0 0;
    color: #8c8c8c;
    font-size: 13px;
}

/* 受保护图集 */
.wpma-protected-gallery {
    margin: 28px 0;
}

.wpma-protected-note {
    margin: 0 0 14px;
    padding: 8px 12px;
    border-left: 3px solid #d4380d;
    background: #fff7e6;
    color: #ad4e00;
    font-size: 13px;
}

.wpma-protected-item {
    margin: 0 0 16px;
}

.wpma-protected-item img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e6e8eb;
    border-radius: 6px;
    /* 图片本身已带水印，这里只是顺手挡掉右键另存的顺手操作 */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
