.rich-editor-root {
  position: relative;
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  background: #fafaf9;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select {
  min-height: 2rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.35rem 0.55rem;
  color: #44403c;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
}

.rich-editor-toolbar button:hover,
.rich-editor-toolbar select:hover {
  border-color: #a8a29e;
  background: #f5f5f4;
}

.rich-editor-toolbar button:focus-visible,
.rich-editor-toolbar select:focus-visible,
.rich-editor-content:focus-visible {
  outline: 2px solid #166534;
  outline-offset: 2px;
}

.rich-editor-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rich-editor-content {
  min-height: 7rem;
  max-height: 24rem;
  overflow-y: auto;
  overflow-wrap: anywhere;
  padding: 0.75rem 1rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  background: #fff;
  color: #292524;
  font: 400 0.875rem/1.65 'DM Sans', system-ui, sans-serif;
  white-space: pre-wrap;
}

.rich-editor-content[data-empty='true']::before {
  content: attr(data-placeholder);
  color: #a8a29e;
  pointer-events: none;
}

.rich-editor-content h2,
.rich-editor-content h3,
.rich-editor-content h4 {
  color: #292524;
  font-weight: 600;
  line-height: 1.35;
}

.rich-editor-content h2 {
  font-size: 1.25rem;
}

.rich-editor-content h3 {
  font-size: 1.1rem;
}

.rich-editor-content h4 {
  font-size: 1rem;
}

.rich-editor-content ul,
.rich-editor-content ol {
  padding-left: 1.5rem;
}

.rich-editor-content ul {
  list-style: disc;
}

.rich-editor-content ol {
  list-style: decimal;
}

.rich-editor-content blockquote {
  border-left: 3px solid #86a891;
  padding-left: 0.8rem;
  color: #57534e;
}

.rich-text-content {
  overflow-wrap: anywhere;
  line-height: 1.75;
}

.rich-text-content > * + * {
  margin-top: 0.75rem;
}

.rich-text-content p {
  margin-bottom: 0.6rem;
}

.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4 {
  color: #292524;
  font-weight: 600;
  line-height: 1.35;
}

.rich-text-content h2 {
  font-size: 1.25rem;
}

.rich-text-content h3 {
  font-size: 1.1rem;
}

.rich-text-content h4 {
  font-size: 1rem;
}

.rich-text-content ul,
.rich-text-content ol {
  padding-left: 1.5rem;
}

.rich-text-content ul {
  list-style: disc;
}

.rich-text-content ol {
  list-style: decimal;
}

.rich-text-content blockquote {
  border-left: 3px solid #86a891;
  padding-left: 0.8rem;
  color: #57534e;
}

.rich-text-content a {
  color: #166534;
  text-decoration: underline;
  text-underline-offset: 2px;
}
