@media print {
    /* Existing styles */
    .logo h2,
    .logo h3,
    .logo h5 {
        text-align: center !important;
        margin: 5px 0 !important;
    }

    .logo hr {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Force center alignment for print */
    .print-center {
        text-align: center !important;
        display: block !important;
    }

    .print-text-center {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .print-hr-center {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .print-center-img {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Show the logo div in print */
    .logo.d-none {
        display: block !important;
    }
    
    /* New styles for the printable section */
    .printable_tb_section.d-none {
        display: block !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    
    /* Logo container specific */
    .print-logo-container {
        margin-bottom: 20px !important;
    }
    
    /* Business info styling */
    .business-info h2 {
        font-size: 24px !important;
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 10px !important;
    }
    
    .business-info h3 {
        font-size: 16px !important;
        color: #333 !important;
        margin: 3px 0 !important;
    }
    
    .business-info h5 {
        font-size: 14px !important;
        color: #555 !important;
        margin: 2px 0 !important;
    }
    
    /* Content area */
    .content-print-section {
        margin-top: 30px !important;
        min-height: 500px !important;
    }
    
    /* Print footer */
    .print-footer.d-none {
        display: block !important;
        position: fixed;
        bottom: 0;
        width: 100%;
        left: 0;
        padding: 10px 20px !important;
        background: white !important;
    }
    
    /* Page break handling */
    .printable_tb_section {
        page-break-inside: avoid !important;
    }
    
    .content-print-section {
        page-break-inside: auto !important;
    }
    
    /* Hide non-printable elements */
    body * {
        visibility: hidden;
    }
    
    .printable_tb_section,
    .printable_tb_section * {
        visibility: visible;
    }
    
    .printable_tb_section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    /* Page numbers */
    @page {
        margin: 2cm;
    }
    
    @page :first {
        margin-top: 3cm;
    }
    
    /* Add page numbers */
    body:after {
        content: counter(page);
    }
}

/* Screen-only styles */
@media screen {
    .printable_tb_section {
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 30px;
        margin: 20px auto;
        max-width: 800px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .print-logo-container img {
        transition: transform 0.3s ease;
    }
    
    .print-logo-container img:hover {
        transform: scale(1.05);
    }
    
    .business-info h2 {
        color: #2c3e50;
    }
    
    .business-info h3 {
        color: #34495e;
    }
    
    .business-info h5 {
        color: #7f8c8d;
    }
}