/* =========================================================================
   PowerMatch — Report Modal (fresh start)
   Shell + all content inside .pm-report-modal-content.
   Loaded after powermatch.css; overrides prior modal rules.
   ========================================================================= */

/* ---- design tokens (inherited by shell + content) ---- */
.pm-report-modal {
    --pm-bg: #0e0c1a;
    --pm-surface: #171426;
    --pm-surface-2: #1f1b30;
    --pm-line: #2c2740;
    --pm-text: #f3f1fb;
    --pm-muted: #a39fbd;
    --pm-accent: #e0467e;
    --pm-accent-2: #7a5cff;
    --pm-good: #3ad29f;
    --pm-radius: 16px;
    --pm-radius-sm: 12px;
    --pm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
    padding: 78px 20px 20px;
    box-sizing: border-box;
    font-family: var(--pm-font);
}

.pm-report-modal.is-open {
    display: flex;
}

body.pm-report-modal-open .overlay-close.overlay-customclose-btn-45543 {
    display: none !important;
}

.pm-report-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}

.pm-report-modal-inner {
    position: relative;
    max-width: 680px;
    width: 100%;
    max-height: 88vh;
    background: var(--pm-bg);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pm-report-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--pm-line);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    color: var(--pm-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pm-report-modal-close:hover {
    border-color: var(--pm-line);
    background: rgba(255, 255, 255, 0.1);
    color: var(--pm-text);
    opacity: 1;
}

.pm-report-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
    max-height: 88vh;
}

/* Free + sample: content-only (no left image). Pro restores 50/50 below. */
.pm-report-modal-image {
    display: none !important;
}

.pm-report-modal-content {
    flex: 1 1 100%;
    width: 100%;
    padding: 0;
    overflow-y: auto;
    min-height: 0;
    font-family: var(--pm-font);
    color: var(--pm-text);
    background: var(--pm-bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.pm-report-modal-content:not(:has(.pm-free-report)) {
    padding: 40px 36px 36px;
}

/* =========================================================================
   Post-purchase (pro) modal — 50/50 image + scrollable report
   Scoped to .pm-report-modal--pro so free/sample stay content-first.
   ========================================================================= */
.pm-report-modal.pm-report-modal--pro {
    /* Sit below sticky site header; don't vertically center into it */
    padding: 120px 20px 28px;
    align-items: flex-start;
}

.pm-report-modal.pm-report-modal--pro .pm-report-modal-inner {
    max-width: 960px;
    max-height: calc(100vh - 160px);
}

.pm-report-modal.pm-report-modal--pro .pm-report-modal-body {
    max-height: calc(100vh - 160px);
}

.pm-report-modal.pm-report-modal--pro .pm-report-modal-image {
    display: block !important;
    flex: 0 0 50%;
    width: 50%;
    aspect-ratio: 2 / 3;
    max-height: calc(100vh - 160px);
    background-color: var(--pm-surface);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.pm-report-modal.pm-report-modal--pro .pm-report-modal-content {
    flex: 0 0 50%;
    width: 50%;
    padding: 0;
}

.pm-report-modal-sticky-cta {
    display: none;
    flex-shrink: 0;
    padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(14, 12, 26, 0) 0%, rgba(14, 12, 26, 0.92) 18%, var(--pm-bg) 100%);
    border-top: 1px solid var(--pm-line);
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.35);
}

.pm-report-modal.has-sticky-cta .pm-report-modal-sticky-cta {
    display: block;
}

.pm-report-modal-sticky-cta__actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.pm-report-modal-sticky-cta__btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.pm-report-modal-sticky-cta__btn--outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    color: #fff;
    box-shadow: none;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* Reset theme/Divi injections inside modal content */
.pm-report-modal-content *,
.pm-report-modal-content *::before,
.pm-report-modal-content *::after {
    box-sizing: border-box;
}

.pm-report-modal-content p {
    margin: 0;
}

.pm-report-modal-content .report-modal-title + br,
.pm-report-modal-content .report-modal-title + br + br {
    display: none;
}

/* =========================================================================
   HEADING COLOR OVERRIDE (fixes dark-on-dark titles under Divi)
   Theme sass-style.css sets h1–h6 to #180d29 with high-specificity !important.
   Match specificity with html body + scoping class.
   ========================================================================= */
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content .report-modal-title,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content .pm-card__title,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content h1,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content h2,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content h3,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content h4,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content h5,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content h6 {
    color: var(--pm-text) !important;
}

html body:not(.et-fb):not(.et-tb) .pm-report-modal-content .pm-free-insight__leadin strong,
html body:not(.et-fb):not(.et-tb) .pm-report-modal-content .pm-insight__lead strong {
    color: var(--pm-accent) !important;
}

/* =========================================================================
   Pro report typography (full AI reports in modal)
   ========================================================================= */
.pm-report-modal-content .pm-ai-report {
    padding: 30px;
    color: var(--pm-text);
}

.pm-report-modal-content .pm-ai-report p {
    color: var(--pm-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.pm-report-modal-content .pm-ai-report p:last-child {
    margin-bottom: 0;
}

.pm-report-modal-content .pm-ai-report h1,
.pm-report-modal-content .pm-ai-report h2,
.pm-report-modal-content .pm-ai-report h3,
.pm-report-modal-content .pm-ai-report h4,
.pm-report-modal-content .pm-ai-report h5,
.pm-report-modal-content .pm-ai-report h6 {
    text-align: left;
    margin: 1.25em 0 0.5em;
}

.pm-report-modal-content .pm-ai-report h3:first-child,
.pm-report-modal-content .pm-ai-report h3:first-of-type {
    margin-top: 0;
}

.pm-report-modal-content .pm-ai-report strong,
.pm-report-modal-content .pm-ai-report b {
    color: var(--pm-text) !important;
    font-weight: 600;
}

.pm-report-modal-content .pm-ai-report li {
    color: var(--pm-muted);
}

.pm-report-modal-content .pm-ai-report a {
    color: var(--pm-accent);
}

.pm-report-modal-content .pm-ai-report a:hover {
    color: var(--pm-accent-2);
}

/* =========================================================================
   Title
   ========================================================================= */
.pm-report-modal-content .report-modal-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 0 0 10px;
}

.pm-report-modal-content .report-modal-intro {
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    color: var(--pm-muted);
    margin: 0 0 22px;
}

/* =========================================================================
   Section labels
   ========================================================================= */
.pm-report-modal-content .pm-deliverable-previews__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pm-muted);
    margin: 26px 0 14px;
}

