/* =========================================================
   Thermal Printer — 80mm paper
   Courier New, black on white, no Chrome header/footer
   ========================================================= */

@media print {

    /* Remove Chrome's automatic header (title) and footer (URL/date) */
    @page {
        size: 80mm auto;
        margin: 0;
    }

    /* Base reset for thermal output */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box !important;
    }

    html, body {
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 4mm !important;
        padding: 0 !important;
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 10pt !important;
        color: #000 !important;
        background: #fff !important;
    }

    /* Hide everything not needed for a receipt */
    nav,
    .navbar,
    .sidenav,
    .sidebar,
    header,
    footer,
    .footer,
    .header,
    .bg-gradient-primary,
    .bg-gradient-dark,
    .btn,
    .btn-group,
    .alert,
    .breadcrumb,
    .pagination,
    .modal,
    .modal-backdrop,
    .badge:not(.badge-print),
    .card-img-top,
    img:not(.logo-print),
    #navbar-main,
    #sidenav-main,
    #logout-form,
    .no-print,
    [class*="d-none"],
    .fixed-plugin,
    .scroll-to-top {
        display: none !important;
    }

    /* Remove card chrome — just content */
    .card {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 2mm 0 !important;
        background: #fff !important;
        color: #000 !important;
        border: none !important;
    }

    .container,
    .container-fluid,
    .row,
    .col,
    [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        float: none !important;
        flex: none !important;
    }

    /* Receipt divider */
    hr {
        border-top: 1px dashed #000 !important;
        margin: 2mm 0 !important;
    }

    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        font-family: 'Courier New', Courier, monospace !important;
        color: #000 !important;
        margin: 1mm 0 !important;
        font-size: 11pt !important;
        font-weight: bold !important;
    }

    p, td, th, li, span, div {
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 10pt !important;
        color: #000 !important;
        line-height: 1.4 !important;
    }

    /* Tables */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th, td {
        padding: 1mm 0 !important;
        border: none !important;
        text-align: left !important;
    }

    th {
        font-weight: bold !important;
        border-bottom: 1px solid #000 !important;
    }

    /* Order items: name left, price right */
    .print-item-row td:last-child,
    .text-right {
        text-align: right !important;
    }

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

    /* KDS / POS order cards — show full width, no shadow */
    .order-card,
    [class*="order"] .card {
        border: 1px solid #000 !important;
        margin-bottom: 3mm !important;
        page-break-inside: avoid !important;
    }
}
