* {
  user-select: none;
  box-sizing: border-box;
}

.button.add-module {
  background: gray;
  text-transform: uppercase;
}

#canvas {
  top: 0;
  left: 0;
  position: absolute;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  background-image: radial-gradient(#9b9b9b 1px, transparent 0);
  background-size: 20px 20px;
  overscroll-behavior-y: none;
}

#container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  height: 100%;
}

#controls {
  display: flex;
}

.module {
  margin: 20px 0 0 20px;
  height: max-content;
  width: max-content;
  font-family: 'Roboto Medium';
  border-radius: 2px;
  background: #FAFAFA;
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.37);
}

.module-header {
  padding: 1em 0;
  background: gray;
  color: white;
  cursor: move;
  text-align: center;
  font-weight: bold;
}

.module-body {
  padding: 12px;
  max-width: 108px;
}

.module-io {
  margin-top: 4px;
}

hr {
  margin: 4px 0 8px 0;
  border: 1px solid #bfbfbf;
}

.module-connector-label {
  display: inline-block;
  width: 3em;
  border-radius: 2px;
  cursor: crosshair;
  font-family: 'Roboto Mono';
  overflow: hidden;
  font-weight: bold;
  font-size: 10pt;
  text-align: center;
  text-transform: uppercase;
  margin: 0 1px -3px 1px;
}

.module-connector-label.output {
  background: #3c3c3c;;
  color: white;
}

.module-connector {
  display: inline-block;
	box-shadow: 0 0 0 4px #fff, 0 0 0 7px #a4a4a4;
  margin: 7px 0;
  background: #000000;
  border-radius: 50%;
  width: 10px;
  height: 10px;
}

.module-io > .module-connector-label {
  display: inline-block;
}

.module-tuning > .param-container {
  display: inline-block;
}

.param-container {
  margin: 0 1px;
  width: 3em;
  font-family: 'Roboto Mono';
  font-weight: bold;
  font-size: 10pt;
  text-align: center;
  text-transform: uppercase;
}

.param-placeholder {
  margin: 4px auto;
  width: 30px;
  height: 30px;
  cursor: pointer;
  background: url('../img/dial.svg');
  background-size: contain;
  position: relative;
}

.range-slider {
  background: #e1e1e1;
  width: 400px;
  height: 34px;
  position: absolute;
  transform: translateX(calc(-50% + 15px)) rotate(-90deg);
  display: none;
  z-index: 1;
  border-radius: 4px;
  box-shadow: -3px 3px 4px 0px rgba(0, 0, 0, 0.37);
}

.info {
  font-family: 'Roboto Mono';
  display: block;
  position: absolute;
  top: -2em;
  left: calc(50%);
  background: #e1e1e1;
  padding: 0.5em;
  transform: translateX(-50%);
  border-radius: inherit;
  text-transform: none;
}

.info .in-tune {
  width: 5em;
  text-align: left;
  display: inline-block;
  opacity: 0.8;
}

.info .out-of-tune {
  width: 5em;
  text-align: left;
  display: inline-block;
  opacity: 0.5;
}

.range-slider.open {
  display: grid;
}

.range-slider > input[type=range] {
  margin: auto 0;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: gray;
  -webkit-appearance: none;
  appearance: none;
}

input[type=range]::-moz-range-thumb  {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #f0f0f0;
  border: 2px solid #999999;
  border-radius: 5px;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #f0f0f0;
  border: 2px solid #999999;
  border-radius: 5px;
  cursor: pointer;
}

input[type=number] {
  width: 6em;
  height: 1.5em;
  border: 2px dashed darkgray;
  background: none;
  font-family: 'Roboto Mono';
  font-weight: bold;
  font-size: 0.95em;
  color: black;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
 opacity: 1;
}
