/**
 * Invomize Playbook — Secure Lead Gate
 *
 * Full-length blurred public preview
 * Centered sticky unlock card
 * Responsive GHL form skeleton loader
 *
 * Real protected content is served by PHP only.
 */

/* ==============================================
   1. PLAYBOOK PREVIEW CONTAINER
   ============================================== */

.invp-gate-preview {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);

    isolation: isolate;

    width: 100%;
    max-width: 1512px;

    margin: 0 auto;

    padding: 64px clamp(16px, 3vw, 48px) 100px;

    background: #f8faf9;

    overflow: visible;
}

/* ==============================================
   2. FULL-LENGTH BLURRED CONTENT
   ============================================== */

.invp-gate-preview__layout {
    grid-area: 1 / 1;

    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);

    gap: clamp(20px, 3vw, 48px);
    align-items: start;

    min-width: 0;

    filter: blur(3.5px);
    opacity: 0.89;

    pointer-events: none;
    user-select: none;
}

/* ==============================================
   3. PREVIEW SIDEBAR
   ============================================== */

.invp-gate-preview__sidebar {
    position: sticky;
    top: 110px;

    padding: 22px 17px;

    background: #ffffff;

    border: 1px solid #dce6e7;
    border-radius: 22px;

    box-shadow: 0 10px 38px rgba(22, 35, 43, 0.045);
}

.invp-gate-preview__sidebar-title {
    margin: 0 8px 18px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.13em;

    color: #637480;
}

.invp-gate-preview__nav-item {
    display: flex;
    align-items: center;

    gap: 12px;

    min-height: 49px;

    padding: 10px 12px;
    margin: 4px 0;

    border-radius: 11px;

    color: #253744;

    font-size: 14px;
    font-weight: 500;
}

.invp-gate-preview__nav-item.is-selected {
    background: #dff2eb;
    font-weight: 700;
}

.invp-gate-preview__nav-dot {
    width: 9px;
    height: 9px;

    flex: 0 0 9px;

    border-radius: 50%;
    background: #f5c842;
}

.invp-gate-preview__nav-item:nth-of-type(3n)
.invp-gate-preview__nav-dot {
    background: #48b99a;
}

.invp-gate-preview__nav-item small {
    margin-left: auto;
    color: #71828c;
}

/* ==============================================
   4. PREVIEW PAGE LAYOUT
   ============================================== */

.invp-gate-preview__pages {
    display: flex;
    flex-direction: column;

    gap: 38px;

    min-width: 0;
}

.invp-gate-preview__page {
    min-height: 860px;

    background: #ffffff;

    border: 1px solid #dfe8e9;
    border-radius: 24px;

    overflow: hidden;

    box-shadow: 0 14px 46px rgba(22, 35, 43, 0.04);
}

.invp-gate-preview__pagebar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    min-height: 58px;

    padding: 16px 32px;

    background: #fbfcfc;

    border-bottom: 1px solid #e4ebee;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;

    color: #647682;
}

.invp-gate-preview__pagebody {
    padding: 50px clamp(24px, 4vw, 55px) 60px;
}

.invp-gate-preview__eyebrow {
    display: block;

    margin-bottom: 22px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;

    color: #479f88;
}

/* ==============================================
   5. PREVIEW PLACEHOLDER ELEMENTS
   ============================================== */

.invp-gate-preview__heading {
    width: 81%;
    max-width: 630px;
    height: 38px;

    margin-bottom: 14px;

    border-radius: 10px;
    background: #b7c9d0;
}

.invp-gate-preview__heading.shorter {
    width: 58%;
    margin-bottom: 36px;
}

.invp-gate-preview__paragraph {
    width: 100%;
    height: 16px;

    margin-bottom: 17px;

    border-radius: 7px;
    background: #dce4e7;
}

.invp-gate-preview__paragraph.narrow {
    width: 71%;
}

.invp-gate-preview__callout {
    margin: 38px 0 40px;
    padding: 32px 26px;

    border-left: 4px solid #f5c842;
    border-radius: 0 16px 16px 0;

    background: #fff2c6;
}

.invp-gate-preview__callout
.invp-gate-preview__paragraph {
    background: #dccf9e;
}

.invp-gate-preview__section-heading {
    width: 47%;
    height: 26px;

    margin: 0 0 25px;

    border-radius: 8px;
    background: #b9c9cf;
}

