/* Project styles layered on top of Bootstrap 5.3. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* ── Editor ─────────────────────────────────────────────────────────────── */

.doc-title {
  border: 1px solid transparent;
  background: transparent;
  padding-left: 0;
}

.doc-title:hover:not(:disabled) {
  border-color: var(--bs-border-color);
  background: var(--bs-body-bg);
}

.doc-title:disabled {
  color: var(--bs-body-color);
  opacity: 1;
}

/* Quill fills the page rather than a fixed box, so long docs scroll the window
   instead of a nested scroller. */
#editor {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-top: 0;
  border-radius: 0 0 .375rem .375rem;
  min-height: 60vh;
}

#editor .ql-editor {
  min-height: 60vh;
  font-size: 1.05rem;
  line-height: 1.7;
}

.ql-toolbar.ql-snow {
  border-radius: .375rem .375rem 0 0;
  background: var(--bs-tertiary-bg);
}

/* Read-only docs have no toolbar; square off the top of the canvas. */
#editor.ql-container.ql-snow:first-child {
  border-top: 1px solid var(--bs-border-color);
  border-radius: .375rem;
}

/* ── Presence ───────────────────────────────────────────────────────────── */

.presence-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  line-height: 1;
  padding: .3rem .6rem;
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  white-space: nowrap;
}

.presence-chip::before {
  content: '';
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--chip-color, #888);
}

.min-w-0 {
  min-width: 0;
}
