/* Payment-specific: order actions, receipt preview and AI audit table. */

.order-action-tooltip { position: fixed; inset: auto; z-index: 100; width: max-content; max-width: min(18rem, calc(100vw - 1rem)); margin: 0; padding: .45rem .65rem; border: 0; border-radius: .5rem; background: #0f172a; color: white; box-shadow: 0 8px 20px #0f172a33; font-size: .75rem; font-weight: 600; line-height: 1.35; text-align: center; white-space: normal; }
.order-action-tooltip.danger { background: #991b1b; }

/* Order actions (icon buttons) */
.order-actions { display: flex; flex-wrap: nowrap; gap: .25rem; }
.order-action-wrapper { display: inline-flex; }
.order-action { display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #4338ca; text-decoration: none !important; cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.order-action:hover { background: #eef2ff; }
.order-action:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.order-action:active { transform: scale(.94); }
.order-action svg { width: 1.15rem; height: 1.15rem; flex: none; }
.order-action.danger { color: #b91c1c; }
.order-action.danger:hover { background: #fef2f2; }
.order-action.disabled { color: #94a3b8; background: transparent; cursor: not-allowed; }
.order-action.disabled:hover { background: #f8fafc; }

/* Receipt AI audit table */
.audit-table th.audit-date { width: 9.5rem; }
.audit-table th.audit-cost { width: 8.5rem; }
.audit-cost-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.audit-checks { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.audit-check { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .5rem; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; font-size: .75rem; font-weight: 600; }
.audit-check svg, .audit-info svg { width: .9rem; height: .9rem; flex-shrink: 0; }
.audit-check.passed { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.audit-check.failed { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.audit-check.unknown { color: #64748b; }
.audit-note.failed { color: #b91c1c; }
.audit-note { margin-top: .5rem; color: #64748b; font-size: .75rem; }
.audit-info { display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; min-height: 1.75rem; border: 1px solid #e2e8f0; color: #4338ca; cursor: pointer; border-radius: .5rem; background: white; }
.audit-info:hover { background: #eef2ff; border-color: #c7d2fe; }
.audit-info:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.audit-tooltip { position: fixed; inset: auto; margin: 0; width: min(32rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1rem; border: 1px solid #334155; border-radius: .75rem; background: #0f172a; color: white; box-shadow: 0 8px 24px #0003; font: inherit; font-size: .8125rem; line-height: 1.6; overflow-wrap: anywhere; }
.audit-tooltip p + p { margin-top: .65rem; }
.audit-json-button { width: auto; padding-inline: .4rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .7rem; font-weight: 700; }
.audit-json { margin-top: .5rem; overflow-x: auto; white-space: pre; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .75rem; line-height: 1.5; }

.receipt-preview { display: grid; min-height: 14rem; max-height: 28rem; place-items: center; overflow: hidden; border: 1px solid #cbd5e1; border-radius: .75rem; background: #f8fafc; text-decoration: none !important; }
.receipt-preview img, .receipt-preview iframe { width: 100%; height: 28rem; object-fit: contain; border: 0; pointer-events: none; }
.receipt-preview.is-compact { min-height: 10rem; max-height: 14rem; }
.receipt-preview.is-compact img, .receipt-preview.is-compact iframe { height: 14rem; }


@media (max-width: 640px) {
  .order-actions { flex-wrap: wrap; }
  .receipt-preview, .receipt-preview img, .receipt-preview iframe { height: 18rem; min-height: 18rem; }
  .audit-table.ui-responsive td { grid-template-columns: 5.5rem minmax(0, 1fr); }
}