.invp-gate-preview__checkrow {
    display: flex;
    align-items: center;

    gap: 16px;

    padding: 19px 18px;
    margin-bottom: 12px;

    border: 1px solid #e3eaec;
    border-radius: 12px;
}

.invp-gate-preview__checkbox {
    width: 19px;
    height: 19px;

    flex: 0 0 19px;

    border: 2px solid #aabdc2;
    border-radius: 5px;
}

.invp-gate-preview__rowline {
    width: 72%;
    height: 13px;

    border-radius: 6px;
    background: #d7e0e3;
}

/* ==============================================
   6. CENTERED STICKY UNLOCK CARD
   ============================================== */

/*
 * The preview and unlock card share the same grid area.
 *
 * The card starts INSIDE the preview section.
 * It sticks near the viewport center while scrolling.
 * It stops when its containing preview ends.
 *
 * Centering: justify-self + auto side margins + a width
 * capped with min(), so the card can never grow wider than
 * its max and drift to the left.
 *
 * Selector is prefixed with .invp-gate-preview for higher
 * specificity than theme / Elementor overrides.
 */

/* Full-size layer over the preview. Flex centers the card, so
   centering no longer depends on the card's own margins or
   justify-self. It also gives the sticky card a containing block
   as tall as the whole preview. */
.invp-gate-preview .invp-gate-preview__overlay-wrap {
    grid-area: 1 / 1;

    /* Same columns and gap as __layout, so column 2 lines up exactly
       with the playbook page column and the card centers over it. */
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 48px);
    justify-items: center;
    align-items: start;

    align-self: stretch;
    justify-self: stretch;

    min-width: 0;
    z-index: 30;

    pointer-events: none;
}

