.item-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin-top: 0.2rem;
}

.item-source-link {
  color: var(--navy-mid);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

/* Phone width: the page itself must not scroll sideways.
   Tables scroll inside their own box. The sticky footer cannot set a min-width. */
html,
body,
#root {
  max-width: 100%;
  overflow-x: clip;
}

.app,
.app-main,
.panel,
.col,
.quote-lines,
.print-overlay,
.print-sheet,
.print-table-wrap,
.mobile-sticky-bar {
  min-width: 0;
  max-width: 100%;
}

.quote-lines,
.print-table-wrap {
  overflow-x: auto;
}

.acceptance-terms,
.acceptance-terms-heading,
.acceptance-section,
.acceptance-section p,
.acceptance-section h4,
.acceptance-signature,
.acceptance-signature-block {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.mobile-sticky-bar {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.sticky-actions,
.app.touch-ui .sticky-actions {
  min-width: 0;
  flex: 1 1 auto;
  flex-shrink: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sticky-btn,
.app.touch-ui .sticky-btn {
  min-width: 0;
}

@media screen and (width <= 640px) {
  .print-table {
    min-width: 0;
    width: 100%;
  }
}

/* Quantity errors were flex children in a nowrap row, clipped by the
   quote table's horizontal scroller. Wrap them, and repeat the message
   in a toast that sits above the mobile sticky bar. */
.qty-input-wrap {
  flex-wrap: wrap;
}

.qty-input-error {
  flex: 1 0 100%;
  margin: 0.2rem 0 0;
  color: var(--danger, #b42318);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.cq-toast {
  position: fixed;
  left: 50%;
  bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  max-width: min(28rem, calc(100% - 1.5rem));
  transform: translateX(-50%);
  padding: 0.7rem 0.9rem;
  background: #3d1512;
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.35;
}

.cq-toast-ok {
  background: #143026;
}

.cq-toast[hidden] {
  display: none;
}
