.comment-cell { cursor: text; position: relative; }
.comment-cell:hover { background: #f8fafc !important; }
.inline-comment-editor { box-sizing: border-box; width: 100%; min-height: 86px; resize: vertical; border: 2px solid #2563eb; border-radius: 12px; outline: none; padding: 10px 12px; color: #172033; background: #ffffff; font: inherit; line-height: 1.35; white-space: pre-wrap; box-shadow: 0 8px 20px rgba(37, 99, 235, .16); }
.comment-cell[data-comment-save-state="saving"]::before,
.comment-cell[data-comment-save-state="saved"]::before { position: absolute; right: 8px; bottom: 6px; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 800; box-shadow: 0 4px 10px rgba(15, 23, 42, .12); }
.comment-cell[data-comment-save-state="saving"]::before { content: "сохраняю..."; color: #92400e; background: #fef3c7; }
.comment-cell[data-comment-save-state="saved"]::before { content: "сохранено"; color: #166534; background: #dcfce7; }

/* Keep construction comment column compact; full text is available on double-click. */
.matrix-table .comment-cell:not(.comment-cell-editing) {
  height: 38px;
  max-height: 38px;
  min-height: 38px;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  vertical-align: middle !important;
  cursor: zoom-in;
}
.matrix-table .comment-cell.comment-cell-editing {
  height: auto;
  max-height: none;
  white-space: normal !important;
  overflow: visible !important;
  vertical-align: top !important;
  cursor: text;
}
.matrix-table .comment-cell.comment-cell-editing .inline-comment-editor {
  max-height: min(70vh, 520px);
  overflow: auto;
}
