
/* NUJIZ INCREASE IMAGE STICKY V571 */

/* Allow sticky positioning within the workspace */

html body.nujiz-increase-template-v570
main.nis570-main,

html body.nujiz-increase-template-v570
#toolWorkspace,

html body.nujiz-increase-template-v570
#toolWorkspace > section.tool {

    overflow:visible!important;
    min-width:0!important;
}

html body.nujiz-increase-template-v570
#toolWorkspace > section.tool {

    align-items:start!important;
    position:relative!important;
}

/* Sticky preview */

html body.nujiz-increase-template-v570
#toolWorkspace > section.tool > .preview {

    position:sticky!important;

    top:100px!important;
    bottom:auto!important;

    align-self:start!important;

    height:auto!important;
    min-height:0!important;

    max-height:calc(100dvh - 120px)!important;

    overflow:auto!important;

    z-index:10!important;

    background:#171b25!important;

    border:1px solid #394354!important;
    border-radius:16px!important;

    box-sizing:border-box!important;

    scrollbar-width:thin;
}

/* Keep preview image contained */

html body.nujiz-increase-template-v570
#toolWorkspace .preview-area {

    display:flex!important;

    align-items:center!important;
    justify-content:center!important;

    min-height:300px!important;

    max-height:calc(100dvh - 220px)!important;

    overflow:hidden!important;
}

html body.nujiz-increase-template-v570
#previewImg:not([hidden]) {

    max-width:100%!important;

    max-height:calc(100dvh - 250px)!important;

    width:auto!important;
    height:auto!important;

    object-fit:contain!important;
}

/* Keep controls independent */

html body.nujiz-increase-template-v570
#toolWorkspace > section.tool > .panel {

    position:relative!important;

    top:auto!important;
    bottom:auto!important;

    align-self:start!important;

    max-height:none!important;

    overflow:visible!important;
}

/* Preview statistics */

html body.nujiz-increase-template-v570
#toolWorkspace .preview-meta {

    position:relative!important;

    background:#1c222e!important;

    border-top:1px solid #394354!important;
}

html body.nujiz-increase-template-v570
#toolWorkspace .preview-meta strong {

    color:#ffffff!important;

    -webkit-text-fill-color:#ffffff!important;

    font-weight:800!important;
}

/* Mobile sticky preview */

@media(max-width:800px) {

    html body.nujiz-increase-template-v570
    #toolWorkspace > section.tool {

        display:flex!important;

        flex-direction:column!important;

        align-items:stretch!important;

        gap:14px!important;

        overflow:visible!important;
    }

    html body.nujiz-increase-template-v570
    #toolWorkspace > section.tool > .preview {

        order:-1!important;

        position:sticky!important;

        top:80px!important;

        width:100%!important;
        max-width:100%!important;

        max-height:36dvh!important;

        overflow:auto!important;

        z-index:30!important;

        border-radius:12px!important;

        box-shadow:
          0 8px 22px rgba(0,0,0,.35)!important;
    }

    html body.nujiz-increase-template-v570
    #toolWorkspace .preview-area {

        min-height:0!important;

        height:25dvh!important;

        max-height:25dvh!important;

        padding:8px!important;
    }

    html body.nujiz-increase-template-v570
    #previewImg:not([hidden]) {

        max-height:calc(25dvh - 16px)!important;

        max-width:100%!important;

        object-fit:contain!important;
    }

    html body.nujiz-increase-template-v570
    #toolWorkspace .preview-meta > div {

        padding:7px 4px!important;

        font-size:12px!important;
        line-height:1.4!important;
    }

    html body.nujiz-increase-template-v570
    #toolWorkspace .preview-meta strong {

        font-size:14px!important;
    }

    html body.nujiz-increase-template-v570
    #toolWorkspace > section.tool > .panel {

        order:1!important;

        width:100%!important;
        max-width:100%!important;

        min-width:0!important;
    }

    html body.nujiz-increase-template-v570
    #toolWorkspace .panel input,

    html body.nujiz-increase-template-v570
    #toolWorkspace .panel select,

    html body.nujiz-increase-template-v570
    #toolWorkspace .panel button {

        scroll-margin-top:calc(36dvh + 95px);
    }
}

/* Short landscape screens */

@media(max-width:950px) and
      (max-height:500px) and
      (orientation:landscape) {

    html body.nujiz-increase-template-v570
    #toolWorkspace > section.tool > .preview {

        top:65px!important;
        max-height:38dvh!important;
    }

    html body.nujiz-increase-template-v570
    #toolWorkspace .preview-area {

        min-height:0!important;
        height:22dvh!important;
    }

    html body.nujiz-increase-template-v570
    #previewImg:not([hidden]) {

        max-height:20dvh!important;
    }
}

/* Preserve original visibility logic */

html body.nujiz-increase-template-v570
#toolWorkspace [hidden] {

    display:none!important;
}

/* END NUJIZ V571 */
