.receipt-table { min-width: 850px; }
.receipt-dialog { margin: auto; border: 1px solid var(--color-border); border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--color-bg-card); color: var(--color-text-primary); }
.receipt-dialog::backdrop { background: #0008; }
.receipt-dialog-wide { width: min(760px, calc(100vw - 28px)); }
.receipt-dialog .cp-modal-header, .receipt-dialog .cp-modal-footer { padding: 16px 20px; }
.receipt-dialog .cp-modal-body { padding: 20px; }
.receipt-fields { display: grid; gap: 16px; }
.receipt-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.receipt-columns input { width: 100%; min-width: 0; box-sizing: border-box; }
.receipt-fields select { padding: 10px; background: var(--color-bg-input); color: inherit; border: 1px solid var(--color-border); border-radius: 6px; }
.receipt-required { color: #dc2626; }
.receipt-order-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.receipt-order-row > div { min-width: 0; overflow-wrap: anywhere; }
.receipt-order-row button { flex-shrink: 0; }
.receipt-order-row small { display: block; color: var(--color-text-secondary); }
#receiptNotice[hidden], #pgState[hidden] { display: none; }
@media (max-width: 480px) { .receipt-columns { grid-template-columns: 1fr; } .cp-tab { padding: 12px 10px; } }

.receipt-dialog form, .receipt-fields, .receipt-fields .cp-field { min-width: 0; }
.receipt-fields input, .receipt-fields select { width: 100%; min-width: 0; box-sizing: border-box; }

/* Long merchant-entered names must not widen dialogs or squeeze numeric columns. */
.receipt-dialog .cp-modal-body { overflow-wrap: anywhere; }
.receipt-table td { white-space: nowrap; }
.receipt-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; min-width: 160px; max-width: 280px; }
.receipt-dialog a, .receipt-table a { color: #1d4ed8; }
[data-theme="dark"] .receipt-dialog a, [data-theme="dark"] .receipt-table a { color: #93c5fd; }
