/* MICR Font Definition - Bulletproof @font-face */
@font-face {
    font-family: 'MICRCHEK';
    src: url('../fonts/MICRCHEK.eot');
    src: url('../fonts/MICRCHEK.eot?#iefix') format('embedded-opentype'),
         url('../fonts/MICRCHEK.woff2') format('woff2'),
         url('../fonts/MICRCHEK.woff') format('woff'),
         url('../fonts/MICRCHEK.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    padding: 20px;
}

/* Control Panel (Hidden when printing) */
.controls {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.controls button {
    padding: 10px 20px;
    margin: 5px;
    font-size: 16px;
    cursor: pointer;
    background-color: #2D4492;
    color: white;
    border: none;
    border-radius: 3px;
}

.controls button:hover {
    background-color: #1e2f5f;
}

/* Check Container */
#checks-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Check Base Styles */
.check {
    width: 8.5in;
    height: 3.5in;
    background: white;
    position: relative;
    border: 1px solid #ccc;
    margin: 0 auto;
    page-break-after: always;
    page-break-inside: avoid;
}

/* Field Base Styles */
.field {
    position: absolute;
    font-family: Arial, sans-serif;
    color: #000;
    border: none;
    padding: 0;
    background: transparent;
}

/* Payor Information (Top Left - reduced spacing) */
.payor-name {
    top: 0.2in;
    left: 0.3in;
    font-size: 14pt;
    font-weight: bold;
}

.payor-address {
    top: 0.4in; /* 0.45in - 0.05in */
    left: 0.3in;
    font-size: 9pt; /* 10pt * 0.9 = 9pt (10% reduction) */
}

.payor-city-state-zip {
    top: 0.55in; /* 0.65in - 0.1in */
    left: 0.3in;
    font-size: 9pt; /* 10pt * 0.9 = 9pt (10% reduction) */
}

.payor-phone {
    top: 0.7in; /* 0.85in - 0.15in */
    left: 0.3in;
    font-size: 8pt; /* 9pt * 0.9 = 8.1pt ≈ 8pt (10% reduction) */
}

/* Bank Information (Same line as Payor, moved left 3/8") */
.bank-name {
    top: 0.2in;
    left: 3.175in; /* 3.55in - 0.375in */
    font-size: 11pt;
    font-weight: bold;
}

.bank-address {
    top: 0.4in; /* 0.45in - 0.05in */
    left: 3.175in;
    font-size: 8pt; /* 9pt * 0.9 = 8.1pt ≈ 8pt (10% reduction) */
}

.bank-city-state-zip {
    top: 0.55in; /* 0.65in - 0.1in */
    left: 3.175in;
    font-size: 8pt; /* 9pt * 0.9 = 8.1pt ≈ 8pt (10% reduction) */
}

.bank-phone {
    top: 0.7in; /* 0.85in - 0.15in */
    left: 3.175in;
    font-size: 8pt; /* 9pt * 0.9 = 8.1pt ≈ 8pt (10% reduction) */
}

/* Routing Number (1.5" right of Bank Info) */
.routing-number {
    top: 0.3in;
    left: 5.3in; /* 4.8in + 0.5in */
    font-size: 10pt;
    font-weight: bold;
}

/* Check Number (Top Right - reduced 25% from 24pt) */
.check-number {
    top: 0.3in;
    right: 0.75in; /* 0.5in + 0.25in (moving left means increasing right value) */
    font-size: 18pt; /* 24pt * 0.75 = 18pt (25% reduction) */
    font-weight: bold;
}

/* Date (Right Side - moved up 1/8") */
.date {
    top: 0.85in; /* 0.975in - 0.125in */
    right: 0.5in; /* 0.25in + 0.25in (moving left means increasing right value) */
    font-size: 11pt;
}

/* Pay To The Order Of (moved up 1/8") */
.pay-to-label {
    top: 1.125in; /* 1.25in - 0.125in */
    left: 0.3in;
    font-size: 9pt;
}

.pay-to-label-2 {
    top: 1.275in; /* 1.4in - 0.125in */
    left: 0.3in;
    font-size: 9pt;
}

.payee-name {
    top: 1.125in; /* Moved up with Pay to */
    left: 1.05in; /* 0.8in + 0.25in */
    font-size: 12pt;
    font-weight: bold;
    min-width: 3in;
}

.payee-address {
    top: 1.325in; /* Reduced spacing */
    left: 1.05in;
    font-size: 9pt; /* 10pt * 0.9 = 9pt (10% reduction) */
}

.payee-city-state-zip {
    top: 1.475in; /* Reduced spacing */
    left: 1.05in;
    font-size: 9pt; /* 10pt * 0.9 = 9pt (10% reduction) */
}

.payee-phone {
    top: 1.625in; /* Reduced spacing */
    left: 1.05in;
    font-size: 8pt; /* 9pt * 0.9 = 8.1pt ≈ 8pt (10% reduction) */
}

/* Amount (Numeric) - Right Side (reduced 25%, moved down 0.25") */
.amount-numeric {
    top: 1.375in; /* 1.125in + 0.25in */
    right: 1.0in; /* 0.5in + 0.5in (moving left means increasing right value) */
    font-size: 13.5pt; /* 18pt * 0.75 = 13.5pt (25% reduction) */
    font-weight: bold;
    text-align: right;
}

/* The Sum Of Label (moved down 1/8") */
.sum-of-label {
    top: 1.975in; /* 1.85in + 0.125in */
    left: 0.3in;
    font-size: 10pt;
    font-weight: bold;
}

/* Amount Written (Text - moved left 0.5", prevent wrapping) */
.amount-written {
    top: 1.975in; /* 1.85in + 0.125in */
    left: 1.3in; /* 1.8in - 0.5in */
    font-size: 10pt;
    min-width: 5in;
    max-width: 6in;
    white-space: nowrap;
}

.us-funds {
    top: 1.55in;
    left: 4.8in;
    font-size: 8pt;
    font-style: italic;
}

/* Memo Line (moved up 0.5") */
.memo-label {
    top: 2.5in; /* 3.0in - 0.5in */
    left: 0.3in;
    font-size: 9pt;
    font-weight: bold;
}

.memo {
    top: 2.5in;
    left: 1.0in;
    font-size: 10pt;
}

/* Signature Line - Hidden (removed random line 1" below numerical amount) */
.signature-line {
    display: none;
}

/* MICR Line (Bottom - Critical Positioning, moved right 2", font reduced 25%) */
.micr-line {
    bottom: 0.25in; /* 1/4 inch from bottom */
    left: 2.3in; /* 0.3in + 2.0in */
    font-family: 'MICRCHEK', monospace;
    font-size: 10.5pt; /* 14pt * 0.75 = 10.5pt (25% reduction) */
    letter-spacing: 0.05em;
    color: #000;
    white-space: nowrap;
}

/* Signature Text (Bottom Right - 3.5" from right, moved down 3/8", tight spacing) */
/* 8.5" check width - 3.5" from right = 5.0" from left */
.signature-not-required {
    bottom: 1.025in; /* 1.4in - 0.375in (moved down 3/8") */
    left: 5.0in; /* 8.5in - 3.5in = 5.0in from left */
    font-size: 14pt;
    font-weight: bold;
    text-align: left;
    line-height: 1.0;
}

.signature-text-1 {
    bottom: 0.95in; /* Tight spacing - 0.075in below SIGNATURE */
    left: 5.0in;
    font-size: 7pt; /* 8pt - 1pt (slightly smaller than "Payable in U.S. Funds") */
    text-align: left;
    line-height: 1.0;
}

.signature-text-2 {
    bottom: 0.875in; /* Tight spacing - 0.075in below line 1 */
    left: 5.0in;
    font-size: 7pt;
    text-align: left;
    line-height: 1.0;
}

.signature-text-3 {
    bottom: 0.8in; /* Tight spacing - 0.075in below line 2 */
    left: 5.0in;
    font-size: 7pt;
    text-align: left;
    line-height: 1.0;
}

.signature-text-4 {
    bottom: 0.725in; /* Tight spacing - 0.075in below line 3, moved down 3/8" */
    left: 5.0in;
    font-size: 7pt;
    text-align: left;
    line-height: 1.0;
}

/* Print Styles */
@media print {
    @page {
        size: letter;
        margin: 0;
    }
    
    body {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    .no-print {
        display: none !important;
    }
    
    .check {
        width: 8.5in;
        height: 3.5in;
        border: none;
        margin: 0;
        page-break-after: always;
        page-break-inside: avoid;
    }
    
    #checks-container {
        display: block;
    }
}








