/* Buyer Workspace only. Keep the Supplier and Source Bundle Delivery layouts intact. */
html.buyer-freight-modal-open, .buyer-freight-modal-open body { overflow: hidden; }
#freight-backdrop { z-index: 1200; }
#freight-modal { z-index: 1201; top: 18px; bottom: 18px; height: auto; max-height: calc(100dvh - 36px); transform: translateX(-50%); grid-template-rows: auto auto minmax(0,1fr); overflow: clip; }
#freight-modal .freight-request-header, #freight-modal .freight-request-steps, #freight-modal .freight-request-footer { background: #fff; }
#freight-form { display: grid; min-width: 0; min-height: 0; height: auto; overflow: clip; grid-template-rows: minmax(0,1fr) auto; }
#freight-form [data-freight-form-scroll] { display: block; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-behavior: auto; }
#freight-form .freight-step-panel { min-width: 0; height: max-content; align-content: start; }
#freight-form .freight-step-panel > *, #freight-form fieldset { min-width: 0; max-width: 100%; }
#freight-form .table-wrap { overflow-x: auto; }
#freight-form .freight-standalone-context { display: grid; gap: 16px; grid-template-columns: repeat(2,minmax(0,1fr)); }
#freight-form .freight-standalone-context label { display: grid; align-content: start; gap: 6px; }
#freight-form input, #freight-form select, #freight-form textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
#freight-form .freight-compact-disclosure summary { white-space: normal; overflow-wrap: anywhere; }
#freight-form .freight-ocean-route { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafd; }
#freight-form .freight-ocean-route h3 { margin: 0 0 6px; }
#freight-form .freight-port-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
#freight-form .freight-port-grid label { display: grid; gap: 6px; min-width: 0; }
#freight-form .freight-port-grid input { width: 100%; box-sizing: border-box; }
#freight-form [data-port-confirmation] { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
#freight-form [data-port-confirmation] input { width: 18px; height: 18px; min-height: 0; }
#freight-form [data-port-validation] { color: #9e382a; margin: 8px 0 0; }
#freight-form [data-port-validation]:empty { display: none; }
#freight-form [data-freight-save-status] { flex: 1 0 100%; margin: 0; font-size: 13px; overflow-wrap: anywhere; }
#buyer-freight-requests .freight-board-header { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
#buyer-freight-requests .freight-table-wrap { overflow-x: auto; }
#buyer-freight-requests table { min-width: 950px; width: 100%; }
#buyer-freight-requests td { vertical-align: middle; overflow-wrap: anywhere; }
#buyer-freight-requests .status-pill, #buyer-freight-requests .table-action { white-space: nowrap; overflow-wrap: normal; }
.buyer-freight-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#buyer-freight-requests [data-buyer-freight-status] { padding: 0 20px; }
@media (max-width: 650px) {
 #freight-modal { top: 8px; bottom: 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
 #freight-modal .freight-request-header { min-height: 0; padding: 12px 16px; align-items: flex-start; }
 #freight-modal .freight-request-header h2 { font-size: 20px; }
 #freight-modal .freight-request-support { display: none; }
 #freight-modal .freight-request-steps { margin: 0 12px 8px; }
 #freight-modal .freight-request-steps span { padding: 6px 3px; font-size: 10px; }
 #freight-form [data-freight-form-scroll] { padding: 16px; }
 #freight-form .freight-request-footer { padding: 10px 12px; gap: 6px; }
 #freight-form .freight-request-footer button { flex: 1 1 auto; width: auto; min-height: 36px; padding: 8px 10px; font-size: 12px; }
 #freight-form .freight-port-grid { grid-template-columns: 1fr; }
 #freight-form .freight-standalone-context { grid-template-columns: minmax(0,1fr); }
 #freight-form .freight-summary-title { grid-template-columns: minmax(0,1fr); gap: 4px; }
 #freight-form .freight-summary-title strong { overflow-wrap: anywhere; }
}
