body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
}

#output {
  margin: auto 10px auto 0;
  border: 0;
  display: block;
  color: white;
  font-family: 'Lucida Console', Monaco, monospace;
  outline: none;
  background: black;
  max-width: calc(100vw - 20px);
}

.xterm {
  padding: 10px;
}

#board {
  display: flex;
  flex-direction: column;
}

#components {
  clear: both;
}

#components > * {
  margin: 5px;
  float: left;
}

#serial h2 {
  margin-bottom: 5px;
  font-weight: 300;
}

#serial {
  padding: 10px;
}

#board-svg {
  width: 50vw;
  height: 22.5vw;
  font-family: 'Lucida Console', Monaco, monospace;
}

#c12832 {
  border: solid 1px;
  padding: 5px;
}

.sht31 {
  width: 300px;
}

.sht31 {
  text-align: center;
  display: flex;
}

/* Thermometer column and text */
.sht31-comp {
  margin: 10px auto 60px auto;
  width:22px;
  height:150px;
  display:block;
  font:bold 14px/152px helvetica, arial, sans-serif;
  text-indent: 36px;
  background: linear-gradient(top, #fff 0%, #fff 50%, #db3f02 50%, #db3f02 100%);
  border-radius:22px 22px 0 0;
  border:5px solid #4a1c03;
  border-bottom:none;
  position:relative;
  box-shadow:inset 0 0 0 4px #fff;
  color:#4a1c03;
}

/* Thermometer Bulb */
.sht31-before {
  content:' ';
  width:44px;
  height:44px;
  display:block;
  position:absolute;
  top:142px;
  left:-16px;
  z-index:-1; /* Place the bulb under the column */
  background:#db3f02;
  border-radius:44px;
  border:5px solid #4a1c03;
  box-shadow:inset 0 0 0 4px #fff;
}

/* This piece here connects the column with the bulb */
.sht31-after{
  content:' ';
  width:14px;
  height:7px;
  display:block;
  position:absolute;
  top:146px;
  left:4px;
  background:#db3f02;
}

.humidity .sht31-before, .humidity .sht31-after {
  background: #86C5DA;
}

#project {
  width: 100%;
  display: flex;
}

#viewer {
  border: 0;
  width: 50vw;
  border-left: solid 1px #ccc;
}

#project iframe {
  border: 0;
  width: 100%;
  height: calc(100vh - 63px);
}

#editor-container {
  width: 50vw;
  height: calc(100vh - 63px);
  position: relative;
}

#editor-topbar, #viewer-topbar {
  height: 39px;
  line-height: 38px;
  padding: 0 10px;
}

#editor-topbar {
  background: #bab9b8;
  border-bottom: solid 1px rgb(117, 117, 117);
}

#editor {
  position: absolute;
  top: 40px;
  right: 0;
  bottom: 0;
  left: 0;
}

#header {
  background: #333e48;
  color: white;
  font-size: 32px;
  padding: 10px;
}

#header #links {
  float: right;
  line-height: 43px;
  font-size: 14px;
}

#links a {
  color: white;
}

#run-container {
  float: right;
  font-size: 12px;
}

#viewer-topbar {
  background: #fff;
  border-bottom: solid 1px #eee;
  margin-bottom: 10px;
}

.viewer #status {
  float: right;
}

.viewer #refresh {
  float: right;
  margin-left: 20px;
  color: #aaa;
  text-decoration: none;
}

.viewer #refresh:hover {
  color: #333;
}

#add-component {
  border: solid 1px green;
  display: inline-block;
  padding: 10px;
  line-height: 3px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  color: green;
}

#add-component:hover {
  background: rgb(209, 255, 209);
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255,255,255,0.5);
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  display: none;
  z-index: 1000;
}

#overlay>div {
  background: white;
  border: solid 1px #333;
  border-radius: 5px;
  padding: 20px 10px;
}

#overlay h2 {
  margin-top: 0;
}

#add-component-btn {
  margin-top: 20px;
}

#pins label {
  margin-right: 10px;
  font-size: 12px;
}

#pins select:not(:last-child) {
  margin-right: 10px;
}

.component {
  border: solid 1px black;
  text-align: center;
  font-family: 'Lucida Console', Monaco, monospace;
  font-size: 12px;
  padding: 5px;
}

.component .description {
  margin: 0 0 10px 0;
}

.component .destroy {
  float: right;
  color: #ddd;
  cursor: pointer;
  margin-left: 20px;
}

.component .destroy:hover {
  color: #333;
}

#compilation-failed {
  padding: 15px;
  display: none;
}

#compilation-failed h3 {
  margin-top: 0;
  font-weight: 300;
  color: darkred;
  border-bottom: solid 1px darkred;
  padding-bottom: 13px;
}

#compilation-failed pre {
  white-space: pre-wrap;
}

.st7789h2 canvas {
  border: solid 1px #ccc;
}

.thermistor .voltage-min {
  float: left;
  margin-left: 10px;
}

.thermistor .voltage-max {
  float: right;
  margin-right: 10px;
}
