/* Print Styles for Invoice */

@media print {
    /* Hide all non-printable elements */
    .navbar,
    .sidebar,
    .btn,
    .no-print,
    .card-header .btn,
    .pagination,
    .alert {
        display: none !important;
    }

    /* Reset margins and padding */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
        font-family: Arial, sans-serif !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
    }

    .container-fluid {
        margin: 0 !important;
        padding: 15px !important;
        max-width: none !important;
        width: 100% !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        background: white !important;
        box-shadow: none !important;
    }

    /* Print area styles */
    .print-area {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }

    /* Table styles for printing */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 10px 0 !important;
    }

    table, th, td {
        border: 1px solid black !important;
        color: black !important;
    }

    th, td {
        padding: 8px !important;
        text-align: left !important;
        font-size: 10pt !important;
        background: white !important;
    }

    th {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
    }

    /* Header styles */
    .invoice-header {
        border-bottom: 2px solid black !important;
        padding-bottom: 15px !important;
        margin-bottom: 20px !important;
    }

    .company-info {
        text-align: center !important;
        margin-bottom: 15px !important;
    }

    .company-info h2 {
        font-size: 18pt !important;
        margin: 0 !important;
        color: black !important;
    }

    .invoice-title {
        text-align: center !important;
        font-size: 16pt !important;
        font-weight: bold !important;
        margin: 15px 0 !important;
        color: black !important;
    }

    /* Bill to/from sections */
    .invoice-details {
        display: flex !important;
        justify-content: space-between !important;
        margin-bottom: 25px !important;
    }

    .bill-to, .bill-from {
        width: 48% !important;
        color: black !important;
    }

    .bill-to h4, .bill-from h4 {
        font-size: 12pt !important;
        margin-bottom: 10px !important;
        color: black !important;
        border-bottom: 1px solid black !important;
        padding-bottom: 5px !important;
    }

    /* Text alignment utilities */
    .text-right {
        text-align: right !important;
    }

    .text-center {
        text-align: center !important;
    }

    .text-left {
        text-align: left !important;
    }

    /* Signature section */
    .signature-section {
        margin-top: 50px !important;
        display: flex !important;
        justify-content: space-between !important;
        color: black !important;
    }

    .signature-section div {
        width: 45% !important;
    }

    /* Page breaks */
    .page-break {
        page-break-before: always !important;
    }

    .no-page-break {
        page-break-inside: avoid !important;
    }

    /* Font weights and sizes */
    strong, .font-weight-bold {
        font-weight: bold !important;
        color: black !important;
    }

    small, .small {
        font-size: 9pt !important;
    }

    /* Remove box shadows and rounded corners */
    .card, .btn, .table, .form-control {
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Ensure all text is black */
    h1, h2, h3, h4, h5, h6, p, span, div, td, th, li {
        color: black !important;
    }

    /* Hide background colors and gradients */
    .bg-primary, .bg-secondary, .bg-success, .bg-danger, 
    .bg-warning, .bg-info, .bg-light, .bg-dark,
    .badge {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
    }

    /* Make sure totals stand out */
    .totals-row {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
        border-top: 2px solid black !important;
    }

    /* GST table specific styles */
    .gst-table {
        border: 2px solid black !important;
        margin: 15px 0 !important;
    }

    .gst-table th {
        background-color: #e0e0e0 !important;
        border: 1px solid black !important;
        text-align: center !important;
        font-weight: bold !important;
    }

    .gst-table td {
        border: 1px solid black !important;
        text-align: center !important;
    }

    /* Amount in words */
    .amount-words {
        font-style: italic !important;
        border: 1px solid black !important;
        padding: 10px !important;
        margin: 15px 0 !important;
        background-color: #f9f9f9 !important;
    }
}

/* Screen-only styles for print preview */
@media screen {
    .print-preview {
        background: white;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
        margin: 20px auto;
        padding: 20px;
        max-width: 800px;
    }
}