/* ═══ PCP 付费内容插件前端样式 ═══ */

/* ─ 内容墙容器 ─ */
.pcp-wall {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
.pcp-wall-icon {
    font-size: 50px;
    margin-bottom: 14px;
    display: block;
}
.pcp-wall h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
}
.pcp-wall p {
    margin: 0 0 22px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

/* ─ 价格展示 ─ */
.pcp-price-box {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    background: #fff;
    border: 2px solid #2563eb;
    border-radius: 10px;
    padding: 10px 22px;
    margin-bottom: 26px;
}
.pcp-price {
    font-size: 34px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
}
.pcp-dur {
    font-size: 15px;
    color: #64748b;
}

/* ─ 按钮组 ─ */
.pcp-pay-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.pcp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s, transform 0.1s;
    white-space: nowrap;
}
.pcp-btn:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}
.pcp-btn:active {
    transform: translateY(0);
}
.pcp-btn-primary  { background: #2563eb; color: #fff; }
.pcp-btn-wechat   { background: #07c160; color: #fff; }
.pcp-btn-alipay   { background: #1677ff; color: #fff; }
.pcp-btn-cardkey  { background: #7c3aed; color: #fff; }

/* ─ 已购内容 ─ */
.pcp-content-wrap { margin: 0; }
.pcp-access-badge {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}
.pcp-paid-content { line-height: 1.7; }

/* ─ 弹窗通用 ─ */
.pcp-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pcpFade 0.2s ease;
}
@keyframes pcpFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.pcp-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}
.pcp-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px 30px 28px;
    width: 340px;
    max-width: calc(100vw - 28px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    text-align: center;
    animation: pcpSlide 0.25s ease;
    z-index: 1;
}
@keyframes pcpSlide {
    from { transform: translateY(18px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.pcp-modal-box h3 {
    margin: 8px 0 4px;
    font-size: 18px;
    color: #1e293b;
    font-weight: 600;
}
.pcp-modal-box > p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
}
.pcp-modal-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 2px;
}
.pcp-modal-price {
    font-size: 26px;
    font-weight: 700;
    color: #2563eb;
    margin: 4px 0 14px;
}
.pcp-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.pcp-modal-close:hover { background: #e2e8f0; }

/* ─ 二维码 ─ */
.pcp-qr-box {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    margin: 0 auto 8px;
}
.pcp-qr-box canvas,
.pcp-qr-box img {
    display: block;
}
.pcp-hint {
    font-size: 13px;
    color: #64748b;
    margin: 8px 0 4px;
}
.pcp-poll-tip {
    font-size: 12px;
    color: #94a3b8;
    min-height: 18px;
    margin-top: 6px;
}

/* ─ 加载动画 ─ */
.pcp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    padding: 28px 0;
}
.pcp-loading::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: pcpSpin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes pcpSpin {
    to { transform: rotate(360deg); }
}

/* ─ 卡密输入 ─ */
.pcp-ck-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: monospace;
    letter-spacing: 2px;
    text-align: center;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 0;
}
.pcp-ck-input:focus { border-color: #2563eb; }
.pcp-ck-msg {
    margin-top: 12px;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    line-height: 1.5;
}
.pcp-ck-msg.ok  { background: #d1fae5; color: #065f46; }
.pcp-ck-msg.err { background: #fee2e2; color: #991b1b; }

/* ─ 响应式 ─ */
@media (max-width: 520px) {
    .pcp-wall     { padding: 28px 16px; }
    .pcp-pay-btns { flex-direction: column; align-items: center; }
    .pcp-btn      { width: 100%; max-width: 260px; }
    .pcp-modal-box { padding: 28px 18px 22px; }
}
