﻿/* nx-doc.css - Local theme override */

/* Layout: place control box to the right of the page content */
.fx-doc {
    --nx-primary-fg: black !important;
    --nx-highlight-fg: black !important;
    --nx-secondary-fg: black !important;
    --nx-highlight-fg: black !important;
        
        grid-column: -1/1;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 0px;
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--nx-border-radius);
    padding: var(--nx-space);
    background: var(--nx-primary-bg);
}

/* Control box sits beside the content (not absolutely positioned) */
.fx-doc-controlbox {
    position: static ;
    align-self: flex-start ;
    margin-left: calc(-1 * var(--nx-space-small)) ;
    z-index: 1 ;
}
    
/* Keep the existing page content size but allow it to shrink on small screens */
.fx-doc-content {
    width: 210mm ;
    min-height: 297mm ;
    box-sizing: border-box ;
    background: white ; /* Keep white for print document */
    color: #000 ; /* Ensure black text for print */
    border-radius: var(--nx-border-radius) ;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) ;
    overflow: hidden ;
    position: relative ;
    padding: 10mm 10mm ;
    display: block ;
}

/* Page container */
.fx-doc-pages {
    display: flex ;
    flex-direction: column ;
    gap: var(--nx-space) ;
    padding: var(--nx-space) ;
}

/* Individual page */
.fx-doc-page {
    background: white ;
    border-radius: var(--nx-border-radius) ;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) ;
}

@media print {
    .fx-doc {
        padding: 0 ;
        background: transparent ;
    }

    .fx-doc-content {
        min-height: min-content ;
        box-shadow: none ;
        border-radius: 0 ;
    }

    /* Put each page on its own printed page */
    .fx-doc-page {
        box-shadow: none ;
        margin: 0 ;
        border-radius: 0 ;
        page-break-after: always ;
    }

    /* Ensure measuring container is not printed */
    .fx-doc-measure {
        display: none ;
    }

    /* Make pages occupy full printable area when printing */
    .fx-doc-pages {
        gap: 0 ;
        padding: 0 ;
    }

    /* Hide control box when printing */
    .fx-doc-controlbox {
        display: none ;
    }
}
