.control-panel-root-node {
  display: block;
  width: 100vw;
  max-width: 100vw;
  height: calc(100vh - 34px);
  max-height: calc(100vh - 34px);
  overflow: auto;

  .control-panel-settings-button {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 0;
    padding-top: 2px;
    position: absolute;
    bottom: 0;
    left: 3px;
    border: 1px solid #333;
    cursor: pointer;
    user-select: none;
  }

  .control-panel-content {
    /* \/ This makes the absolute positioned elements inside of it work when this is scrolled. */
    position: relative;
    min-height: calc(100vh - 36px);
  }

  .control-panel-content-locked {
    .configure-input-button,
    .delete-input-button {
      display: none !important;
    }
  }

  .main-control-panel {
    margin-left: 1px;
    z-index: 10000000;
    position: absolute;
    bottom: 0;
    left: 0;
  }

  .configure-input-button {
    position: absolute;
    top: 0px;
    left: 1px;
    cursor: pointer;
    font-size: 9px;
  }

  .delete-input-button {
    position: absolute;
    top: 0px;
    left: 16px;
    cursor: pointer;
    font-size: 9px;
  }

  .control .control-panel {
    padding-top: 15px !important;
    padding-bottom: 10px !important;
    border: 1px solid #444;
    box-sizing: border-box;
  }
}

.control-panel-input-configurator {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;

  .buttons {
    display: flex;
    flex-direction: column;

    button {
      margin-top: 6px;
    }
  }
}

.control-panel-setting-label {
  cursor: text;
  border: 1px solid #888;
  padding: 2px;
  margin-top: 1px;
  margin-left: -5px;
}

@media (min-width: 800px) {
  .control-panel-midi-keyboard {
    margin-left: -5px !important;
  }
}

.control-panel-midi-keyboard {
  position: absolute;
  transform: scale(0.85);
  margin-left: 40px;

  .top-drag-bar {
    display: flex;
    flex-direction: row;

    .delete-input-button {
      flex: 0;
      cursor: pointer;
    }

    .midi-keyboard-name {
      flex: 1;
      text-align: center;
    }

    cursor: grab;
    background-color: #27a0b4;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 18px;
    margin-right: -20px;
    margin-bottom: -1px;
    user-select: none;
    font-family: 'Hack', 'Input Mono', 'Input', 'Oxygen Mono', monospace;
  }
}

.control-panel-spectrogram {
  transform: scale(0.6);
}

.control-panel-note {
  position: absolute;
  border: 1px solid #333;
  color: #eee;
  background-color: #242424;

  .control-panel-note-drag-bar {
    width: 100%;
    height: 14px;
    padding-bottom: 3px;
    border-bottom: 1px solid #ffffff21;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
  }

  .control-panel-note-content {
    width: 100%;
    height: calc(100% - 18px);
    /* Display newlines */
    white-space: pre-line;
    overflow: auto;
    background-color: #121212;
    padding: 3px;
    box-sizing: border-box;

    h2 {
      margin-top: 2px;
      margin-bottom: 4px;
    }
    h3 {
      margin-top: 2px;
      margin-bottom: 2px;
    }
    p {
      margin-top: 6px;
      margin-bottom: 6px;
    }
    pre {
      display: block;
      padding: 10px 8px;
      background-color: #222;
      border-radius: 4px;
      margin: 8px 5px;

      > code {
        margin: 0;
        padding: 0;
      }
    }
    code {
      background-color: #222;
      border-radius: 4px;
      color: #e0b3a7;
      padding: 1px 4px;
      margin: 2px 0;
    }
  }

  textarea {
    width: 100%;
    height: calc(100% - 18px);
    box-sizing: border-box;
    background-color: #121212;
    color: #eee;
  }
}
