
* {
	margin: 0;
	padding: 0;
}

.roots {
	width: max-content;
}

.roots ul {
	padding-top: 20px;
	position: relative;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
	transition: all 0.5s;
}

.roots li {
	float: left;
	text-align: center;
	list-style-type: none;
	position: relative;
	padding: 20px 5px 10px 5px;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
	transition: all 0.5s;
}

/*We will use ::before and ::after to draw the connectors*/

.roots li::before,
.roots li::after {
	content: '';
	position: absolute;
	top: 0;
	right: 50%;
	border-top: 1px dashed #ccc;
	width: 50%;
	height: 20px;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
	transition: all 0.5s;
	}

.roots li::after {
	right: auto;
	left: 50%;
	border-left: 1px dashed #ccc;
}

/*We need to remove left-right connectors from elements without 
any siblings*/
.roots li:only-child::after,
.roots li:only-child::before {
	display: none;
}

/*Remove space from the top of single children*/
.roots li:only-child {
	padding-top: 0;
}

/*Remove left connector from first child and 
right connector from last child*/
.roots li:first-child::before,
.roots li:last-child::after {
	border: 0 none;
}

/*Adding back the vertical connector to the last nodes*/
.roots li:last-child::before {
	border-right: 1px dashed #ccc;
	border-radius: 0 5px 0 0;
	-webkit-border-radius: 0 5px 0 0;
	-moz-border-radius: 0 5px 0 0;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
	transition: all 0.5s;
}

.roots li:first-child::after {
	border-radius: 5px 0 0 0;
	-webkit-border-radius: 5px 0 0 0;
	-moz-border-radius: 5px 0 0 0;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
	transition: all 0.5s;
}

/*Time to add downward connectors from parents*/
.roots ul ul::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	border-left: 1px dashed #ccc;
	width: 0;
	height: 20px;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
	transition: all 0.5s;
}

.roots li a {
		background-color: #242424;
		border: 1px solid #000;
		padding: 0px 10px 0px 0px;
		text-decoration: none;
		color: #fff;
		font-size: 14px;
		font-weight: 600;
		display: inline-block;
		border-radius: 2px;
		-webkit-border-radius: 2px;
		-moz-border-radius: 2px;
		-webkit-transition: all 0.5s;
		-moz-transition: all 0.5s;
		transition: all 0.5s;
		box-shadow: 0 5px 10px -5px rgba(0,0,0,0.15);
		min-height: 50px;
		min-width: 150px;
	}

/*Time for some hover effects*/
/*We will apply the hover effect the the lineage of the element also*/
.roots li a:hover,
.roots li a:hover+ul li a {
	background: #303030;
	box-shadow: 0 10px 20px -5px rgba(0,0,0,0.25);
}

/*Connector styles on hover*/
.roots li a:hover+ul li::after,
.roots li a:hover+ul li::before,
.roots li a:hover+ul::before,
.roots li a:hover+ul ul::before {
	border-color: #94a0b4;
}


.container-familytree {
	height: calc(100vh - 5rem);
	width: 100vw;
	cursor: grab;
	overflow: auto;
	margin-left: auto;
	margin-right: auto;
}

.centerplacement {
	margin-left: auto;
	margin-right: auto;
	margin-top: auto;
	margin-bottom: auto;
}

.centerplacement_roots {
	margin-left: auto;
	margin-right: auto;
	margin-top: 10vh;
	margin-bottom: 10vh;
}

.vflip {
	transform: rotate(180deg);
	transform-origin: 50%;
	top: 100%;
	position: relative;
	-webkit-transition: all 0s;
	-moz-transition: all 0s;		
	transition: all 0s;
	}


