/* Bill / cart table — card shell + bg-primary header */
.bill-table-card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
}

.bill-table-card .pb-wrap {
    border: 0 !important;
    margin: 0;
}

.bill-table-card .pb-tbl {
    margin-bottom: 0;
}

/* optional header (check-bill modal) */
.bill-table-card .pb-th.bg-primary th,
.bill-table-card .pb-th > tr.bg-primary > th {
    background-color: var(--primary, #007bff) !important;
    border-color: var(--primary, #007bff);
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.45rem 0.5rem;
    white-space: nowrap;
}

.bill-table-card .pb-wrap table.pb-tbl thead.pb-th th {
    position: sticky;
    top: 0;
    z-index: 6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

/* POS cart order — no thead */
.bill-table-card .pb-wrap:not(:has(thead)) {
    padding-top: 0.15rem;
}

/* Cart line cards — see cart-lines.css (iOS minimal) */

.bill-table-card tfoot tr td {
    background: transparent !important;
    border: none !important;
}

#bill-step-review .bill-table-card .pb-wrap {
    max-height: min(50vh, calc(100vh - 16rem)) !important;
}

#bill-step-review .bill-table-card .pb-tbl {
    font-size: 0.8rem;
}

#bill-step-review .bill-table-card .profile {
    height: 32px !important;
    width: 32px !important;
}

#bill-step-review .bill-table-card .pb-nm {
    font-size: 0.85rem !important;
}

/* Check bill modal (ໃບບິນ) — AJAX content in #load-view-bd-checkBill */
#md-checkBill .modal-body {
    padding: 0;
}

#md-checkBill .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid #e2e8f0;
}

#md-checkBill .modal-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

#md-checkBill .pb-th.bg-primary th,
#load-view-bd-checkBill .pb-th.bg-primary th,
#bill-step-review .pb-th.bg-primary th,
#md-checkBill .pb-th > tr.bg-primary > th,
#load-view-bd-checkBill .pb-th > tr.bg-primary > th,
#bill-step-review .pb-th > tr.bg-primary > th {
    background-color: var(--primary, #007bff) !important;
    border-color: var(--primary, #007bff);
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.45rem 0.5rem;
    white-space: nowrap;
}

#md-checkBill .pb-wrap table.pb-tbl thead.pb-th th,
#load-view-bd-checkBill .pb-wrap table.pb-tbl thead.pb-th th,
#bill-step-review .pb-wrap table.pb-tbl thead.pb-th th {
    position: sticky;
    top: 0;
    z-index: 6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

#md-checkBill .pb-wrap,
#load-view-bd-checkBill .pb-wrap {
    margin: 0;
}

#md-checkBill .pb-tbl,
#load-view-bd-checkBill .pb-tbl {
    margin-bottom: 0;
}
