/* Early Responders — gated job "peek + paywall".
 * Renders inside WP Job Manager's access-denied templates
 * (job_manager/access-denied-single-job_listing.php / -browse-job_listings.php),
 * which sit in WorkScout's `.container.right-sidebar` content slot.
 *
 * The single view mirrors the real WorkScout job layout — a description column
 * on the left and an overview/apply sidebar on the right — rendered as a partial
 * peek that fades into blur. Palette mirrors checkout-focus.css / quiz design.md.
 *
 * Anti-circumvention: the blurred/skeleton blocks are PURE CSS decoration with no
 * real text. The only real description text is the server-scrubbed teaser from
 * er_job_safe_teaser(); Rate and Employer are shown locked.
 */

.er-paywall {
    /* Tokens scoped to the component — no global footprint. */
    --er-navy: #07111F;
    --er-navy-2: #0F1E2E;
    --er-bg: #F6F8FB;
    --er-surface: #FFFFFF;
    --er-text: #0B1220;
    --er-text-2: #475569;
    --er-muted: #64748B;
    --er-red: #D90429;
    --er-red-hover: #B80021;
    --er-border: #E2E8F0;
    --er-skel: linear-gradient(90deg, #d7e0ea 0%, #e6ecf3 50%, #d7e0ea 100%);
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 8px 0 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--er-text);
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}
.er-paywall *, .er-paywall *::before, .er-paywall *::after { box-sizing: border-box; }

/* Skeleton helpers (shared). */
.er-blur { filter: blur(3.5px); opacity: .9; -webkit-user-select: none; user-select: none; pointer-events: none; }
.er-paywall__lines { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
.er-paywall__lines span { display: block; height: 13px; border-radius: 6px; background: var(--er-skel); }
.er-paywall__lines span:nth-child(1) { width: 97%; }
.er-paywall__lines span:nth-child(2) { width: 92%; }
.er-paywall__lines span:nth-child(3) { width: 95%; }
.er-paywall__lines span:nth-child(4) { width: 64%; }
.er-paywall__skh { height: 17px; width: 38%; border-radius: 6px; background: var(--er-skel); margin: 26px 0 16px; }
.er-paywall__bullets { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.er-paywall__bullets li { display: flex; align-items: center; gap: 11px; }
.er-paywall__bullets li::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; }
.er-paywall__bullets li span { display: block; flex: 1; height: 12px; border-radius: 6px; background: var(--er-skel); }
.er-paywall__bullets li:nth-child(2) span { max-width: 86%; }
.er-paywall__bullets li:nth-child(4) span { max-width: 72%; }

/* ============================ SINGLE (two-column) ============================ */
.er-paywall--single {
    max-width: 1040px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 30px;
}

/* LEFT: description, real-looking then fading into blur. */
.er-paywall__main {
    position: relative;
    flex: 1 1 360px;
    min-width: 0;
    max-height: 640px;
    overflow: hidden;
}
.er-paywall__h {
    margin: 0 0 16px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--er-text);
}
.er-paywall__teaser {
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.7;
    color: #1f2a3a;
}
.er-paywall__fade {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 220px;
    background: linear-gradient(180deg, rgba(246, 248, 251, 0) 0%, var(--er-bg) 88%);
    pointer-events: none;
}

/* RIGHT: WorkScout-style sidebar — overview widget + apply box. */
.er-paywall__aside {
    flex: 0 1 320px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 24px;
}

.er-paywall__overview {
    background: var(--er-surface);
    border: 1px solid var(--er-border);
    border-radius: 14px;
    padding: 6px 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.er-paywall__overview ul { list-style: none; margin: 0; padding: 0; }
.er-paywall__overview li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
}
.er-paywall__overview li:last-child { border-bottom: 0; }
.er-paywall__overview svg { flex: 0 0 auto; color: #94a3b8; }
.er-ov-k { color: var(--er-text-2); }
.er-ov-v { margin-left: auto; font-weight: 600; color: var(--er-text); text-align: right; }
.er-ov-v.er-locked {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 3px 10px 3px 8px;
    font-size: 12.5px;
}
.er-ov-v.er-locked svg { color: #94a3b8; }
.er-ov-v.er-rate { color: #15803D; font-weight: 700; }

/* ============================ BROWSE (board gate) =========================== */
.er-paywall--browse .er-paywall__peek {
    position: relative;
    padding: 18px 18px 120px;
    overflow: hidden;
}
.er-paywall__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.er-paywall__grid .er-paywall__ghost {
    background: #fff;
    border: 1px solid var(--er-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.er-paywall__ghost span { display: block; height: 12px; border-radius: 6px; background: var(--er-skel); }
.er-paywall__ghost span:nth-child(1) { width: 60%; height: 16px; }
.er-paywall__ghost span:nth-child(2) { width: 90%; }
.er-paywall__ghost span:nth-child(3) { width: 75%; }
.er-paywall--browse .er-paywall__peek::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 150px;
    background: linear-gradient(180deg, rgba(246, 248, 251, 0) 0%, var(--er-bg) 82%);
    pointer-events: none;
}
.er-paywall--browse .er-paywall__card { margin-top: -64px; }

/* ============================ CTA card (shared) ============================= */
.er-paywall__card {
    position: relative;
    z-index: 2;
    background: radial-gradient(120% 140% at 50% -10%, var(--er-navy-2) 0%, var(--er-navy) 60%);
    color: #fff;
    border-radius: 16px;
    padding: 26px 24px 24px;
    text-align: center;
    box-shadow: 0 18px 40px -18px rgba(7, 17, 31, .55);
}
.er-paywall__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9fb4cc;
}
.er-paywall__eyebrow svg { flex: 0 0 auto; }
.er-paywall__title {
    margin: 0 0 10px;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #fff;
}
.er-paywall__sub {
    margin: 0 auto 18px;
    max-width: 46ch;
    font-size: 15px;
    line-height: 1.6;
    color: #c7d2e0;
}
.er-paywall__trust {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    font-size: 13px;
    color: #aebfd2;
}
.er-paywall__trust li { margin: 0; padding: 0; }
.er-paywall__trust li::before { content: "✓"; color: #4ade80; font-weight: 700; margin-right: 6px; }
.er-paywall__actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.er-paywall__cta {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: var(--er-red);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color .15s ease, transform .05s ease;
}
.er-paywall__cta:hover { background: var(--er-red-hover); color: #fff !important; }
.er-paywall__cta:active { transform: translateY(1px); }
.er-paywall__login {
    color: #d7e2f0 !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(215, 226, 240, .4);
    padding-bottom: 1px;
}
.er-paywall__login:hover { color: #fff !important; border-bottom-color: #fff; }

/* ============================== Responsive ================================= */
@media (max-width: 880px) {
    .er-paywall--single { gap: 22px; }
    .er-paywall__main { flex-basis: 100%; max-height: 360px; }
    .er-paywall__aside { flex-basis: 100%; position: static; }
}
@media (max-width: 600px) {
    .er-paywall__title { font-size: 21px; }
    .er-paywall__grid { grid-template-columns: 1fr; }
    .er-paywall--browse .er-paywall__card { margin-top: -52px; }
}
@media (prefers-reduced-motion: reduce) {
    .er-paywall__cta { transition: none; }
}
