html,
body {
  width: 100%;
  height: 100%;
}
body {
  display: flex;
  margin: 0;
  background-color: #333;
  color: rgba(255, 255, 255, 0.8);
}

a {
  text-decoration: none;
  color: inherit;
}
button,
input,
select,
textarea {
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}
button:not(:disabled) {
  cursor: pointer;
}

.sans {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';
}
.mono {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.palette {
  width: 250px;
  flex: none;
  overflow: auto;
}
.palette-item {
  display: table;
  padding: 10px;
  border-radius: 5px;
  margin: 10px;
  background-color: #585858;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
  user-select: none;
  cursor: grab;
  touch-action: none;
  font-weight: bold;
  font-size: 14px;
}
@media (max-width: 600px) {
  body {
    flex-direction: column;
  }
  .palette {
    width: unset;
    white-space: nowrap;
    padding: 10px;
    padding-top: 30px;
  }
  .palette-item {
    display: inline-block;
  }
}

.node-area {
  flex: auto;
  position: relative;
  background-image: url('./grid.svg');
  background-size: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.connections-wrapper {
  position: absolute;
  z-index: 100;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  stroke: white;
  stroke-width: 3px;
  stroke-linecap: round;
  fill: none;
}
.connections {
  stroke-opacity: 0.7;
}

.node {
  position: absolute;
  border-radius: 5px;
  background-color: #585858;
  padding: 10px 20px;
  font-size: 0.875rem;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
  user-select: none;
  touch-action: none;
}
.node-error {
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.5);
}
.node-connections {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}
.node-connection-point {
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  width: 10px;
  height: 10px;
  margin: -5px;
  box-sizing: border-box;
}
.node-connection-point:hover {
  background-color: rgba(255, 255, 255, 0.8);
}
.node-connection-point-connecting {
  background-color: white;
}
.node-inputs {
  left: 0;
}
.node-outputs {
  right: 0;
}
.node-name {
  margin: 0;
  font-size: 1em;
}
.node-param-wrapper {
  margin: 0;
}
.node-param-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.node-param-value {
  background-color: #212121;
  text-align: right;
  margin: 5px;
  margin-right: 0;
}
.node-param-value-param,
.node-param-value-float,
.node-param-value-int {
  width: 7ch;
}

.drag-area {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  cursor: grabbing;
  touch-action: none;
}
.drag-area.dragging {
  display: block;
}