.invp-gate-preview .invp-gate-preview__overlay {
    position: sticky;
    top: max(105px, calc(50vh - 230px));

    z-index: 30;

    pointer-events: auto;

    grid-column: 2;
    justify-self: center;

    box-sizing: border-box;
    width: min(650px, calc(100% - 40px));
    max-width: 650px;
    min-width: 0;
    height: fit-content;

    margin: 35px auto 0;

    left: auto;
    right: auto;
    transform: none;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 38px 32px;
    text-align: center;

    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #dbe6e6;
    border-radius: 25px;

    box-shadow: 0 20px 70px rgba(22, 35, 43, 0.15);

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ==============================================
   7. LOCK ICON
   ============================================== */

.invp-gate-preview__lock {
    display: grid;
    place-items: center;

    width: 60px;
    height: 60px;

    margin-bottom: 18px;

    border-radius: 18px;

    background: #f4f8f7;

    box-shadow: 0 8px 25px rgba(22, 35, 43, 0.06);

    font-size: 27px;
}

/* ==============================================
   8. UNLOCK CARD TYPOGRAPHY
   ============================================== */

.invp-gate-preview__overlay h2 {
    max-width: 540px;

    margin: 0 0 17px;

    font-size: clamp(27px, 3vw, 43px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.04em;

    color: #16232b;
}

.invp-gate-preview__overlay p {
    max-width: 500px;

    margin: 0 0 23px;

    font-size: 16px;
    line-height: 1.65;

    color: #526773;
}

/* ==============================================
   9. UNLOCK BUTTON
   ============================================== */

.invp-gate-preview__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 16px 27px;

    border-radius: 100px;

    background: #f5c842;
    color: #16232b !important;

    font-weight: 650;

    text-decoration: none !important;

    transition:
        transform 200ms ease,
        background 200ms ease;
}

.invp-gate-preview__button:hover {
    background: #ffe079;
    transform: translateY(-2px);
}

.invp-gate-preview__button:focus-visible {
    outline: 3px solid #16232b;
    outline-offset: 4px;
}

.invp-gate-preview__overlay
.invp-gate-preview__state {
    margin: 17px 0 0;

    font-size: 12px;
    color: #71808b;
}

/* ==============================================
   10. GHL FORM CONTAINER
   ============================================== */

.invp-ghl {
    position: relative;
}

/* ==============================================
   11. GHL SKELETON LOADER
   ============================================== */

.invp-ghl-skeleton {
    position: absolute;

    z-index: 2;

    inset: 0 0 auto;

    display: flex;
    flex-direction: column;

    gap: 12px;

    min-height: 520px;

    padding: 14px 4px;

    background: #ffffff;

    border-radius: 10px;

    pointer-events: none;
}

.invp-ghl-skeleton__title,
.invp-ghl-skeleton__label,
.invp-ghl-skeleton__input,
.invp-ghl-skeleton__button {
    background: linear-gradient(
        100deg,
        #e7eaec 15%,
        #f5f6f7 37%,
        #e7eaec 65%
    );

    background-size: 200% 100%;

    animation: invp-gate-shimmer 1.3s linear infinite;

    border-radius: 8px;
}

.invp-ghl-skeleton__title {
    height: 25px;
    width: 72%;
    margin-bottom: 15px;
}

.invp-ghl-skeleton__label {
    height: 12px;
    width: 27%;
    margin-top: 7px;
}

.invp-ghl-skeleton__input {
    height: 49px;
    width: 100%;
    border-radius: 10px;
}

.invp-ghl-skeleton__button {
    height: 52px;
    width: 100%;

    margin-top: 22px;

    border-radius: 40px;
    background: #f5c842;

    animation: none;
}

/* Remove skeleton after iframe loads */

.invp-ghl--loaded .invp-ghl-skeleton {
    display: none;
}

/* Shimmer animation */

@keyframes invp-gate-shimmer {
    to {
        background-position-x: -200%;
    }
}

/* ==============================================
   12. TABLET RESPONSIVENESS
   ============================================== */

@media (max-width: 900px) {

    .invp-gate-preview {
        padding: 35px 16px 70px;
    }

    .invp-gate-preview__layout {
        grid-template-columns: minmax(0, 1fr);

        filter: blur(3px);
    }

    .invp-gate-preview__sidebar {
        display: none;
    }

    .invp-gate-preview .invp-gate-preview__overlay-wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .invp-gate-preview .invp-gate-preview__overlay {
        grid-column: 1;
    }

    .invp-gate-preview__page {
        min-height: 720px;
    }

    .invp-gate-preview .invp-gate-preview__overlay {
        top: max(
            90px,
            calc(50vh - 215px)
        );

        width: min(600px, calc(100% - 32px));

        margin: 24px auto 0;

        padding: 32px 25px;
    }
}

/* ==============================================
   13. MOBILE RESPONSIVENESS
   ============================================== */

@media (max-width: 600px) {

    .invp-gate-preview {
        padding: 24px 12px 55px;
    }

    .invp-gate-preview__layout {
        filter: blur(3px);
    }

    .invp-gate-preview__pages {
        gap: 22px;
    }

    .invp-gate-preview__page {
        min-height: 650px;
        border-radius: 16px;
    }

    .invp-gate-preview__pagebar {
        padding: 16px;
        font-size: 9px;
    }

    .invp-gate-preview__pagebody {
        padding: 30px 20px;
    }

    .invp-gate-preview .invp-gate-preview__overlay {
        top: max(
            85px,
            calc(50vh - 190px)
        );

        width: calc(100% - 16px);

        margin: 18px auto 0;

        padding: 26px 20px;

        border-radius: 18px;
    }

    .invp-gate-preview__lock {
        width: 50px;
        height: 50px;

        margin-bottom: 15px;

        font-size: 24px;
    }

    .invp-gate-preview__overlay h2 {
        font-size: 29px;
        line-height: 1.15;
    }

    .invp-gate-preview__overlay p {
        font-size: 14px;
        line-height: 1.6;
    }

    .invp-gate-preview__button {
        padding: 14px 20px;

        font-size: 14px;
    }
}

/* ==============================================
   14. SMALL VIEWPORT HEIGHTS
   ============================================== */

@media (max-height: 600px) {

    .invp-gate-preview .invp-gate-preview__overlay {
        top: 85px;

        max-height: calc(100dvh - 105px);
        overflow-y: auto;
    }
}

/* ==============================================
   15. REDUCED MOTION
   ============================================== */

@media (prefers-reduced-motion: reduce) {

    .invp-ghl-skeleton__title,
    .invp-ghl-skeleton__label,
    .invp-ghl-skeleton__input,
    .invp-ghl-skeleton__button {
        animation: none !important;
    }

    .invp-gate-preview__button {
        transition: none;
    }
}