
/* https://codepen.io/paulsmirnov/pen/dyyOLwa */
/* Forked from https://codepen.io/Pestov/pen/BLpgm */
/* Fixed wrapping as in https://stackoverflow.com/a/42150764/1852238 */
/* See also horizontal version (c) https://codepen.io/paulsmirnov/pen/WNNGVbv */

/*Now the CSS*/
/* * {margin: 0; padding: 0;} */

.treeR_V {
    overflow: auto;
    padding-bottom: 40px;
	padding-right: 80px;
}

.treeR_V ul {
	padding-top: 12px; 
	position: relative;
	
	/* transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s; */
	display: flex; /* ADDED for correct wrapping */
}

.treeR_V li {
	/* float: left; REMOVED for correct wrapping */
	text-align: center;
	list-style-type: none;
	position: relative;
	padding: 12px 5px 0 5px;
	
	/* transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s; */
}

.treeR_V li .align-left {
	text-align: left;
}

/*We will use ::before and ::after to draw the connectors*/

.treeR_V li::before, .treeR_V li::after{
	content: '';
	position: absolute; top: 0; right: 50%;
	border-top: 2px solid #000;
	width: 50%; height: 12px;
}
.treeR_V li::after{
	right: auto; left: 50%;
	border-left: 2px solid #000;
}

/*We need to remove left-right connectors from elements without 
any siblings*/
.treeR_V li:only-child::after, .treeR_V li:only-child::before {
	display: none;
}

/*Remove space from the top of single children*/
.treeR_V li:only-child{ padding-top: 0;}

/*Remove left connector from first child and 
right connector from last child*/
.treeR_V li:first-child::before, .treeR_V li:last-child::after{
	border: 0 none;
}
/*Adding back the vertical connector to the last nodes*/
.treeR_V li:last-child::before{
	border-right: 2px solid #000;
	border-radius: 0 5px 0 0;
	-webkit-border-radius: 0 5px 0 0;
	-moz-border-radius: 0 5px 0 0;
}
.treeR_V li:first-child::after{
	border-radius: 5px 0 0 0;
	-webkit-border-radius: 5px 0 0 0;
	-moz-border-radius: 5px 0 0 0;
}

/*Time to add downward connectors from parents*/
.treeR_V ul ul::before{
	content: '';
	position: absolute; top: 0; left: 50%;
	border-left: 2px solid #000;
	width: 0; 
	height: 12px;
}

.treeR_V li .folha {
	padding: 0.25em 0.5em;
	text-decoration: none;
	color: #000;
	font-family: arial, verdana, tahoma;
	display: inline-block;
	
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	
	/* transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s; */

	font-weight:400;
}

/* .treeR_V .orcamento {
	font-size: 0.75em;
	max-width: 240px;
	min-width: 180px;
	text-wrap: wrap;
}

.treeR_V .relatorio {
	font-size: 0.8em;
	min-width: 240px;
} */

/* ---------------------------------- */

.treeR_H {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: start;
	-ms-flex-pack: start;
	justify-content: flex-start;
}

.treeR_H ul {
	padding-left: 20px; position: relative;
	
	/* transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s; */

	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-direction: column;
	flex-direction: column;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
}

.treeR_H li {
	text-align: center;
	list-style-type: none;
	position: relative;
	padding: 5px 0 5px 20px;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	
	/* transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s; */
}

.treeR_H li .align-left {
	text-align: left;
}

/*We will use ::before and ::after to draw the connectors*/

.treeR_H li::before, .treeR_H li::after{
	content: '';
	position: absolute; left: 0; bottom: 50%;
	border-left: 2px solid #000;
	width: 20px; height: 50%;
}
.treeR_H li::after{
	bottom: auto; top: 50%;
	border-top: 2px solid #000;
}

/*We need to remove left-right connectors from elements without 
any siblings*/
.treeR_H li:only-child::after, .treeR_H li:only-child::before {
	display: none;
}

/*Remove space from the top of single children*/
.treeR_H li:only-child{ padding-left: 0;}

/*Remove left connector from first child and 
right connector from last child*/
.treeR_H li:first-child::before, .treeR_H li:last-child::after{
	border: 0 none;
}
/*Adding back the vertical connector to the last nodes*/
.treeR_H li:last-child::before{
	border-bottom: 2px solid #000;
	border-radius: 0 0 0 5px;
	-webkit-border-radius: 0 0 0 5px;
	-moz-border-radius: 0 0 0 5px;
}
.treeR_H li:first-child::after{
	border-radius: 5px 0 0 0;
	-webkit-border-radius: 5px 0 0 0;
	-moz-border-radius: 5px 0 0 0;
}

/*Time to add downward connectors from parents*/
.treeR_H ul ul::before{
	content: '';
	position: absolute; left: 0; top: 50%;
	border-top: 1px solid #000;
	width: 20px; height: 0;
}

