/* Meet DC & DPC: fonts and page layout for the PDF step (assets/mdd-pdf.js).
   The letter's own formatting is written inline by the server (includes/class-mdd-docx.php). */

@font-face { font-family: "MLU-Revathi"; src: url("../fonts/MLU-Revathi-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "MLU-Revathi"; src: url("../fonts/MLU-Revathi-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: "MLU-Revathi"; src: url("../fonts/MLU-Revathi-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: "MLU-Revathi"; src: url("../fonts/MLU-Revathi-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: block; }

/* Capture stage. Pages are built here, and one page at a time is captured here. The stage stays at the
   top-left of the viewport: html2canvas cannot capture content at negative coordinates, which is where an
   off-screen stage sits, and the captured pages came out with only the letterhead. A white cover above the
   stage hides the letter while the PDF is made. */
.mdd-stage { position: fixed; left: 0; top: 0; width: 0; height: 0; overflow: visible; z-index: 2147483000; pointer-events: none; }
.mdd-capture-cover {
    position: fixed; inset: 0; z-index: 2147483646; background: #fff; color: #0a2a4a;
    display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center;
    font-family: "Noto Sans Malayalam", Arial, sans-serif; font-size: 1rem; font-weight: 700;
}

/* One A4 page. Transparent, so the letterhead (drawn by the PDF step) shows through. */
.mdd-ink {
    position: absolute; left: 0; top: 0; overflow: hidden;
    background: transparent; color: #000;
    font-family: "MLU-Revathi", "Noto Sans Malayalam", "Segoe UI", Arial, sans-serif;
    font-size: 18.37px; line-height: 19.6px; text-align: left;
}
.mdd-ink div, .mdd-ink span, .mdd-ink td { margin: 0; }
/* A long reference (for example O.A.No.681/2018/24/19) breaks inside a narrow cell, instead of running into the next cell */
.mdd-ink td { overflow-wrap: anywhere; }

/* Body area inside the letter margins. Blocks stack as flex items, so margins never collapse. */
.mdd-body { position: absolute; display: flex; flex-direction: column; overflow: hidden; }
.mdd-body > * { flex: none; }
.mdd-group { display: flex; flex-direction: column; }
.mdd-group > * { flex: none; }
.mdd-tblwrap { flex: none; }
.mdd-tbl { border-collapse: collapse; border-spacing: 0; }
.mdd-cell { display: flex; flex-direction: column; }
.mdd-cell > * { flex: none; }
.mdd-split { display: flex; justify-content: space-between; align-items: baseline; }
.mdd-split > .mdd-end { margin-left: auto; }
.mdd-hang { display: grid; }
.mdd-mk { white-space: pre-wrap; }

/* Footer line with reference, member ID and page number. */
.mdd-footline {
    position: absolute; left: 0; right: 0; bottom: 6mm;
    text-align: center; font-family: Arial, sans-serif; font-size: 11px; color: #333;
}
