
/* NUJIZ ROTATE PDF STUDIO V21 */

html body .rotate-pdf-panel{
    --nrp-bg:#ffffff;
    --nrp-card:#f5f6fa;
    --nrp-text:#182235;
    --nrp-muted:#526176;
    --nrp-border:#d8deea;
    --nrp-accent:#a92343;
}

html[data-theme="dark"] body .rotate-pdf-panel{
    --nrp-bg:#171b24;
    --nrp-card:#222834;
    --nrp-text:#f5f6fa;
    --nrp-muted:#c5cedd;
    --nrp-border:#414b5d;
    --nrp-accent:#ffafbf;
}

/* Workspace */

html body main
.rotate-pdf-panel:not(#nrpPriority):not([hidden]){

    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto!important;

    flex-direction:column!important;

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

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

    padding:22px!important;
    gap:16px!important;

    box-sizing:border-box!important;

    background:var(--nrp-bg)!important;
    border:1px solid var(--nrp-border)!important;
    border-radius:20px!important;

    overflow:visible!important;
}

/* Smart workspace */

html body main .rotate-pdf-panel
:is(.npw-controls,.npw-preview):not(#nrpPriority){

    position:relative!important;
    inset:auto!important;

    grid-column:1/-1!important;

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

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

    overflow:visible!important;
}

html body main .rotate-pdf-panel
.npw-controls:not(#nrpPriority){

    order:-1!important;
}

html body main .rotate-pdf-panel
.npw-preview:not(#nrpPriority){

    order:1!important;
}

/* Studio heading */

html body main .rotate-pdf-panel
.rotate-pdf-head:not(#nrpPriority){

    grid-column:1/-1!important;

    width:100%!important;
    padding:20px!important;

    box-sizing:border-box!important;

    background:linear-gradient(
        120deg,#741d37,#bd3452,#a83d36
    )!important;

    border-radius:16px!important;

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

html body main .rotate-pdf-panel
.rotate-pdf-head:not(#nrpPriority)
:is(h2,h3,p){

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

html body main .rotate-pdf-panel
.rotate-pdf-head h2{

    font-size:24px!important;
    line-height:1.5!important;
    font-weight:850!important;
}

html body main .rotate-pdf-panel
.rotate-pdf-head p{

    font-size:16px!important;
    line-height:1.8!important;
}

/* Selection counters */

html body main .rotate-pdf-panel
:is(
    [class*="count"],
    [class*="counter"],
    [class*="selected-badge"]
):not(#nrpPriority){

    background:var(--nrp-card)!important;
    color:var(--nrp-text)!important;
    -webkit-text-fill-color:var(--nrp-text)!important;

    border:1px solid var(--nrp-border)!important;
    border-radius:12px!important;

    font-weight:800!important;
}

html body main .rotate-pdf-panel
:is(
    [class*="count"],
    [class*="counter"],
    [class*="selected-badge"]
):not(#nrpPriority) *{

    color:var(--nrp-text)!important;
    -webkit-text-fill-color:var(--nrp-text)!important;
}

/* Horizontal toolbar */

html body main .rotate-pdf-panel
.rotate-pdf-controls:not(#nrpPriority):not([hidden]){

    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;

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

    grid-column:1/-1!important;

    position:relative!important;
    inset:auto!important;

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

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

    gap:10px!important;
    padding:14px!important;

    box-sizing:border-box!important;

    background:var(--nrp-card)!important;
    border:1px solid var(--nrp-border)!important;
    border-radius:14px!important;

    overflow:visible!important;
}

html body main .rotate-pdf-panel
.rotate-pdf-controls button:not(#nrpPriority){

    min-height:46px!important;
    width:auto!important;

    padding:10px 16px!important;

    border:1px solid var(--nrp-border)!important;
    border-radius:10px!important;

    background:var(--nrp-bg)!important;

    color:var(--nrp-text)!important;
    -webkit-text-fill-color:var(--nrp-text)!important;

    font-size:14px!important;
    font-weight:750!important;

    white-space:nowrap!important;
}

html body main .rotate-pdf-panel
.rotate-pdf-controls button:not(:disabled):hover{

    border-color:var(--nrp-accent)!important;

    color:var(--nrp-accent)!important;
    -webkit-text-fill-color:var(--nrp-accent)!important;
}

html body main .rotate-pdf-panel
.rotate-pdf-controls button:disabled{

    opacity:.60!important;
}

/* Larger document preview */

html body main
#rotatePdfGrid:not(#nrpPriority):not([hidden]){

    display:grid!important;

    grid-template-columns:
        repeat(auto-fill,minmax(min(100%,230px),1fr))
        !important;

    grid-column:1/-1!important;

    align-content:start!important;
    align-items:start!important;

    position:relative!important;
    inset:auto!important;

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

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

    padding:12px!important;
    gap:16px!important;

    box-sizing:border-box!important;

    overflow:visible!important;
}

/* Page cards */

html body main
#rotatePdfGrid > :not(#nrpPriority){

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

    padding:12px!important;

    box-sizing:border-box!important;

    background:var(--nrp-card)!important;
    border:2px solid var(--nrp-border)!important;
    border-radius:15px!important;

    color:var(--nrp-text)!important;
    -webkit-text-fill-color:var(--nrp-text)!important;
}

html body main
#rotatePdfGrid > :is(
    .selected,
    .is-selected,
    [aria-selected="true"],
    :has(input:checked)
):not(#nrpPriority){

    border-color:#f4536c!important;

    box-shadow:
        0 0 0 3px rgba(244,83,108,.18)!important;
}

