.resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  cursor: col-resize;
  user-select: none;
}

.resizer:hover,
.resizing {
  border-right: 1px dotted blue;
}


/************************ AutoFlux css classes ************************/
#canvas-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;

  /* Visible light-blue grid */
  background-image: linear-gradient(rgba(59, 130, 246, 0.15) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(59, 130, 246, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  
  .node {
    width: 150px;
    background: #1e293b;
    color: white;
    border-radius: 6px;
    position: absolute;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 12px;
  }

  .node-header {
    display: flex;
    justify-content: space-between;
    padding: 6px;
    background: #334155;
    cursor: grab;
  }

  .node-body {
    padding: 8px;
  }

  .delete-btn {
    background: none;
    border: none;
    color: red;
    cursor: pointer;
  }

  #app {
    display: flex;
    height: 100vh;
  }

  .hidden {
    display: none;
  }

  /* node position — needed so + button and hover actions can position against it */
  .workflow-node {
    position: absolute;
    width: 160px;
    background: #1f2937;
    color: white;
    border-radius: 8px;
    cursor: grab;
    user-select: none;
  }

  .node-hover-actions {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 6px;
    background: #1e293b;
    border-radius: 6px;
    padding: 4px 6px;
    padding-bottom: 10px;
    z-index: 20;
  }

  .workflow-node:hover .node-hover-actions {
    display: flex;
    /* show on hover */
  }
  .workflow-edge {
    fill: none;
    stroke: #60a5fa;
    stroke-width: 2;
    stroke-linecap: round;
    marker-end: url(#arrowhead);
    stroke-dasharray: 6 3;
  }
  .workflow-arrowhead { fill: #60a5fa; }

   /* + button — sits on the right border, vertically centered */
  .node-add-btn {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
  }
  .node-add-btn:hover {
    background: #2563eb;
  }
  .node-settings-btn,
  .node-delete-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
  }
  .node-settings-btn:hover {
    background: #6366f1;
  }
  .node-execute-btn:hover {
    background: #22c55e;
  }
  .node-delete-btn:hover {
    background: #ef4444;
  }

  /* node header */
  .node-header {
    padding: 8px 10px;
    background: #334155;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
    font-weight: 600;
  }

  /* node body */
  .node-body {
    padding: 8px 10px;
    font-size: 11px;
    color: #94a3b8;
    min-height: 20px;
  }

  #canvas-wrapper {
    position: relative;
  }
  
  #viewport {
    transform-origin: 0 0;
  }

  #edge-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
  }

  #node-layer {
    position: absolute;
    z-index: 2;
  }



  .workflow-node.selected {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  }

  /* ── Zoom Toolbar ─────────────────────────── */
  #zoom-toolbar {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    pointer-events: none;
  }

  /* minimap box */
  #minimap-box {
    position: relative;
    width: 160px;
    height: 90px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
  }

  #minimap-canvas {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* blue rectangle showing visible area */
  #minimap-viewport-indicator {
    position: absolute;
    border: 1.5px solid #3b82f6;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 2px;
    pointer-events: none;
    top: 0;
    left: 0;
  }

  /* zoom % label */
  #zoom-label {
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    min-width: 52px;
    text-align: center;
  }

 
  /*---------------------------  viz icons icons blow 50% (start) -- vizFactory.js */

  /* icon — hidden by default */
  .node-icon {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    background: #1e3a5f;
    border-radius: 8px;
  }

  /* compact mode — below 50% zoom */
  .node-compact {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px;
    overflow: hidden;
  }

  /* in compact mode — hide everything except icon */
  .node-compact .node-header,
  .node-compact .node-body,
  .node-compact .node-add-btn,
  .node-compact .node-hover-actions {
    display: none !important;
  }

  /* in compact mode — show icon */
  .node-compact .node-icon {
    display: flex;
  }

  /*--------  viz icons icons blow 50% (end) */
  .node-drop-target {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
  }



  /* ── Node drag connector (the line+arrow when dragging from + button) ─────────────────────────── */

  /* replace your existing .node-drag-connector block */
  .node-drag-connector {
    position: absolute;
    right: -28px;
    /* sits just after the + button */
    top: 50%;
    transform: translateY(14px);
    /* pushes it just below the + button */
    display: flex;
    flex-direction: row;
    /* horizontal: line then arrowhead */
    align-items: center;
    gap: 0;
    z-index: 9;
    opacity: 0.6;
    transition: opacity .15s;
  }

  .node-drag-connector:hover {
    opacity: 1;
  }

  .node-drag-connector .drag-line {
    width: 18px;
    height: 2px;
    /* horizontal line */
    background: #60a5fa;
    border-radius: 1px;
  }

  .node-drag-connector .drag-arrow {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid #60a5fa;
    /* points RIGHT */
    cursor: grab;
    transition: border-left-color .15s;
  }

  .node-drag-connector .drag-arrow:hover {
    border-left-color: #93c5fd;
    cursor: grab;
  }

  .node-drag-connector .drag-arrow:active {
    cursor: grabbing;
  }

  .node-compact .node-drag-connector {
    display: none !important;
  }

  .node-drop-target {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
  }
}