.treeR_H li .folha {
	padding: 10px 5px;
	text-decoration: none;
	color: #000;
	font-family: arial, verdana, tahoma;
	display: inline-block;
	-ms-flex-item-align: center;
	-ms-grid-row-align: center;
	align-self: center;
	
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	
	/* transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s; */
}

.treeR_H .orcamento {
	font-size: 0.75em;
	max-width: 240px;
	min-width: 180px;
	text-wrap: wrap;
}

.treeR_H .relatorio {
	font-size: 0.8em;
}

/* ---------------------------------- */

.treeR_V,
.treeR_H {

	.sem_destaque {
		background-color: rgb(240, 240, 240);
		border: 2px solid black;
	}

	.dante_causa {
		background-color: rgb(230, 255, 1);
		border: 2px solid black;
		max-width: 500px;
	}

	.descendente {
		background-color: white;
		border: 2px solid rgb(160, 160, 160);
		max-width: 400px;
	}

	.casamento {
		background-color: white;
		border: 2px solid rgb(160, 160, 160);
		max-width: 400px;
	}

	.requerente {
		background-color: rgb(160, 255, 160);
		border: 2px solid black;
		border-style: double;
		max-width: 400px;
	}

	.requerente_orcamento {
		background-color: rgb(160, 255, 160);
		border: 2px solid black ;
		max-width: 400px;
	}

	.requerente_menor {
		background-color: rgb(160, 255, 160);
		border: 2px solid black ;
		max-width: 400px;
	}

	.requerente_menor_orcamento {
		background-color: rgb(160, 255, 160);
		border: 2px solid black ;
		max-width: 400px;
	}

	.nome_dante_causa {
		color: #000;
		font-size: 1.5em;
		font-weight: bold;
		text-transform: uppercase;
	}

	.nome_requerente {
		color: #000;
		font-size: 1.2em;
		font-weight: bold;
		text-transform: uppercase;
		text-decoration: underline;
	}

	.nome_requerente_menor {
		color: #000;
		font-size: 1.2em;
		font-weight: bold;
		text-transform: uppercase;
		text-decoration: underline;
	}

	.nome_descendente {
		color: #000;
		font-size: 1.2em;
		font-style: italic;
	}

	.min_width {
		min-width: 10em;
		max-width: 18em;
	}

	.mini_button {
		border: 2px solid rgb(255, 255, 255);
		border-radius: 0.5em;
		color: black;
		font-size: 0.9em;
		padding: 0em 0.5em;
		margin-right: 0.25em;
		margin-bottom: 0.5em;
		/* width: fit-content; */
		/* display: flex; */
		/* flex-wrap: wrap; */
		display: block;
		background: rgba(255, 255, 255, 0.75); 
		/* font-style: italic; */
	}

	.person {
		font-weight: bold;
		/* margin-bottom: 0.5em;
		border-bottom: 2px solid rgb(255, 255, 255); */
	}

	.separator {
		margin-bottom: 0.5em;
		border-bottom: 2px solid rgb(128, 128, 128);
	}

	.font-xs {
		font-size: 0.75em; /* 12px */
		line-height: 1em; /* 16px */
	}

	.font-xxs {
		font-size: 0.5em; /* 12px */
		line-height: .75em; /* 16px */
	}

	.dropbtn:hover {
		cursor:pointer;
	}
	
	.dropdown {
	  position: relative;
	  display: inline-block;
	  width: 100%; 
	  padding: 0px 0px;
	}
	
	.dropdown-content {
	  display: none;
	  position: absolute;
	  background: rgba(255, 255, 255, 1); 
	  z-index: 1;
	  width:fit-content;/* 240px; */
	  white-space: nowrap;
	  padding: 4px 4px;
	  border: 2px solid #f0f0ff; /* rgb(128, 128, 128); */
	  border-radius: 0 0.5em 0.5em 0.5em;
	}
	
	.dropdown-content a {
	  display: block;
	  padding: 4px 4px;
	  background-color: #f0f0ff;
	  border: 2px solid #f0f0ff;;
	  border-radius: 0.5em;
	  margin:4px;
	}
	
	.dropdown-content a:hover {
	  background-color: #f0f0ff;
	  padding: 4px 4px;
	  border: 2px solid rgb(0, 0, 0);
	  border-radius: 0.5em;
	  margin:4px;
	}

	.show {
	  display: block;
	}	

	.btn_01 a {
		display: block;
		color:black;
		padding: 1px 2px;
		background-color: white;
		border: 2px solid #c0c0c0;;
		border-radius: 3px;
		margin:2px;
	  }
	  
	  .btn_01 a:hover {
		color:white;
		background-color: black;
		padding: 1px 2px;
		border: 2px solid rgb(0, 0, 0);
		border-radius: 3px;
		margin:2px;
	  }	

}
