/* Keep factory, quantities and the first cargo line on the same baseline. */
.factory-cargo-preview-row > td {
  vertical-align: top !important;
  line-height: 20px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
.factory-cargo-preview-cell { white-space: normal !important; overflow-wrap: anywhere; }
.factory-cargo-preview-layout { display: flex; gap: 12px; align-items: flex-start; min-width: 0; max-width: 100%; }
.factory-cargo-preview-metrics { flex: 0 0 auto; white-space: nowrap; line-height: 20px; }
.factory-cargo-preview-description { min-width: 0; flex: 1; display: flex; gap: 8px; align-items: flex-end; }
.factory-cargo-preview-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 20px;
  max-height: 40px;
  flex: 1;
  min-width: 0;
  color: #26394c;
  font-weight: 700;
}
button.factory-cargo-preview-more {
  flex: 0 0 auto;
  border: 0;
  background: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  height: auto;
  min-width: 0;
  color: #315d7d;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}
button.factory-cargo-preview-more[hidden] { display: none !important; }
button.factory-cargo-preview-more:hover { text-decoration: underline; }
.factory-cargo-preview-layer { z-index: 205; }
.factory-cargo-preview-layer .factory-cargo-preview-dialog { width: min(780px, calc(100vw - 52px)); max-height: calc(100vh - 64px); font-family: inherit; }
.factory-cargo-preview-subtitle { display: block; font-size: 12px; color: #6b7b8c; font-weight: 600; margin-top: 5px; }
.factory-cargo-preview-modal-body { padding: 20px 22px; overflow: auto; min-height: 0; max-height: 55vh; }
.factory-cargo-preview-full-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; font-size: 14px; color: #26394c; font-weight: 600; user-select: text; }
.factory-cargo-preview-layer .action-modal-body { display: block; }
.factory-cargo-limit { display: block; text-align: right; color: #6b7b8c; font-size: 11px; font-weight: 400; }
.factory-cargo-limit.is-over-limit { color: #b23d3d; }
@media (max-width: 760px) {
  .factory-cargo-preview-layout { flex-direction: column; gap: 3px; }
  .factory-cargo-preview-description { width: 100%; }
  .factory-cargo-preview-metrics { display: flex; flex-wrap: wrap; gap: 2px 4px; max-width: 100%; white-space: normal; }
  .factory-cargo-preview-modal-body { padding: 16px; }
}
