
.order-ready{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.order-ready[hidden]{display:none}.order-ready-actions{display:flex;flex-wrap:wrap;gap:8px}
#packagePresetRow .preset-btn{white-space:normal;text-align:left;max-width:100%;min-width:0}#packagePresetRow .preset-copy{display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere}#packagePresetRow small{font-size:11px;font-weight:400;color:#64748b}#packagePresetRow [aria-pressed="true"]{border-color:#2563eb;background:#edf4ff;color:#1d4ed8}
.address-card>.recent-recipients{margin:0 0 14px;padding:12px;min-width:0}.address-card .chip-row{display:flex;flex-wrap:wrap;gap:6px}.address-card .recipient-chip{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}.address-card .recent-recipients-head{flex-wrap:wrap;gap:4px}
@media(max-width:640px){.order-ready{align-items:stretch;flex-direction:column}.order-ready-actions .btn{flex:1}#packagePresetRow{gap:8px}#packagePresetRow .preset-btn{flex:1 1 135px}}

/* Short, non-blocking feedback on the existing order controls. */
#customer-order-page{--order-motion:cubic-bezier(.2,.7,.2,1)}
#customer-order-page :is(.preset-btn,.recipient-chip){transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease,transform 160ms var(--order-motion)}
#customer-order-page :is(.address-card,.recipient-card){transition:border-color 180ms ease,box-shadow 180ms ease}
#customer-order-page :is(.address-card,.recipient-card):focus-within{border-color:#b4c9ed;box-shadow:0 4px 20px #22478008}
#customer-order-page .control{transition:border-color 150ms ease,box-shadow 150ms ease,background-color 150ms ease}
#customer-order-page .control:focus{background-color:#fff;box-shadow:0 0 0 3px #2563eb16}
#customer-order-page :is(.preset-btn,.recipient-chip):focus-visible{outline:3px solid #91b5fa;outline-offset:3px}
#customer-order-page :is(.btn,.preset-btn,.recipient-chip):active:not(:disabled){transform:scale(.98)}
#customer-order-page :is(.btn,.preset-btn,.recipient-chip):disabled{transform:none;box-shadow:none}
#packagePresetRow [aria-pressed="true"]{box-shadow:0 2px 8px #2563eb12}
#customer-order-page .recipient-card{animation:order-reveal 220ms var(--order-motion)}
#customer-order-page [id^="recipient-"][id$="-dimensions"]:not([hidden]){animation:order-reveal 180ms var(--order-motion)}
.order-ready:not([hidden]){animation:order-reveal 220ms cubic-bezier(.2,.7,.2,1)}
#customer-order-page .order-submit-actions .btn-primary{box-shadow:0 4px 12px #2563eb20}
@media(hover:hover) and (pointer:fine){
 #customer-order-page :is(.preset-btn,.recipient-chip):hover{transform:translateY(-1px);border-color:#aec5ee;box-shadow:0 4px 12px #1832600c}
 #customer-order-page .btn-primary:hover:not(:disabled){box-shadow:0 6px 16px #2563eb28}
}
@media(hover:none){#customer-order-page .btn:hover{transform:none}}
@keyframes order-reveal{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){
 #customer-order-page *,#customer-order-page *::before,#customer-order-page *::after,.order-ready{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 #customer-order-page :is(.btn,.preset-btn,.recipient-chip):is(:hover,:active){transform:none!important}
}

.action-status{font-size:13px;line-height:1.5;padding:12px 16px;border-radius:12px;background:#edf4ff;color:#2856a0;overflow-wrap:anywhere}.action-status[hidden]{display:none}.action-status[data-state=error]{background:#fff3e4;color:#8b4c12}.action-status[data-state=success]{background:#eaf7ef;color:#24643c}
.btn[aria-busy=true]::before{content:"";width:14px;height:14px;flex:0 0 14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:action-spin .7s linear infinite}.btn[aria-busy=true]{cursor:progress}
.action-result-icon{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;margin-right:10px;background:#e6f6ec;color:#267145;font-size:20px;animation:action-done 230ms ease-out}.order-ready[data-result=partial] .action-result-icon{background:#fff1da;color:#8b4c12}
#draftStatus.is-saved{transition:color 180ms ease,background-color 180ms ease}
.history-row-select:checked{accent-color:#2563eb}.data-table tr{transition:background-color 160ms ease}.data-table tr.bulk-selected{background:#edf4ff}
@keyframes action-spin{to{transform:rotate(360deg)}}@keyframes action-done{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.btn[aria-busy=true]::before,.action-result-icon{animation:none!important}.data-table tr,#draftStatus.is-saved{transition:none!important}}

.saved-feedback{display:inline-flex;align-items:center;color:#267145;font-size:12px;margin:6px;animation:action-done 180ms ease-out}#orderForm .control.invalid:focus{border-color:#c84646;box-shadow:0 0 0 3px #c846461a}
@media(prefers-reduced-motion:reduce){.saved-feedback{animation:none}}

#demoToast[data-kind=success]::before{content:'✓';display:inline-block;margin-right:8px;color:#9aefb6}

#packagePresetRow .preset-item{display:flex;align-items:stretch;min-width:0;max-width:100%;gap:3px}#packagePresetRow .preset-item .preset-btn{flex:1;min-width:0}.preset-delete{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;min-height:44px;border:1px solid #e1e7ef;border-radius:12px;background:#fff;color:#8a6370;cursor:pointer}.preset-delete:hover{color:#b4233c;background:#fff1f3;border-color:#efc4cd}.preset-delete:focus-visible{outline:3px solid #91b5fa;outline-offset:2px}.preset-delete .icon{width:16px;height:16px}
@media(max-width:640px){#packagePresetRow .preset-item{flex:1 1 175px}}

/* History uses compact shipment cards on phones, preserving the same selection and actions. */
@media(max-width:760px){
 #customer-history-page .history-table-wrap{overflow:visible;border:0;background:transparent;min-width:0}
 #customer-history-page .history-table{display:block;min-width:0;width:100%;border-collapse:separate}
 #customer-history-page .history-table thead{display:block;margin-bottom:10px}
 #customer-history-page .history-table thead tr{display:block}
 #customer-history-page .history-table th{display:none}
 #customer-history-page .history-table th:first-child{display:flex;align-items:center;gap:10px;width:auto;border:0;background:transparent;padding:4px 0;font-size:12px;letter-spacing:0;text-transform:none}
 #customer-history-page .history-table th:first-child::after{content:'Select all orders'}
 #customer-history-page .history-table tbody{display:grid;gap:12px;width:100%}
 #customer-history-page .history-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 14px;padding:16px;background:#fff;border:1px solid #dce5f0;border-radius:16px;min-width:0}
 #customer-history-page .history-table tbody tr[hidden]{display:none!important}
 #customer-history-page .history-table tbody tr.bulk-selected{background:#f0f6ff;border-color:#91b5fa}
 #customer-history-page .history-table td{display:block;min-width:0!important;width:auto;padding:0;border:0;white-space:normal;overflow-wrap:anywhere}
 #customer-history-page .history-table td[data-label]::before{content:attr(data-label);display:block;margin-bottom:4px;font-size:10px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:#78869a}
 #customer-history-page .history-table td:first-child::before,#customer-history-page .history-table td:last-child::before{display:none}
 #customer-history-page .history-table td:first-child{display:flex;align-items:center;grid-column:1}
 #customer-history-page .history-table td:first-child::after{content:'Select order';font-size:12px;color:#65758a;margin-left:8px}
 #customer-history-page .history-table td:nth-child(2){grid-column:2;text-align:right}
 #customer-history-page .history-table td:nth-child(3){grid-column:1 / -1;font-size:14px;font-weight:650}
 #customer-history-page .history-table td:nth-child(7){grid-column:1 / -1;grid-row:5}
 #customer-history-page .history-table td:nth-child(8){grid-column:2;grid-row:4}
 #customer-history-page .history-table td:last-child{grid-column:1 / -1;border-top:1px solid #edf2f7;padding-top:12px}
 #customer-history-page .history-tracking-cell{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px}
 #customer-history-page .history-tracking{min-width:0;overflow-wrap:anywhere;word-break:break-word;font-size:12px;display:block;line-height:1.7}
 #customer-history-page .history-tracking>.icon{width:12px;height:12px;margin-left:5px;vertical-align:middle}
 #customer-history-page .copy-icon-btn{width:44px;height:44px;min-height:44px}
 #customer-history-page .history-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 #customer-history-page .history-actions .btn{min-width:0;min-height:40px;padding:6px 4px;font-size:11px;gap:4px;white-space:normal}
 #customer-history-page #historySelectAll,#customer-history-page .history-row-select{width:20px;height:20px;margin:0}
}

@media(max-width:760px){
 #customer-history-page .history-toolbar-right{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #customer-history-page .history-toolbar-right .control{width:100%;min-width:0}
 #customer-history-page .history-toolbar-right .btn{width:100%;min-width:0;padding:8px;white-space:normal;font-size:12px}
 #customer-history-page .history-tracking>.icon{display:none}
}
