/* css/print.css */

@media print {
    /* Hide navigation sidebar, top bars, forms, buttons and cards header action triggers */
    .sidebar,
    .top-bar,
    .btn,
    .card-header,
    .no-print,
    .modal-overlay,
    .toast-container,
    form,
    .filters-section,
    .actions-cell,
    .stat-icon {
        display: none !important;
    }

    /* Reset layouts for printing */
    body, html {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
        font-family: Arial, sans-serif !important;
    }

    .app-container {
        display: block !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .view-container {
        padding: 0 !important;
    }

    .app-view {
        display: none !important;
    }

    .app-view.active {
        display: block !important;
    }

    /* Print Header */
    .print-header {
        display: block !important;
        margin-bottom: 24px;
        border-bottom: 2px solid #000000;
        padding-bottom: 12px;
    }

    .print-header h2 {
        font-size: 18pt;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .print-header p {
        font-size: 10pt;
        color: #555555;
    }

    /* Card styling adjustment for print */
    .card {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        backdrop-filter: none !important;
    }

    /* Table adjustments for printing */
    .table-responsive {
        overflow: visible !important;
    }

    .table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 15px !important;
    }

    .table th {
        background-color: #f0f0f0 !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important;
        font-weight: bold !important;
        padding: 8px 10px !important;
    }

    .table td {
        border: 1px solid #cccccc !important;
        padding: 8px 10px !important;
        background-color: transparent !important;
    }

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

    /* Zebra striping for print readability */
    .table tr:nth-child(even) td {
        background-color: #fafafa !important;
    }

    /* Stock indicator status numbers rather than colors */
    .badge {
        background: transparent !important;
        color: #000000 !important;
        padding: 0 !important;
        font-weight: normal !important;
        border: none !important;
    }

    /* Print Layout for KPI Cards */
    .dashboard-grid {
        display: block !important;
        margin-bottom: 20px !important;
        background: transparent !important;
    }

    .stat-card {
        display: inline-block !important;
        width: 45% !important;
        margin-right: 4% !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .stat-details {
        display: block !important;
    }

    .stat-label {
        font-size: 10pt !important;
        color: #555555 !important;
        display: block !important;
    }

    .stat-value {
        font-size: 14pt !important;
        font-weight: bold !important;
        color: #000000 !important;
        display: block !important;
    }

    /* Receipt Print Mode rules */
    .print-receipt-body {
        display: none;
    }

    body.print-receipt-mode .app-container {
        display: none !important;
    }

    body.print-receipt-mode .print-header,
    body.print-receipt-mode .print-receipt-body {
        display: block !important;
    }
}

/* Hide print header and receipt body by default on screens */
@media screen {
    .print-header,
    .print-receipt-body {
        display: none !important;
    }
}
