/* ==========================================
   RICH TEXT EDITOR STYLES
   WYSIWYG Editor Components
   ========================================== */

.editor-container {
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  background: var(--bp-surface-elevated);
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bp-border);
  background: var(--bp-surface);
}

.editor-toolbar-group {
  display: flex;
  gap: 2px;
  padding-right: 8px;
  margin-right: 8px;
  border-right: 1px solid var(--bp-border);
}

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

.editor-btn {
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--bp-text);
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 32px;
}

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

.editor-btn.active {
  background: var(--bp-primary);
  color: white;
}

.editor-btn-upload {
  background: var(--bp-primary);
  color: white;
  padding: 6px 12px;
}

.editor-btn-upload:hover {
  filter: brightness(1.1);
}

.editor-content {
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  padding: 16px;
  color: var(--bp-text);
  line-height: 1.6;
}

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

.editor-content[contenteditable="true"] {
  cursor: text;
}

.editor-content h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.editor-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px 0;
}

.editor-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 20px 0 10px 0;
}

.editor-content p {
  margin: 0 0 12px 0;
}

.editor-content ul, .editor-content ol {
  margin: 0 0 12px 0;
  padding-left: 24px;
}

.editor-content li {
  margin-bottom: 4px;
}

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

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

.editor-content a {
  color: var(--bp-primary);
  text-decoration: underline;
}

.editor-content blockquote {
  border-left: 3px solid var(--bp-primary);
  margin: 16px 0;
  padding: 8px 16px;
  background: var(--bp-surface);
  font-style: italic;
}

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

.word-upload-input {
  display: none;
}

.editor-status {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--bp-text-muted);
  border-top: 1px solid var(--bp-border);
  background: var(--bp-surface);
}

/* Light Mode Overrides */
[data-theme="light"] .editor-container {
  border-color: var(--bp-border);
}

[data-theme="light"] .editor-toolbar {
  background: var(--bp-bg);
  border-color: var(--bp-border);
}

[data-theme="light"] .editor-content {
  background: var(--bp-surface);
}