html body main
#rotatePdfGrid :is(canvas,img){

    max-width:100%!important;
    max-height:340px!important;

    object-fit:contain!important;

    background:#ffffff!important;
    border-radius:7px;
}

/* Page numbers and labels */

html body main
#rotatePdfGrid :is(
    p,small,b,strong,label,span,
    [class*="number"],
    [class*="caption"]
):not(#nrpPriority){

    color:var(--nrp-text)!important;
    -webkit-text-fill-color:var(--nrp-text)!important;

    font-size:14px!important;
    font-weight:750!important;
}

html body main
#rotatePdfGrid [class*="number"]{

    background:#a92343!important;
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
}

html body main
#rotatePdfGrid input[type="checkbox"]{

    width:20px!important;
    height:20px!important;

    accent-color:#bd3452!important;
}

/* Action buttons */

html body main .rotate-pdf-panel
.rotate-pdf-actions:not(#nrpPriority):not([hidden]){

    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;

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

    grid-column:1/-1!important;

    position:relative!important;
    inset:auto!important;

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

    gap:12px!important;
    margin:14px auto!important;
}

html body main .rotate-pdf-panel
.rotate-pdf-actions :is(button,a){

    width:auto!important;
    min-width:140px!important;
    min-height:50px!important;

    padding:12px 20px!important;

    border-radius:12px!important;

    font-size:16px!important;
    font-weight:800!important;
    line-height:1.5!important;
}

/* Status text */

html body main .rotate-pdf-panel
:is(
    [class*="status"],
    [class*="message"]
):not(#nrpPriority){

    font-size:14px!important;
    line-height:1.8!important;

    color:var(--nrp-muted)!important;
    -webkit-text-fill-color:var(--nrp-muted)!important;
}

/* Preserve hidden elements */

html body main .rotate-pdf-panel[hidden],
html body main .rotate-pdf-panel [hidden],
html body main #rotatePdfGrid[hidden]{

    display:none!important;
}

/* Mobile */

@media(max-width:767px){

    html body main
    .rotate-pdf-panel:not(#nrpPriority){

        padding:12px!important;
        gap:12px!important;
    }

    html body main .rotate-pdf-panel
    .rotate-pdf-head h2{

        font-size:20px!important;
    }

    html body main
    #rotatePdfGrid:not(#nrpPriority){

        grid-template-columns:
            repeat(2,minmax(0,1fr))!important;

        gap:10px!important;
        padding:5px!important;
    }

    html body main
    #rotatePdfGrid > :not(#nrpPriority){

        padding:8px!important;
    }

    html body main .rotate-pdf-panel
    .rotate-pdf-controls button{

        flex:1 1 110px!important;

        font-size:13px!important;
        padding:9px!important;
    }

    html body main .rotate-pdf-panel
    .rotate-pdf-actions :is(button,a){

        flex:1 1 130px!important;
        min-width:0!important;

        font-size:14px!important;
    }
}
