.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.editor-toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border-right: 1px solid var(--border-color);
}

.editor-toolbar-group:last-child {
  border-right: none;
}

.editor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: var(--text-primary);
  background-color: transparent;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.editor-btn:hover {
  background-color: var(--border-color);
}

.editor-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.editor-btn.active {
  background-color: var(--accent);
  color: var(--bg-primary);
}

.editor-btn svg {
  width: 18px;
  height: 18px;
}

.editor-btn.select-trigger {
  width: auto;
  padding: 0 12px 0 8px;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.editor-btn.select-trigger svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.editor-content {
  min-height: 400px;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background-color: var(--bg-primary);
  outline: none;
  line-height: 1.7;
}

.editor-content:focus {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.editor-content .ProseMirror {
  outline: none;
}

.editor-content .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--text-muted);
  pointer-events: none;
  height: 0;
}

.editor-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  line-height: 1.3;
}

.editor-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
  line-height: 1.4;
}

.editor-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
  line-height: 1.4;
}

.editor-content p {
  margin-bottom: 1em;
}

.editor-content ul, .editor-content ol {
  padding-left: 1.5em;
  margin: 1em 0;
}

.editor-content li {
  margin-bottom: 0.5em;
}

.editor-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1em;
  margin: 1em 0;
  color: var(--text-secondary);
  font-style: italic;
}

.editor-content code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.9em;
  background-color: var(--bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

.editor-content pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1em;
  overflow-x: auto;
  margin: 1em 0;
}

.editor-content pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 0.875rem;
  line-height: 1.6;
}

.editor-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2em 0;
}

.editor-content strong {
  font-weight: 600;
}

.editor-content em {
  font-style: italic;
}

.editor-content u {
  text-decoration: underline;
}

.editor-content del {
  text-decoration: line-through;
}

.editor-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.editor-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1em 0;
}

.editor-placeholder {
  color: var(--text-muted);
  pointer-events: none;
}

@media (max-width: 768px) {
  .editor-toolbar {
    gap: 2px;
    padding: 6px;
  }
  
  .editor-toolbar-group {
    padding: 0 4px;
  }
  
  .editor-btn {
    width: 32px;
    height: 32px;
  }
  
  .editor-btn.select-trigger {
    padding: 0 8px 0 6px;
    font-size: 0.75rem;
  }
  
  .editor-content {
    padding: 16px;
    min-height: 300px;
  }
}