html,
body {
  margin: 0;
  padding: 0;

  width: 100%;
  height: 100%;

  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

#main {
  width: 100%;
  height: 100%;
}

#toolbar {
  flex: 0 0 50px;
  align-self: stretch;
  background-color: lightgray;

  display: flex;
}

#toolbar::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
#toolbar::-webkit-scrollbar-track {
  background: #e5e5e5;
}
#toolbar::-webkit-scrollbar-thumb {
  background: #929292;
}
#toolbar::-webkit-scrollbar-thumb:hover {
  background: #6a6a6a;
}

#toolbar > div {
  width: 44px;
  height: 44px;
  margin: 3px;
  border-radius: 4px;
  background-color: rgb(180, 180, 180);

  border: 2px solid rgb(180, 180, 180);

  cursor: pointer;
  user-select: none;
}

#toolbar > .toolbar-active {
  border: 2px solid black;
}

#toolbar > .toolbar-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toolbar-circle {
  width: 30px;
  height: 30px;
  margin: 5px;
  border-radius: 50%;
}

.whiteboard-container {
  width: 100%;
  height: 100%;
  padding: 0 25px;
  background-color: darkgray;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
}

#whiteboard {
  display: block;
  /*max-width: 100%;*/
  /*max-height: 100%;*/

  margin: 0 50px 0 0;

  cursor: crosshair;
  touch-action: none;
}

.whiteboard-loading {
  position: fixed;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (orientation: landscape) {
  #toolbar {
    overflow-x: hidden;
    overflow-y: auto;
    flex-direction: column;
  }

  .toolbar-space {
    margin-bottom: 13px !important;
  }
}

@media (orientation: portrait) {
  #toolbar {
    overflow-x: auto;
    overflow-y: hidden;
    flex-direction: row;
  }

  .toolbar-space {
    margin-right: 13px !important;
  }

  .whiteboard-container {
    padding: 25px 0;
    flex-direction: column;
  }

  #whiteboard {
    margin: 0 0 50px 0;
  }
}
