input[type=text],
	select {
		width: 100%;
		padding:8px 0px;
		display: inline-block;
		border: 1px solid #ccc;
		border-radius: 5px;
		box-sizing: border-box;
    min-width: 45px;
    text-align: center;
	}

	button {
    background-color: #10a049;
		color: white;
		padding: 8px 2px;
		margin: 0px;
		border: 1px solid black;
		border-radius: 8px;
		cursor: pointer;
		box-sizing: border-box;
	}

	button:hover {
    background: #37c971;
    font-weight: bold;
	}

.buttonBox{
  display:flex;
  width: 100%;
  justify-content: center;
}

.buttonStart{
  display:flex;
  background-color: #10a049;
  color: white;
  height: 30px;
  width: 40px;
  justify-content: center;
  align-items: center;
  border: 1px solid black;
  border-radius: 8px 0px 0px 8px;
  cursor: pointer;
  box-sizing: border-box;
}

.buttonMid{
  display:flex;
  background-color: #10a049;
  color: white;
  height: 30px;
  width: 40px;
  justify-content: center;
  align-items: center;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  cursor: pointer;
  box-sizing: border-box;
}

.buttonEnd{
  display:flex;
  background-color: #10a049;
  color: white;
  height: 30px;
  width: 40px;
  justify-content: center;
  align-items: center;
  border: 1px solid black;
  border-radius: 0px 8px 8px 0px;
  cursor: pointer;
  box-sizing: border-box;
}

.buttonStart:hover{
  background: #37c971;
  font-weight: bold;
}

.buttonMid:hover{
  background: #37c971;
  font-weight: bold;
}

.buttonEnd:hover{
  background: #37c971;
  font-weight: bold;
}

.mainbox{
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
align-items: stretch;
justify-content: space-around;
margin: 0px;
box-sizing: border-box;
}
  
.box1{
display: flex;
flex-direction: column;
flex-wrap: wrap;
background: #f2f2f2;
width: 30%;
height: 200px ;
border: 1px solid black;
align-items: center;
justify-content: center;
margin: 5px;
}

.matinput{
display: flex;
flex-direction: row;
background: none;
height: 30px;
padding: 5px;
margin: 10px 0px;
align-items: center;
width: 170px;
justify-content: center;
box-sizing: border-box;
}

.box2{
display: flex;
flex-direction: column;
background: #f2f2f2;
margin: 5px;
align-items: center;
justify-content: center;
width: 66%;
border: 1px solid black;
padding: 5px;

}

.subbox2{
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: center;
}

.levelfact{
display: flex;
flex-direction: row;
height: 30px;
padding: 5px;
justify-content:center;
width: 170px ;
align-items: center;
}

.box3{
display: none;
flex-direction: column;
background: #f2f2f2;
align-items: center;
justify-content: center;
width: 30%;
border: 1px solid black;
padding: 5px;
margin-right:5px;
margin: 5px;
}

.subbox3{
display: flex;
flex-wrap: wrap;
flex-direction: row; 
justify-content: center;
}

.matsum{
	display:flex;
  align-items: center;
	min-width:54px;
	margin: 5px;
}

.matout{
  display: flex;
  min-width: 38px;
}

.ico{
	max-width: 25px;
}

.headIco{
  max-width: 50px;
  max-height:50px;
  border: 1px solid green
}

.treeBox{
  display: flex;
  border: 0px solid black;
  padding: 5px;
  /*overflow-x: auto;*/
  /*width: 100%;*/
}

.matBox{
  display: flex;
  cursor: pointer;
}

.matIco{
  display:flex;
  width:30px;
  height:70px;
  box-sizing: border-box;
  border: 1px solid black;
  border-right: none;
  align-content: center;
  align-items: center;
}

.plusMinus{
  display:flex;
  width:15px;
  height:70px;
  border: none;
  justify-content: center;
  align-items: center;
}

.matDetail{
  display: flex;
  flex-wrap: wrap;
  width: 190px;
  height:85px;
}


.matName{
  display: flex;
  align-items:center;
  justify-content:center;
  width:150px;
  height: 35px;
  border: 1px solid black;
  background:  rgb(199, 226, 200);
  box-sizing: border-box;
}

.factoryName{
  display: flex;
  align-items:center;
  justify-content:center;
  width:150px;
  height: 35px;
  border: 1px solid black;
  border-top: none;
  background:  rgb(221, 211, 165);
  box-sizing: border-box;
  text-align: center;
}

.matRate{
  display: flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height: 35px;
  border: 1px solid black;
  border-left: none;
  background:  #FFFFFF;
  box-sizing: border-box;
}

.factoryNum{
  display: flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height: 35px;
  border-bottom: 1px solid black;
  border-right: 1px solid black;
  background:  #FFFFFF;
  box-sizing: border-box;
}

.spacer{
  display: flex;
  width: 190px;
  height: 15px;

}

.branchBox{
  display: flex;
  align-content: stretch;
  flex-direction: column;
  width: 10px;
}

.branchOut{
  width:10px;
  height: 35px;
  border-bottom: 1px solid black;
  box-sizing: border-box;
}

.branchSimple{
  width:10px;
  height: 35px;
  border-bottom: 1px solid black;
  box-sizing: border-box;
}

.branchEnd{
  width:10px;
  height: 35px;
  border-bottom: 1px solid black;
  border-left: 1px solid black;
  box-sizing: border-box;
}

.branchDown{
  width:10px;
  flex-grow: 2;
  border-left: 1px solid black;
  box-sizing: border-box;
}

.matRecipe{
  display: flex;
  box-sizing: border-box;
}

.matChildren{
  display: flex;
  flex-direction:column;
  box-sizing: border-box;
}

.treeLevel{
  display: flex;
  box-sizing: border-box;
  }



@media screen and (max-width: 800px){
  .mainbox{
  flex-direction: column;
  width: 100%; 
  align-items: stretch;
  }
  .box1{
	flex-direction: row;
  height: 150px;
	width: 100%;
  margin: 5px 0px;
  }
  .box2{
  flex-direction: column;
  width: 100%;
  margin: 5px 0px;
  padding: 0px;
  }
  .box3{
  width: 100%;
  margin: 5px 0px;
  padding: 0px;
  }

  .levelfact{
    width: 153px;
  }
}
