/* browser_pdf_print.css */


/* Optional: same page setup as WeasyPrint, but only for browser print */
@page {
  size: A4;
  margin: 2cm;
}

/* Slightly smaller, compact print text */
body {
  font-family: sans-serif;
  font-size: 13px;
  line-height: 1.4;
}


    .navbar-brand,
    .navbar-logo-text {
        display: none !important;
    }

/* DEBUG: prove print CSS is loading
can be removed after all of the testing
This comment was set/written on Feb. 156, 2026
*/

/* body {
    outline: 10px solid red !important;
} */


@media print {

/* ============================
   GLOBAL BUTTON REMOVAL (PRINT)
   ============================ */

/* Hide all <button> elements */
button {
    display: none !important;
}

/* Hide all Bootstrap-style buttons */
.btn {
    display: none !important;
}

/* Hide all submit inputs */
input[type="submit"],
input[type="button"],
input[type="reset"] {
    display: none !important;
}

/* hide all circled i-icons from bootstrap bi */

    .bi-info-circle,
    .bi-info-circle-fill {
        display: none !important;
    }




/* If you want even more spacing for these two specific headers: */
h4:contains("Reporting Period"),
h4:contains("Credit Ratios for reporting period chosen") {
    margin-bottom: 18px !important;
}


#app-footer,
#app-footer * {
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}


/*===========================================================================================
   Hide all dropzones in browser-generated PDF (not weasyprint, of course)
   Hides dropzones when click "Print / Save as PDF".

=============================================================================================*/

    /* 
   Hide entire dropzone UI in browser print.
   Chrome refuses to hide file inputs directly, but WILL hide a wrapper
   that contains them. This ensures the dropzone never appears in the
   browser-generated PDF, while uploaded images (outside this wrapper)
   still print normally.
*/


#financial-risk-dropzone * {
    pointer-events: none !important;
}
#financial-risk-dropzone {
    display: none !important;
}

.dropzone-wrapper {
    display: none !important;
}

/* Remove spacing above the textarea */
#financial_risk_text {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove spacing under the textarea counter */
#financial_risk_text + .text-muted.small {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove spacing from any mb-3 inside this section */
#financial-risk-form .mb-3 {
    margin: 0 !important;
    padding: 0 !important;
}

.print-hide {
    display: none !important;
}

.no-images-uploaded {
    display: none !important;
}

/* =============================================================================================
   Remove the counter of X of 3000 characters in the textareas
   of financial risk and business risk - overall 4 of them
   The text-muted.small for FRP/BRP counter and small.text-muted
   for override and ESG textareas
================================================================================================ */

.text-muted.small {
    display: none !important;
}

small.text-muted {
    display: none !important;
}


/* Hide ONLY the Related Party input form */
#relatedparty-section > form {
    display: none !important;
}

/* Hide ONLY the PE Sponsor input form */
#pesponsor-section > form {
    display: none !important;
}


/* ============================
   BROWSER PRINT CSS (LOANS)
   ============================ */

/* 1. Hide instructions */
#existing-loans-section details {
    display: none !important;
}

/* 2. KEEP your <h3>Loans Outstanding</h3> visible */

/* 3. Hide the yellow warning banner */
#existing-loans-section #loan-warning-banner {
    display: none !important;
}

/* 4. HIDE ONLY the loan entry form (this removes all inputs + space) */
#existing-loans-section form[action*="create_loan"] {
    display: none !important;
}

/* 5. KEEP the summary form visible, but hide its UI */
#existing-loans-section form[action*="save_loan_summary"] textarea,
#existing-loans-section form[action*="save_loan_summary"] button,
#existing-loans-section form[action*="save_loan_summary"] .btn {
    display: none !important;
}

/* 6. KEEP summary heading visible */
#existing-loans-section h4 {
    display: block !important;
}

/* 7. KEEP summary text visible */
#existing-loans-section #loan_summary_text {
    display: block !important;
}

/* 8. KEEP existing loans table visible */
#existing-loans-section .loan-summary-table {
    display: table !important;
}

/* 9. KEEP totals visible */
#existing-loans-section .total-loan-box {
    display: block !important;
}

/* FINAL FIX: remove ONLY the loan entry form */
#existing-loans-section > div > form {
    display: none !important;
}


    #existing-loans-section table.loan-summary-table th:last-child,
    #existing-loans-section table.loan-summary-table td:last-child {
        display: none !important;
    }

/* ============================
REPORTING PERIOD
============================ */