.pm-report-modal-content .pm-deliverable-previews__heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--pm-line);
}

.pm-report-modal-content .pm-locked-teasers {
    position: relative;
}

.pm-report-modal-content .pm-locked-teasers::before {
    content: "Each section below is unlocked when you get your full report.";
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pm-muted);
    margin: 26px 0 12px;
    background: linear-gradient(var(--pm-line), var(--pm-line)) no-repeat;
    background-position: left bottom;
    background-size: 100% 1px;
    padding-bottom: 12px;
}

/* =========================================================================
   Free report stack — visual order (insight → locks → previews → paywall)
   ========================================================================= */
.pm-report-modal-content .pm-free-report {
    display: flex;
    flex-direction: column;
}

.pm-report-modal-content .pm-card--unlocked {
    order: 1;
}

.pm-report-modal-content .pm-locked-teasers {
    order: 2;
}

.pm-report-modal-content .pm-deliverable-previews {
    order: 3;
}

.pm-report-modal-content .pm-modal-paywall {
    order: 4;
}

/* =========================================================================
   Cards — shared shell
   ========================================================================= */
.pm-report-modal-content .pm-card {
    background: var(--pm-surface);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-radius-sm);
    overflow: hidden;
    position: relative;
}

.pm-report-modal-content .pm-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.pm-report-modal-content .pm-card__title {
    font-size: 14.5px;
    font-weight: 600;
    margin: 0;
    color: var(--pm-text);
    line-height: 1.3;
    flex: 1;
}

.pm-report-modal-content .pm-card__body {
    padding: 0 16px 16px;
}

.pm-report-modal-content .pm-card__content p {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--pm-muted);
}

.pm-report-modal-content .pm-card__content strong {
    color: var(--pm-text);
    font-weight: 600;
}

/* =========================================================================
   Unlocked free insight card
   ========================================================================= */
.pm-report-modal-content .pm-card--unlocked {
    background: linear-gradient(135deg, rgba(58, 210, 159, 0.08), rgba(122, 92, 255, 0.06));
    border-color: rgba(58, 210, 159, 0.28);
}

