/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    .no-print,
    .agreement-actions,
    .sidebar,
    .navbar,
    .btn,
    .form-control,
    .alert,
    .modal,
    .dropdown,
    .pagination {
        display: none !important;
    }
    
    /* Reset body for print */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* A4 page setup */
    .agreement-document {
        width: 210mm !important;
        min-height: 297mm !important;
        margin: 0 auto !important;
        padding: 20mm !important;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
        page-break-inside: avoid !important;
        page-break-after: always !important;
    }
    
    /* Improve text readability for print */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid !important;
    }
    
    p, li {
        page-break-inside: avoid !important;
    }
    
    /* Links in print */
    a {
        color: black !important;
        text-decoration: none !important;
    }
    
    /* Tables in print */
    table {
        page-break-inside: avoid !important;
        border-collapse: collapse !important;
    }
    
    th, td {
        border: 1px solid #ddd !important;
        padding: 8px !important;
    }
    
    /* Signature lines */
    .signature-line {
        border-top: 1px solid black !important;
        margin-top: 50px !important;
    }
    
    /* Remove backgrounds */
    .party,
    .additional-terms-section,
    .term-item {
        background: none !important;
        border: 1px solid #ddd !important;
    }
    
    /* Page breaks */
    .page-break {
        page-break-before: always !important;
    }
    
    /* Avoid breaking inside important sections */
    .terms-section,
    .signatures {
        page-break-inside: avoid !important;
    }
    
    /* Hide URLs in print */
    a[href]:after {
        content: none !important;
    }
    
    /* Footer for each page */
    @page {
        margin: 20mm;
    }
     
    @page :first {
        margin-top: 0;
    }
    
    /* Print header */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
    }
    
    .print-footer {
        display: block !important;
        position: fixed;
        bottom: 0;
        width: 100%;
        text-align: center;
        font-size: 10pt;
        color: #666;
        border-top: 1px solid #ddd;
        padding-top: 5px;
    }
}