/* ============================================================
   editor-toolbar.css — anchor the left toolbar (spacing + position)
   Load AFTER style.css
   ============================================================ */

.codex-editor,
.codex-editor__redactor,
.ce-block {
  position: relative;
  overflow: visible;
}

/* Box-model normalization so the toolbar rail and text column center identically */
.codex-editor__redactor .ce-block__content,
.codex-editor .ce-toolbar__content {
  box-sizing: border-box;
}

/* Reserve the left gutter so text never collides with the toolbar */
.codex-editor__redactor .ce-block__content{
  /* width comes from style.css; we only change the left padding here */
  padding-left: var(--content-inset-left);
}

/* Toolbar rail spans the editor; DO NOT override transform.
   Editor.js uses transform to vertically center on the active block. */
.codex-editor .ce-toolbar{
  position: absolute;
  left: 0 !important;
  right: 0 !important;
  z-index: 3;
}

/* Center the rail to the content column and provide a local anchor */
.codex-editor .ce-toolbar__content{
  max-width: var(--col-actual);
  margin: 0 auto;
  padding-left: var(--editor-sidepad);
  padding-right: var(--editor-sidepad);
  position: relative;
}

/* Place the actions/plus inside the reserved left gutter */
/* .codex-editor .ce-toolbar__actions,
.codex-editor .ce-toolbar__plus{
  position: absolute !important;
  left: var(--editor-sidepad) !important;
  right: auto !important;
  width: var(--toolbar-w);
} */

/* Force per-block action menu (⋮) into the left gutter as well */
.codex-editor .ce-block__actions{
  position: absolute !important;
  left: var(--editor-sidepad) !important;
  right: auto !important;
  width: var(--toolbar-w);
}

/* Keep inline toolbar inside the column on narrow screens */
.codex-editor .ce-inline-toolbar{ 
  max-width: var(--col-actual); 
}

/* Small-screen tweak */
@media (max-width:480px){
  :root{ --editor-sidepad:12px; }
}

/* ============================================================
   Optical adjustment (icons feel high relative to text)
   ============================================================ */
:root { --toolbar-v-nudge: 2px; }  /* adjust 1–3px to taste */
/* .codex-editor .ce-toolbar__actions{
  transform: translateY(var(--toolbar-v-nudge));
} */

/* Debug overlay (optional, comment out if not needed)
.codex-editor__redactor .ce-block::after{
  content:"";
  position:absolute; left:0; right:0; top:50%;
  height:0; border-top:1px dashed rgba(0,0,0,.25); pointer-events:none;
}
*/
