/* Print Styles for Admin View Modals */
@media print {
    /* Hide unwanted elements during print */
    .modal-backdrop,
    .btn-close,
    .dropdown-menu,
    .dropdown-toggle,
    .sidebar,
    .navbar,
    .no-print,
    .btn:not(.print-preserve) {
        display: none !important;
    }
    
    /* Ensure modal content takes full width */
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .modal-content {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    /* Remove background colors for better printing */
    .modal-header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .bg-light {
        background: white !important;
    }
    
    /* Ensure proper text colors */
    .text-white {
        color: black !important;
    }
    
    .text-muted {
        color: #666 !important;
    }
    
    /* Badge styles for print */
    .badge {
        border: 1px solid #000 !important;
        color: black !important;
        background: white !important;
        padding: 2px 6px !important;
    }
    
    /* Tab styling for print */
    .nav-tabs {
        border-bottom: 2px solid #000 !important;
    }
    
    .nav-link {
        color: black !important;
        border-color: #000 !important;
    }
    
    .nav-link.active {
        background-color: #f8f9fa !important;
        border-bottom-color: transparent !important;
    }
    
    /* Card styling */
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        margin-bottom: 15px !important;
    }
    
    .card-header {
        background: #f8f9fa !important;
        border-bottom: 1px solid #000 !important;
        font-weight: bold !important;
        color: black !important;
    }
    
    /* Table styling */
    .table {
        border-collapse: collapse !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
    
    .table-light th {
        background: #f8f9fa !important;
    }
    
    /* Font adjustments */
    body {
        font-size: 12px !important;
        line-height: 1.4 !important;
        color: black !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid !important;
    }
    
    /* Page break control */
    .page-break-before {
        page-break-before: always !important;
    }
    
    .page-break-after {
        page-break-after: always !important;
    }
    
    .no-page-break {
        page-break-inside: avoid !important;
    }
    
    /* Footer adjustments */
    .modal-footer {
        display: none !important;
    }
    
    /* Make sure modals are visible */
    .modal {
        position: static !important;
        display: block !important;
        background: white !important;
    }
}

/* Print-specific utility classes */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block !important;
    }
}

/* Print header */
@media print {
    .modal::before {
        content: "Admin Panel Record Details - Printed on " attr(data-print-date);
        display: block;
        text-align: center;
        font-weight: bold;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #000;
    }
    
    /* Voucher Lookup specific styles */
    #auth {
        background: white !important;
    }
    
    /* Hide search form when results are shown */
    .container-fluid:first-child {
        display: none !important;
    }
    
    /* Ensure voucher lookup results are properly formatted */
    .container-fluid:last-child {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
    }
    
    /* Print date header for voucher lookup */
    body::before {
        content: "Enrollment Details - Printed on " counter(page);
        display: block;
        text-align: center;
        font-weight: bold;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #000;
        font-size: 14px;
    }
}