.reporting-period-row {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 1rem !important;
    padding-top: 12px !important;
}

.reporting-period-row .cell {
    display: table-row !important;
}

.reporting-period-row .cell label,
.reporting-period-row .cell *:not(label) {
    display: table-cell !important;
    padding: 6px 8px !important;
    border: 1px solid #ccc !important;
    vertical-align: top !important;
}

/* ====================================================================
    CREDIT RATIOS
================================================================ */

.ratio-grid {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    padding-top: 12px !important;
}

.ratio-grid .ratio-item {
    display: table-row !important;
}

.ratio-grid .ratio-item label,
.ratio-grid .ratio-item *:not(label) {
    display: table-cell !important;
    padding: 6px 8px !important;
    border: 1px solid #ccc !important;
    vertical-align: top !important;
}

/* Add spacing BELOW the header by adding margin ABOVE the table */
.reporting-period-row {
    margin-top: 16px !important;
}

.ratio-grid {
    margin-top: 16px !important;
}

/* Force black text for rating elements in browser print */


.rating-badge-unified,
#final-rating,
.rating-table td span {
    font-size: 14px !important;      /* oder was du willst */
    font-weight: 400 !important;     /* normales Gewicht */
    color: #000 !important;          /* tiefschwarz */
    background: #fff !important;     /* Badge neutralisieren */
    border: none !important;         /* falls Bootstrap was setzt */
    box-shadow: none !important;     /* falls Bootstrap was setzt */
    padding: 0 !important;           /* optional: Badge-Optik entfernen */
}


/* ==================================================================
        Override and ESG = NO PDF css here as textarea
        small/muted text wiped out above in general styles
=================================================================== */

/* ================================================================
    COVENANT PERIOD TABLE
=================================================================== */

/* Row 1: 3 columns */
.covenant-row-1 {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 16px !important; /* spacing below textarea */
}

.covenant-row-1 > div {
    display: table-row !important;
}

.covenant-row-1 > div label,
.covenant-row-1 > div *:not(label) {
    display: table-cell !important;
    padding: 6px 8px !important;
    border: 1px solid #ccc !important;
    vertical-align: top !important;
}

/* Row 2: 2 columns */
.covenant-row-2 {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 12px !important;
}

.covenant-row-2 > div {
    display: table-row !important;
}

.covenant-row-2 > div label,
.covenant-row-2 > div *:not(label) {
    display: table-cell !important;
    padding: 6px 8px !important;
    border: 1px solid #ccc !important;
    vertical-align: top !important;
}

/* Center covenant tables and give them breathing room */
.covenant-row-1,
.covenant-row-2 {
    width: 98% !important;              /* shrink to content */
    margin-left: auto !important;        /* center horizontally */
    margin-right: auto !important;
}



/* Collaterl section */




/* Collaterl liquidation section */


    .table-responsive {
        overflow: visible !important;
        display: block !important;
        max-width: 100% !important;
    }

    /* Remove Typical Haircut column */
    #collateral-liquidation-section table.collateral-table th:nth-child(5),
    #collateral-liquidation-section table.collateral-table td:nth-child(5) {
        display: none !important;
    }

    /* Force Chrome to respect widths */
    #collateral-liquidation-section table.collateral-table {
        table-layout: fixed !important;
        width: 100% !important;
    }

    /* Column 1: 40% */
    #collateral-liquidation-section table.collateral-table th:nth-child(1),
    #collateral-liquidation-section table.collateral-table td:nth-child(1) {
        width: 40% !important;
    }

    /* Column 2: 20% */
    #collateral-liquidation-section table.collateral-table th:nth-child(2),
    #collateral-liquidation-section table.collateral-table td:nth-child(2) {
        width: 20% !important;
    }

    /* Column 3: 20% */
    #collateral-liquidation-section table.collateral-table th:nth-child(3),
    #collateral-liquidation-section table.collateral-table td:nth-child(3) {
        width: 20% !important;
    }

    /* Column 4: 20% */
    #collateral-liquidation-section table.collateral-table th:nth-child(4),
    #collateral-liquidation-section table.collateral-table td:nth-child(4) {
        width: 20% !important;
    }


    /* waterfall section */


    #waterfall-section .bi-info-circle {
        display: none !important;
    }


    #waterfall-section table.other-lender-claim-table th:last-child,
    #waterfall-section table.other-lender-claim-table td:last-child {
        display: none !important;
    }



} /* END @media print */

