/*
 * Hanji Editor Styles
 * Ghost-style typography for the post/page editor
 * Overrides Lexxy defaults via CSS specificity (Lexxy uses :where() = 0 specificity)
 */

/* Hanji Editor - Remove Lexxy border/background in editor context */
.editor-body lexxy-editor {
  border: none;
  background: transparent;
}

.editor-body .lexxy-editor__content {
  font-size: 1.25rem;
  line-height: 1.8;
  padding: 0;
}

.editor-body .lexxy-editor__content p {
  font-size: 1.25rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.editor-body .lexxy-editor__content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.editor-body .lexxy-editor__content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.editor-body .lexxy-editor__content blockquote {
  font-size: 1.25rem;
  font-style: italic;
  border-left: 3px solid oklch(var(--bc) / 0.2);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.editor-body .lexxy-editor__content ul,
.editor-body .lexxy-editor__content ol {
  font-size: 1.25rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.editor-body .lexxy-editor__content li {
  margin-bottom: 0.5rem;
}

/*
 * Ghost-style Editor Layout
 */


.editor-divider {
  width: 100%;
  height: 1px;
  background: oklch(var(--bc) / 0.1);
  margin-bottom: 2rem;
}

/* Word count indicator */
.editor-word-count {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 0.75rem;
  color: oklch(var(--bc) / 0.4);
  background: oklch(var(--b1));
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid oklch(var(--bc) / 0.1);
  z-index: 20;
}

/*
 * 브런치-style Sidebar Toolbar
 * Persistent vertical toolbar on the right side of content
 */

.sidebar-toolbar {
  position: absolute;
  right: -48px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 40;
}

.sidebar-toolbar--header {
  top: 0;
}

.sidebar-toolbar--body {
  top: 0;
}

.sidebar-toolbar__btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: oklch(var(--bc) / 0.35);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
  padding: 0;
}

.sidebar-toolbar__btn:hover:not(:disabled) {
  color: oklch(var(--bc) / 0.7);
  background: oklch(var(--bc) / 0.05);
}

.sidebar-toolbar__btn:active:not(:disabled) {
  color: oklch(var(--bc) / 0.9);
}

.sidebar-toolbar__btn--disabled,
.sidebar-toolbar__btn:disabled {
  color: oklch(var(--bc) / 0.15);
  cursor: not-allowed;
}

.sidebar-toolbar__btn svg {
  width: 18px;
  height: 18px;
}