.pm-report-modal-content .pm-card--unlocked .pm-card__badge--unlocked {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(58, 210, 159, 0.16);
    border: 1px solid rgba(58, 210, 159, 0.4);
    color: var(--pm-good);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.pm-report-modal-content .pm-free-insight__leadin {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--pm-text);
    margin-bottom: 10px !important;
}

.pm-report-modal-content .pm-free-insight__leadin strong {
    color: var(--pm-accent);
    font-weight: 600;
}

.pm-report-modal-content .pm-free-insight__detail p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--pm-muted);
}

/* =========================================================================
   Locked teaser cards
   ========================================================================= */
.pm-report-modal-content .pm-locked-teasers {
    display: grid;
    gap: 12px;
}

.pm-report-modal-content .pm-card--locked.pm-card--clickable {
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.pm-report-modal-content .pm-card--locked.pm-card--clickable:hover {
    border-color: var(--pm-accent);
    transform: translateY(-2px);
}

.pm-report-modal-content .pm-card--locked.pm-card--clickable:focus-visible {
    outline: 2px solid var(--pm-accent);
    outline-offset: 2px;
}

.pm-report-modal-content .pm-card__lock {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(224, 70, 126, 0.14);
    border: 1px solid rgba(224, 70, 126, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    order: -1;
    font-size: 13px;
    line-height: 1;
}

.pm-report-modal-content .pm-card__lock .emoji {
    width: 13px;
    height: 13px;
    display: block;
}

.pm-report-modal-content .pm-card__preview-blur {
    position: relative;
}

.pm-report-modal-content .pm-card__placeholder {
    filter: blur(5px);
    opacity: 0.55;
    user-select: none;
    pointer-events: none;
}

.pm-report-modal-content .pm-card__line {
    display: block;
    height: 9px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--pm-muted), transparent);
    margin-bottom: 8px;
}

.pm-report-modal-content .pm-card__line:last-child {
    margin-bottom: 0;
}

.pm-report-modal-content .pm-card__line--short {
    width: 60%;
}

.pm-report-modal-content .pm-card__line:nth-child(1) {
    width: 92%;
}

.pm-report-modal-content .pm-card__line:nth-child(2) {
    width: 78%;
}

.pm-report-modal-content .pm-locked-teasers .pm-card__preview-blur::after {
    content: "Unlock to reveal \2192";
    display: block;
    filter: none;
    opacity: 1;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pm-accent);
}

/* =========================================================================
   Paywall
   ========================================================================= */
.pm-report-modal-content .pm-modal-paywall {
    margin-top: 28px;
    background:
        radial-gradient(500px 200px at 50% 0%, rgba(224, 70, 126, 0.18), transparent 70%),
        var(--pm-surface-2);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-radius);
    padding: 26px 24px;
    text-align: center;
}

.pm-report-modal-content .pm-modal-paywall__cta.et_pb_button,
.pm-report-modal-content a.pm-modal-paywall__cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, var(--pm-accent), var(--pm-accent-2)) !important;
    color: #fff !important;
    font-family: var(--pm-font) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.2 !important;
    padding: 16px 22px !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(224, 70, 126, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin: 0 0 20px;
    text-decoration: none !important;
}

.pm-report-modal-content .pm-modal-paywall__cta.et_pb_button::after {
    display: none !important;
    content: "" !important;
}

.pm-report-modal-content .pm-modal-paywall__cta.et_pb_button:hover {
    background: linear-gradient(135deg, var(--pm-accent), var(--pm-accent-2)) !important;
    border: none !important;
    padding: 16px 22px !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(224, 70, 126, 0.5);
    color: #fff !important;
}

.pm-report-modal-content .pm-cta--pulse {
    box-shadow: 0 0 0 4px rgba(224, 70, 126, 0.4), 0 14px 38px rgba(224, 70, 126, 0.5) !important;
    transition: box-shadow 0.2s ease;
}

.pm-report-modal-content .pm-paywall-checklist {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 440px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    text-align: left;
}

.pm-report-modal-content .pm-paywall-checklist__item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: var(--pm-text);
    line-height: 1.3;
}

.pm-report-modal-content .pm-paywall-checklist__check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(58, 210, 159, 0.14);
    border: 1px solid rgba(58, 210, 159, 0.34);
    color: var(--pm-good);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* =========================================================================
   Deliverable previews
   ========================================================================= */
