/* Review — project styles.
   Bootstrap 5 supplies layout and components; this file only covers what
   Bootstrap has no primitive for. */

/* Rendered Markdown. Constrains heading sizes so a document body does not
   compete with page chrome, and keeps long words from overflowing cards. */
.document-body {
  overflow-wrap: anywhere;
}

.document-body h1 { font-size: 1.75rem; }
.document-body h2 { font-size: 1.375rem; margin-top: 1.5rem; }
.document-body h3 { font-size: 1.125rem; margin-top: 1.25rem; }

.document-body pre {
  padding: 0.75rem;
  background: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
  overflow-x: auto;
}

.document-body blockquote {
  padding-left: 1rem;
  border-left: 3px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
}

.document-body table {
  width: 100%;
  margin-bottom: 1rem;
}

.document-body th,
.document-body td {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--bs-border-color);
}

/* Autosave indicator in the editor. Reserves its own line so the layout does
   not shift as the text changes between saved / saving / conflict. */
.save-indicator {
  min-height: 1.5rem;
}

/* Unified diff on the changes view. Added and removed lines are distinguished
   by a left bar and a faint tint rather than by colour alone, so the
   distinction survives for readers who cannot separate red from green. */
.diff {
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.diff span {
  display: block;
  padding-left: 0.5rem;
  border-left: 3px solid transparent;
}

.diff-added {
  border-left-color: var(--bs-success-border-subtle);
  background: var(--bs-success-bg-subtle);
}

.diff-removed {
  border-left-color: var(--bs-danger-border-subtle);
  background: var(--bs-danger-bg-subtle);
}

.diff-hunk,
.diff-meta {
  color: var(--bs-secondary-color);
}

/* Line-addressable view used when commenting on a specific line. */
.review-lines code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
