
/* NUJIZ WORKSPACE SCROLL FIX V5 */

/* Disable sticky preview panels on all screen sizes */

html body main
:is(#nujizScrollPriority,.nsw-enabled,.npw-enabled)
:is(
    .nsw-preview,
    .npw-preview,
    .nsw-controls,
    .npw-controls
){

    position:relative!important;

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

    z-index:auto!important;

    max-height:none!important;

    overscroll-behavior:auto!important;
}

/* Disable sticky preview headings */

html body main
:is(
    #nujizScrollPriority,
    .nsw-preview-label,
    .npw-preview-head,
    .nsw-preview-head,
    .npw-heading
){

    position:relative!important;

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

    z-index:auto!important;

    transform:none!important;

    flex-shrink:0!important;
}

/* Additional specificity for smart workspace headings */

html body main
:is(.nsw-enabled,.npw-enabled)
:is(
    .nsw-preview-label,
    .npw-preview-head,
    .npw-heading
):not(#nujizScrollPriority){

    position:relative!important;

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

    z-index:auto!important;

    transform:none!important;
}

/* Disable floating action areas */

html body main
:is(#nujizScrollPriority,.nsw-enabled,.npw-enabled)
:is(
    .nsw-actions,
    .npw-actions
){

    position:relative!important;

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

    z-index:auto!important;

    transform:none!important;
}

/* Workspace toolbars */

html body main
:is(
    #nswToolbar,
    .npw-toolbar,
    .nsw-toolbar
):not(#nujizScrollPriority){

    position:relative!important;

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

    z-index:auto!important;
}

/* PDF preview areas */

html body main
:is(
    #rotatePdfGrid,
    #deletePdfGrid,
    #extractPdfGrid,
    #reorderGrid,
    .pdf-editor-stage,
    .pti-preview-wrap,
    .nujiz-rwm-stage
):not(#nujizScrollPriority){

    position:relative!important;

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

    z-index:auto!important;
}

/* Image and video workspace */

html body #toolWorkspace
:is(
    .preview-panel,
    .video-preview-panel,
    .image-preview-panel,
    .nsw-preview,
    .nsw-controls
):not(#nujizScrollPriority){

    position:relative!important;

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

    z-index:auto!important;
}

/* Audio workspace */

html body main .audio-workspace
:is(
    .audio-card,
    .audio-controls
):not(#nujizScrollPriority){

    position:relative!important;

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

    z-index:auto!important;
}

/* Prevent nested scrolling in smart workspace controls */

html body main
:is(#nujizScrollPriority,.nsw-enabled,.npw-enabled)
:is(.nsw-controls,.npw-controls){

    height:auto!important;
    max-height:none!important;

    overflow:visible!important;
}

/* Preserve native hidden states */

html body main
:is(
    .nsw-preview,
    .npw-preview,
    .nsw-controls,
    .npw-controls,
    .nsw-actions,
    .npw-actions
)[hidden]{

    display:none!important;
}

/* Preserve image editor visibility */

html body #toolWorkspace #editor:not(.visible){

    display:none!important;
}