.pm-report-modal-content .pm-deliverable-previews__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pm-report-modal-content .pm-deliverable-previews__grid .pm-card__header {
    justify-content: space-between;
}

.pm-report-modal-content .pm-deliverable-previews__grid .pm-card--visible .pm-card__header::after {
    content: "Visible";
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--pm-good);
    background: rgba(58, 210, 159, 0.12);
    border: 1px solid rgba(58, 210, 159, 0.28);
    flex-shrink: 0;
}

.pm-report-modal-content .pm-deliverable-previews__grid .pm-card--locked .pm-card__title {
    order: 0;
}

.pm-report-modal-content .pm-deliverable-previews__grid .pm-card--locked .pm-card__header::after {
    content: "Locked";
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--pm-accent);
    background: rgba(224, 70, 126, 0.12);
    border: 1px solid rgba(224, 70, 126, 0.28);
    flex-shrink: 0;
    margin-left: auto;
}

.pm-report-modal-content .pm-deliverable-previews__grid .pm-card__placeholder p {
    font-size: 12px;
    line-height: 1.5;
    color: var(--pm-muted);
    margin: 0;
}

.pm-report-modal-content .pm-deliverable-previews__grid .pm-card__preview-blur::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0467e' stroke-width='2'><rect x='5' y='11' width='14' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") no-repeat center;
    background-size: 22px;
    opacity: 0.85;
    pointer-events: none;
}

/* =========================================================================
   Bios report inside modal
   ========================================================================= */
.pm-report-modal-content .pm-bios-report .pm-bios-persona {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pm-line);
}

.pm-report-modal-content .pm-bios-report .pm-bios-persona:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pm-report-modal-content .pm-bios-length-tab {
    border-color: var(--pm-line);
    background: var(--pm-surface);
    color: var(--pm-text);
}

.pm-report-modal-content .pm-bios-length-tab:hover,
.pm-report-modal-content .pm-bios-length-tab:focus {
    border-color: var(--pm-accent);
    background: rgba(224, 70, 126, 0.12);
}

.pm-report-modal-content .pm-bios-length-tab.is-active {
    border-color: var(--pm-accent);
    background: rgba(224, 70, 126, 0.2);
}

.pm-report-modal-content .pm-bio-copy.button {
    border-color: var(--pm-line);
    background: var(--pm-surface);
    color: var(--pm-text) !important;
}

.pm-report-modal-content .pm-bio-copy.is-copied {
    border-color: var(--pm-good);
}

/* =========================================================================
   Mobile
   ========================================================================= */
@media (max-width: 768px) {
    .pm-report-modal {
        /*padding: max(env(safe-area-inset-top), 10px) 10px max(env(safe-area-inset-bottom), 10px);*/
        padding: 0;
        margin-top: 50px;
        align-items: stretch;
    }

    .pm-report-modal-inner {
        height: 95vh;
        max-height: 95vh;
        margin-left: auto;
        margin-right: auto;
        flex: 1 1 auto;
        min-height: 0;
        margin: 10px;
    }

    .pm-report-modal-body {
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    .pm-report-modal-content:not(:has(.pm-free-report)) {
        padding: 28px 16px 20px;
        flex: 1 1 auto;
        min-height: 0;
    }

    .pm-report-modal-content:has(.pm-free-report) {
        padding: 0;
        flex: 1 1 auto;
        min-height: 0;
    }

    /* Pro: image as top strip, report scrolls below */
    .pm-report-modal.pm-report-modal--pro .pm-report-modal-image {
        flex: 0 0 auto;
        width: 100%;
        height: 20vh;
        max-height: 20vh;
        aspect-ratio: auto;
    }

    .pm-report-modal.pm-report-modal--pro .pm-report-modal-content {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
    }

    .pm-report-modal-sticky-cta {
        padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .pm-report-modal-sticky-cta__actions {
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .pm-report-modal-content .pm-deliverable-previews__grid,
    .pm-report-modal-content .pm-paywall-checklist {
        grid-template-columns: 1fr;
    }

    .pm-report-modal-content .report-modal-title {
        font-size: 21px;
    }

    .pm-report-modal-content .pm-modal-paywall {
        padding: 22px 16px;
    }
}
