@import url("document_tool_base.css");

/* Line-item editor scrolls horizontally on small screens */
.quot-page .items-table {
  min-width: 560px;
  table-layout: fixed;
}

.quot-page .items-table th:nth-child(5),
.quot-page .items-table td:nth-child(5) {
  width: 3.5rem;
  min-width: 3.5rem;
}

.quot-page .items-table th:last-child,
.quot-page .items-table td:last-child {
  width: 4.85rem;
  min-width: 4.85rem;
  max-width: 4.85rem;
}

/* Preview header: stack on narrow preview so long addresses do not overflow */
.quot-page .quot-preview-header {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.quot-page .preview-seller-block,
.quot-page .preview-doc-block,
.quot-page .preview-buyer-meta {
  min-width: 0;
  max-width: 100%;
}

.quot-page .preview-doc-block {
  padding-top: 8px;
  border-top: 1px solid var(--doc-line);
}

.quot-page .preview-seller-block .preview-meta,
.quot-page .preview-buyer-meta,
.quot-page .preview-pane .doc-preview .preview-meta {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.quot-page .doc-preview {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  box-sizing: border-box;
}

.quot-page .doc-preview > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.quot-page .preview-table {
  table-layout: fixed;
  width: 100%;
}

.quot-page .preview-table th,
.quot-page .preview-table td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.quot-page .amount-words {
  display: block;
  margin-top: 8px;
  padding: 8px;
  background: #f8fafb;
  border: 1px solid var(--doc-line);
  font-size: var(--tool-form-input-size, 0.6875rem) !important;
  line-height: 1.45 !important;
  color: var(--doc-muted);
  word-break: break-word;
}

.quot-page .amount-words strong {
  color: var(--doc-ink);
  font-size: inherit;
}

.quot-page .preview-pane {
  overflow: auto;
}

@media print {
  .quot-page .doc-preview {
    overflow: visible;
  }
}
