/* The held sale reads as a single receipt, with the next action always visible. */
#modal[open]:has(.held-cart-workspace) { display: flex; flex-direction: column; width: min(570px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; background: var(--surface); color: var(--text); }
#modal:has(.held-cart-workspace) > .modal-head { flex: 0 0 auto; min-height: 54px; padding: 12px 24px; }
#modal:has(.held-cart-workspace) > .modal-head h2 { font: 500 27px/1.15 "Barlow Condensed", "Arial Narrow", sans-serif; }
#modal:has(.held-cart-workspace) > .modal-body { display: flex; min-width: 0; min-height: 0; padding: 0; overflow: hidden; }
.held-cart-workspace { display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 0; font: 400 13px/1.4 "IBM Plex Sans", "Segoe UI", sans-serif; color: var(--text); }
.held-cart-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 0 24px 22px; }
.held-cart-customer { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 22px 0 19px; }
.held-cart-customer > div { min-width: 0; }
.held-cart-customer span, .held-cart-current > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.held-cart-customer strong { display: block; font-size: 18px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.held-cart-customer time { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.held-cart-items { border-top: 1px solid var(--border); }
.held-cart-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.held-cart-item > div { min-width: 0; }
.held-cart-item strong { display: block; font-weight: 500; font-size: 13px; overflow-wrap: anywhere; }
.held-cart-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.held-cart-item > span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.held-cart-item .held-cart-quantity { color: var(--text); font-size: 15px; }
.held-cart-item .held-cart-quantity small { display: inline; padding-left: 7px; font-size: 12px; }
.held-cart-subtotal { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 18px; }
.held-cart-subtotal > span { color: var(--muted); font-size: 12px; }
.held-cart-subtotal > strong { font: 500 33px/1.1 "Barlow Condensed", "Arial Narrow", sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.held-cart-discount { display: flex; justify-content: space-between; gap: 20px; margin-top: 9px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.held-cart-current { margin-top: 24px; padding: 13px 15px; border-left: 2px solid var(--accent-bright); background: var(--soft); }
.held-cart-current > strong { display: block; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.held-cart-footer { display: flex; flex: 0 0 auto; justify-content: space-between; gap: 15px; padding: 15px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.held-cart-footer button { min-height: 39px; padding: 9px 15px; border: 1px solid var(--border); border-radius: 3px; background: transparent; color: var(--text); box-shadow: none; font: 400 12px/1.35 "IBM Plex Sans", "Segoe UI", sans-serif; }
.held-cart-footer button:hover:not(:disabled) { background: var(--surface-hover); }
.held-cart-footer button.primary { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
.held-cart-footer button.primary:hover:not(:disabled) { filter: brightness(1.12); background: var(--accent); }
.held-cart-footer button:disabled { opacity: .4; cursor: default; }
.held-cart-workspace [data-held-cart-error] { flex: 0 0 auto; margin: 0; padding: 12px 24px; color: var(--red, #ee7b81); background: var(--soft); border-top: 1px solid var(--border); font-size: 12px; overflow-wrap: anywhere; }
.held-cart-workspace [data-held-cart-error][hidden] { display: none; }
.held-cart-loading, .held-cart-empty { padding: 24px 0 10px; margin: 0; color: var(--muted); }
.held-cart-recovery-title { padding: 18px 0 0; margin: 0; color: var(--muted); }
.held-cart-recovery-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 17px; border-top: 1px solid var(--border); background: var(--soft); font-size: 11px; }
.held-cart-recovery-note button { flex-shrink: 0; border: 0; padding: 3px 0; background: transparent; color: var(--accent-bright); font-size: 11px; box-shadow: none; }
.sale-tools .held-cart-count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px; border-radius: 2px; background: var(--soft); color: var(--accent-bright); font-size: 10px; font-variant-numeric: tabular-nums; }
.held-cart-workspace button:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
@media (max-height: 680px) { .held-cart-customer { padding-block: 15px; } .held-cart-item { padding-block: 12px; } .held-cart-content { padding-bottom: 16px; } .held-cart-footer { padding-block: 12px; } }
@media (max-width: 600px) { #modal[open]:has(.held-cart-workspace) { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); } .held-cart-content, .held-cart-footer { padding-inline: 18px; } .held-cart-customer { flex-wrap: wrap; gap: 8px; } .held-cart-item { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; } .held-cart-footer { gap: 8px; } }
