/* ── Split Editor Viewport ── */
.editor-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 200px;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.panel-header {
  height: 36px;
  min-height: 36px;
  background-color: var(--bg-secondary);
  border-bottom: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.panel-header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.editor-surface {
  flex: 1;
  padding: var(--sp-4);
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
  border: none;
}

.editor-surface[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}

.editor-surface:focus {
  background-color: hsla(220, 18%, 9%, 1);
}

/* ── Draggable Divider ── */
.editor-divider {
  width: 5px;
  background-color: hsl(220, 14%, 18%);
  cursor: col-resize;
  transition: background-color 0.2s;
  z-index: 5;
  user-select: none;
}

.editor-divider:hover, .editor-divider.dragging {
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ── Panel Footers (Word Counts) ── */
.panel-footer {
  height: 28px;
  min-height: 28px;
  background-color: var(--bg-secondary);
  border-top: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ── Dropzone Hover Overlay ── */
.editor-panel.drag-over {
  outline: 2px dashed var(--accent-primary);
  outline-offset: -4px;
  background-color: hsla(152, 76%, 48%, 0.05);
}

/* ── Small Icon Button ── */
.btn-sm-icon {
  background: var(--bg-surface);
  border: var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sm-icon:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--accent-dim);
}
