﻿/* ========================================
   CLEAN PRINT STYLES FOR MEZANO CONSTRUCTION
   Works for all reports: Expenses, Timesheets, Paystubs, Invoices
   ======================================== */

@media print {

    /* ============================================
       HIDE UI ELEMENTS - Only show report content
       ============================================ */

    header,
    nav,
    .navbar,
    .navbar-ultra,
    footer,
    .btn,
    button,
    .alert,
    .pagination,
    .breadcrumb,
    form button[type="submit"],
    a.btn,
    .no-print {
        display: none !important;
    }

    /* ============================================
       REMOVE FANCY EFFECTS THAT BREAK PRINTING
       ============================================ */

    /* Remove animated background */
    body::before,
    body::after {
        display: none !important;
    }

    /* Remove all animations and transitions */
    * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        overflow: visible !important;
    }

    /* Remove sticky/fixed positioning */
    * {
        position: static !important;
    }

    /* ============================================
       BODY AND LAYOUT
       ============================================ */

    body {
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    .container,
    .container-fluid,
    .container-ultra,
    main,
    .page-transition {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 15px !important;
        overflow: visible !important;
    }

    /* ============================================
       TABLES - Make them fit and look good
       ============================================ */

    .table-responsive {
        overflow: visible !important;
    }

    table {
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto !important;
        font-size: 11pt !important;
    }

    thead {
        display: table-header-group !important;
    }

    tbody {
        display: table-row-group !important;
    }

    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 6px 8px !important;
        text-align: left !important;
        word-wrap: break-word !important;
        overflow: visible !important;
    }

    th {
        background: #f0f0f0 !important;
        font-weight: bold !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* ============================================
       CARDS - Keep them clean
       ============================================ */

    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        margin-bottom: 15px !important;
        overflow: visible !important;
    }

    .card-header {
        background: #f8f9fa !important;
        border-bottom: 2px solid #000 !important;
        padding: 10px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .card-body {
        padding: 15px !important;
        overflow: visible !important;
    }

    /* ============================================
       REMOVE COLORS - Black text on white
       ============================================ */

    .bg-primary,
    .bg-secondary,
    .bg-success,
    .bg-danger,
    .bg-warning,
    .bg-info,
    .bg-light,
    .bg-dark {
        background: white !important;
        color: black !important;
    }

    .text-primary,
    .text-secondary,
    .text-success,
    .text-danger,
    .text-warning,
    .text-info,
    .text-muted,
    .text-white {
        color: black !important;
    }

    /* ============================================
       BADGES AND LABELS
       ============================================ */

    .badge {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
        padding: 2px 4px !important;
    }

    /* ============================================
       HEADINGS
       ============================================ */

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid !important;
        color: black !important;
    }

    /* ============================================
       PAGE SETUP
       ============================================ */

    @page {
        size: letter;
        margin: 0.5in;
    }

    /* ============================================
       REMOVE SHADOWS
       ============================================ */

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* ============================================
       FORCE VISIBILITY
       ============================================ */

    * {
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* ============================================
       PAYSTUB SPECIFIC - Make sure amounts show
       ============================================ */

    .paystub-table,
    .deductions-table,
    .earnings-table {
        width: 100% !important;
    }

        .paystub-table th,
        .paystub-table td,
        .deductions-table th,
        .deductions-table td,
        .earnings-table th,
        .earnings-table td {
            display: table-cell !important;
            visibility: visible !important;
        }

    /* ============================================
       NET PAY BOX - Keep it visible
       ============================================ */

    .net-pay-box,
    .total-box,
    .summary-box {
        border: 2px solid #000 !important;
        padding: 15px !important;
        margin: 15px 0 !important;
        page-break-inside: avoid !important;
        background: white !important;
    }
}

/* ========================================
   END CLEAN PRINT STYLES
   ======================================== */
