/* Chromeless tier (see nodeGraphChromelessModuleLayouts): same treatment as
   .dsp-node.led-layout -- the article is a plain sized box, no header row,
   no IO-section row, the body fills it completely. */
.dsp-node.step-grid-layout {
  display: block;
  width: calc((var(--node-grid-width) * var(--node-grid-width-units, 1)) - (var(--node-module-grid-inset) * 2));
  min-width: calc((var(--node-grid-width) * var(--node-grid-width-units, 1)) - (var(--node-module-grid-inset) * 2));
  height: calc(
    (var(--node-grid-height) * var(--node-grid-height-units, 1))
    - var(--node-module-grid-inset-y-total)
  );
  min-height: calc(
    (var(--node-grid-height) * var(--node-grid-height-units, 1))
    - var(--node-module-grid-inset-y-total)
  );
  border-radius: 3px;
  background: rgba(2, 4, 7, 0.9);
  /* No outline-color override here -- see the matching comment on
     .dsp-node.led-layout for why: it would win the cascade over
     .dsp-node.selected and silently kill the selection highlight. */
  box-shadow: none;
}

.node-step-grid-body {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 calc(var(--node-port-diameter) * 1.4);
}

.node-step-grid-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: calc(var(--node-grid-size) * 0.06);
  width: 100%;
}

.node-step-grid-square {
  box-sizing: border-box;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(127, 199, 217, 0.3);
  border-radius: 3px;
  background: rgba(9, 13, 16, 0.82);
  cursor: var(--node-dot-cursor);
  padding: 0;
}

.node-step-grid-square:hover,
.node-step-grid-square:focus-visible {
  border-color: rgba(127, 199, 217, 0.6);
}

.node-step-grid-square.on {
  background: rgba(127, 199, 217, 0.75);
  border-color: rgba(127, 199, 217, 0.95);
}

.node-step-grid-square.node-step-grid-add,
.node-step-grid-square.node-step-grid-remove {
  position: relative;
  border-style: dashed;
  background: transparent;
  font: 750 0.85em/1 var(--mono);
  cursor: var(--node-dot-cursor);
}

.node-step-grid-square.node-step-grid-add {
  border-color: rgba(127, 199, 217, 0.25);
  color: rgba(127, 199, 217, 0.55);
}

.node-step-grid-square.node-step-grid-add:hover,
.node-step-grid-square.node-step-grid-add:focus-visible {
  border-color: rgba(127, 199, 217, 0.7);
  color: rgba(127, 199, 217, 0.9);
  background: rgba(127, 199, 217, 0.08);
}

.node-step-grid-square.node-step-grid-remove {
  border-color: rgba(217, 96, 96, 0.25);
  color: rgba(217, 96, 96, 0.55);
}

.node-step-grid-square.node-step-grid-remove:hover,
.node-step-grid-square.node-step-grid-remove:focus-visible {
  border-color: rgba(217, 96, 96, 0.7);
  color: rgba(217, 96, 96, 0.9);
  background: rgba(217, 96, 96, 0.08);
}

.node-step-grid-square.node-step-grid-add:disabled,
.node-step-grid-square.node-step-grid-remove:disabled {
  border-style: solid;
  border-color: rgba(127, 199, 217, 0.1);
  color: rgba(127, 199, 217, 0.18);
  background: transparent;
  cursor: default;
}

.node-step-grid-ports {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--node-port-diameter) * 0.6);
  transform: translateY(-50%);
}

.node-step-grid-ports-input {
  left: calc(var(--node-port-diameter) * -0.5);
}

.node-step-grid-ports-output {
  left: auto;
  right: calc(var(--node-port-diameter) * -0.5);
}
