/* ─── Text Editor (Word-like) ─── */
.text-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--color-bg);
}

.text-editor__page {
  max-width: 816px; /* A4 width approx */
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.text-editor__page .ql-toolbar {
  border: 1px solid var(--color-border) !important;
  border-radius: 8px 8px 0 0 !important;
  background: var(--color-surface) !important;
}

.text-editor__page .ql-container {
  border: 1px solid var(--color-border) !important;
  border-top: none !important;
  border-radius: 0 0 8px 8px !important;
  flex: 1;
  min-height: 60vh;
  font-size: 15px !important;
  line-height: 1.7 !important;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.text-editor__page .ql-editor {
  padding: 32px 40px !important;
  min-height: 500px;
}

.text-editor__page .ql-editor h1 {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
}

.text-editor__page .ql-editor h2 {
  font-size: 22px !important;
  font-weight: 600 !important;
  margin-bottom: 10px !important;
}

.text-editor__page .ql-editor h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

.text-editor__page .ql-editor p {
  margin-bottom: 8px !important;
}

.text-editor__save-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-tertiary);
  opacity: 0;
  transition: opacity 0.3s;
}

.text-editor__save-indicator--visible {
  opacity: 1;
}
