/* NRJ Resume PDF — Payment & Template UI
   Appended to the main plugin stylesheet.
   All selectors are scoped to avoid theme bleed. */

/* ── Access badge ─────────────────────────────────────────────────────────── */
.nrj-pdf-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #eaf5ef;
    border: 1px solid #a8d9bb;
    color: #0a6640;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.nrj-pdf-badge--active .nrj-pdf-badge__dot {
    width: 8px; height: 8px;
    background: #0a6640;
    border-radius: 50%;
    display: inline-block;
    animation: nrj-pulse 1.6s infinite;
}
@keyframes nrj-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ── Trust note beneath free PDF button ──────────────────────────────────── */
.nrj-pdf-trust {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: #666;
    line-height: 1.4;
}
.nrj-pdf-trust strong { color: #0a6640; }

/* ── PDF buttons ─────────────────────────────────────────────────────────── */
.nrj-pdf-btn--free {
    background: #0a6640;
    color: #fff;
    position: relative;
}
.nrj-pdf-btn--free::after {
    content: '₦';
    position: absolute;
    top: -6px; right: -6px;
    background: #d4a853;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.nrj-pdf-btn--paid {
    background: #0a6640;
    color: #fff;
}

/* ── Template selector ───────────────────────────────────────────────────── */
.nrj-tpl-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.nrj-tpl-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.nrj-tpl-btn {
    border: 1.5px solid #ccc;
    background: #fff;
    color: #444;
    font-size: 0.82rem;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nrj-tpl-btn.active,
.nrj-tpl-btn:hover {
    border-color: #0a6640;
    color: #0a6640;
    background: #eaf5ef;
}
.nrj-badge-premium {
    background: #d4a853;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── On-page resume preview watermark overlay ────────────────────────────── */
.nrj-uc-resume-paper {
    position: relative;
    overflow: hidden;
}
.nrj-resume-wm-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: clamp(1rem, 4vw, 2.2rem);
    font-weight: 900;
    color: rgba(10, 102, 64, 0.09);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 3px;
    user-select: none;
}

/* ── Live preview panel ──────────────────────────────────────────────────── */
.nrj-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f4fafa;
    border: 1px solid #b0d8d8;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    margin-top: 20px;
}
.nrj-preview-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #006d6d;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nrj-btn-sm {
    font-size: 0.78rem !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
}
.nrj-live-preview-wrap {
    position: relative;
    border: 1px solid #b0d8d8;
    border-radius: 0 0 10px 10px;
    background: #e8f4f4;
    min-height: 520px;
    overflow: hidden;
}
.nrj-preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    color: #006d6d;
    font-weight: 600;
    z-index: 2;
    background: rgba(232,244,244,0.9);
    padding: 10px 20px;
    border-radius: 8px;
}
.nrj-live-preview-frame {
    display: block;
    width: 100%;
    height: 780px;
    border: none;
    background: #fff;
    transition: opacity 0.25s ease;
    /* Scale A4 (794px wide) to fit the container */
    transform-origin: top left;
}

/* ── Template selector improvements ─────────────────────────────────────── */
.nrj-tpl-selector {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    overflow: visible;
}
.nrj-tpl-btn {
    font-size: 0.78rem !important;
    padding: 5px 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex !important;
}

/* ── Responsive scaling of preview iframe ────────────────────────────────── */
@media (max-width: 900px) {
    .nrj-live-preview-frame {
        height: 500px;
    }
}
