#editor .order-form-section-documents { min-width: 0; max-width: 100%; scroll-margin-top: 80px; }
#editor .order-form-section-documents > summary > div { min-width: 0; }
#editor .order-document-editor { gap: 16px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
#editor .order-document-fields {
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: start;
}
#editor .order-document-description { grid-column: 1 / -1; }
#editor .order-document-fields .field { min-width: 0; gap: 6px; }
#editor .order-document-fields input,
#editor .order-document-fields select { min-height: 44px; min-width: 0; width: 100%; box-sizing: border-box; }
#editor #order-document-description-requirement { color: var(--muted); font-weight: 400; margin-left: 6px; }
#editor .order-document-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: #f4f6f7;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
}
#editor #order-document-file[hidden],
#editor #order-document-warning[hidden] { display: none !important; }
#editor .order-document-file-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
#editor .order-document-file-info > svg { width: 24px; height: 24px; flex: 0 0 24px; color: #536771; }
#editor .order-document-file-info > div { display: grid; gap: 4px; min-width: 0; }
#editor .order-document-file-info strong { font-size: 14px; overflow-wrap: anywhere; }
#editor .order-document-file-info small { color: var(--muted); font-size: 12px; }
#editor .order-document-file-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
#editor .order-document-file-actions button { min-height: 40px; }
#editor .order-document-file-actions .icon { width: 40px; height: 40px; padding: 10px; }
#editor .order-document-editor button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
#editor .order-document-editor button svg { width: 16px; height: 16px; flex-shrink: 0; }
#editor .order-document-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#editor .order-document-upload-actions > button { min-height: 44px; }
#editor .order-document-origin { display: grid; gap: 5px; min-width: 0; }
#editor .order-document-origin label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
#editor .order-document-origin input {
  appearance: auto; width: 18px; height: 18px; min-height: 18px;
  margin: 0; padding: 0; flex: 0 0 18px; accent-color: #c90035;
}
#editor #order-document-visibility { color: #247157; font-size: 12px; }
#editor #order-document-visibility.is-private { color: var(--muted); }
#editor .order-document-result { min-height: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#editor .order-document-result:empty { display: none; }
#editor .order-document-result[data-tone="pending"],
#editor .order-document-pending { color: #8a6111; }
#editor .order-document-result[data-tone="success"],
#editor .order-document-saved { color: #247157; }
#editor .order-document-result[data-tone="error"] { color: #b52d3b; }
#editor .order-document-warning { border-left: 3px solid #c28b22; background: #fff7e8; padding: 14px; }
#editor .order-document-warning > strong { display: flex; align-items: center; gap: 8px; font-size: 14px; }
#editor .order-document-warning > strong svg { width: 18px; height: 18px; flex-shrink: 0; }
#editor .order-document-warning p { margin: 8px 0 12px; font-size: 13px; }
#editor .order-document-warning > div { display: flex; flex-wrap: wrap; gap: 8px; }
#editor .order-document-warning button { min-height: 40px; white-space: normal; }
#editor .order-documents-list-heading {
  display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line);
  padding-top: 18px; margin: 0; font-size: 14px;
}
#editor #order-document-list-count { padding: 2px 6px; background: #edf1f2; border-radius: 4px; font-size: 12px; }
#editor .order-editor-document-row { min-width: 0; }
#editor .order-editor-document-row strong { font-size: 14px; }
#editor .order-document-saved,
#editor .order-document-pending { display: flex; align-items: center; gap: 5px; font-size: 12px; overflow-wrap: anywhere; }
#editor .order-document-saved svg,
#editor .order-document-pending svg { width: 14px; height: 14px; flex-shrink: 0; }
@media (max-width: 640px) {
  #editor .order-form-section-documents { scroll-margin-top: 170px; }
  #editor .order-form-section-documents > summary { flex-wrap: wrap; gap: 10px; }
  #editor .order-form-section-documents > summary > div:not(.order-section-heading-visibility) { flex: 1; }
  #editor .order-form-section-documents > summary h3 { flex-wrap: wrap; font-size: 16px; }
  #editor .order-form-section-documents .order-section-heading-visibility { flex-basis: 100%; padding-left: 44px; box-sizing: border-box; }
  #editor .order-document-fields { grid-template-columns: minmax(0, 1fr); }
  #editor .order-document-file-row { flex-direction: column; align-items: stretch; }
  #editor .order-document-file-actions > button:first-child { flex: 1; min-width: 0; white-space: normal; }
  #editor .order-document-upload-actions { flex-direction: column; align-items: stretch; }
  #editor .order-document-upload-actions > button { width: 100%; white-space: normal; }
  #editor .order-document-warning > div { flex-direction: column; align-items: stretch; }
  #editor .order-editor-document-row { grid-template-columns: minmax(0, 1fr); }
  #editor .order-editor-document-row .card-actions { justify-content: flex-start; flex-wrap: wrap; }
}
