html.nxtpdf-html-preview-root,
body.nxtpdf-preview-admin {
    background: #4b5563;
}

body.nxtpdf-preview-admin {
    margin: 0 !important;
}

body.nxtpdf-preview-admin #adminmenumain,
body.nxtpdf-preview-admin #wpadminbar,
body.nxtpdf-preview-admin #wpfooter,
body.nxtpdf-preview-admin #screen-meta,
body.nxtpdf-preview-admin #screen-meta-links,
body.nxtpdf-preview-admin .notice,
body.nxtpdf-preview-admin .update-nag,
body.nxtpdf-preview-admin .error,
body.nxtpdf-preview-admin .updated {
    display: none !important;
}

body.nxtpdf-preview-admin #wpwrap,
body.nxtpdf-preview-admin #wpcontent,
body.nxtpdf-preview-admin #wpbody,
body.nxtpdf-preview-admin #wpbody-content {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
}

body.nxtpdf-preview-admin #wpcontent {
    margin-left: 0 !important;
}

body.nxtpdf-preview-admin #wpbody-content::after {
    display: none;
}

body.nxtpdf-preview-admin .wrap.nxtpdf-preview-screen {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
}

body.nxtpdf-html-preview-body,
.nxtpdf-preview-document {
    background: #ffffff;
    color: #111827;
    width: var(--nxtpdf-preview-page-width, 210mm);
    min-height: var(--nxtpdf-preview-page-height, 297mm);
    padding: var(--nxtpdf-preview-padding-top, 15mm) var(--nxtpdf-preview-padding-right, 15mm) var(--nxtpdf-preview-padding-bottom, 15mm) var(--nxtpdf-preview-padding-left, 15mm);
    box-sizing: border-box;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

body.nxtpdf-html-preview-body {
    margin: 24px auto;
}

body.nxtpdf-html-preview-body *,
.nxtpdf-preview-document * {
    box-sizing: border-box;
}

body.nxtpdf-html-preview-body img,
.nxtpdf-preview-document img {
    max-width: 100%;
    height: auto;
}

.nxtpdf-preview-error {
    width: min(720px, calc(100vw - 48px));
    background: #ffffff;
    color: #111827;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 16px 18px;
    box-sizing: border-box;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}

@media screen and (max-width: 960px) {
    body.nxtpdf-preview-admin .wrap.nxtpdf-preview-screen {
        padding: 12px;
    }

    body.nxtpdf-html-preview-body,
    .nxtpdf-preview-document {
        width: calc(100% - 24px);
        min-height: auto;
    }

    body.nxtpdf-html-preview-body {
        margin: 12px auto;
    }
}
