
*, *:before, *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

#family-graph {
    width: 100%;
    height: 100%;
}

#tree-wrapper {
    margin-top: 50px;
    position: relative;
}

#root-left {
    position: relative;
    display: table-cell;
    vertical-align: middle;
    right: -70px;
}

#root-right {
    position: relative;
    display: table-cell;
    vertical-align: middle;
}

#main-root {
    position: relative;
    display: table-cell;
    vertical-align: middle;
    min-width: 0;
}

/*right tree*/
.branch {
    position: relative;
    margin-left: 250px;
}


.branch:before {
    content: "";
    width: 50px;
    border-top: 2px solid magenta;
    position: absolute;
    left: -100px;
    top: 50%;
    margin-top: 1px;
}

.entry {
    position: relative;
    min-height: 60px;
    min-width: 150px;
}

.entry:before {
    content: "";
    height: 100%;
    position: absolute;
    border-left: 2px solid black;
    left: -50px;
}

.entry:after {
    content: "";
    width: 50px;
    border-top: 2px solid aqua;
    position: absolute;
    left: -50px;
    top: 50%;
    margin-top: 1px;
}

.entry:first-child:before {
    width: 10px;
    height: 50%;
    top: 50%;
    margin-top: 2px;
    border-radius: 10px 0 0 0;
}


.entry:first-child:after {
    height: 10px;
    border-radius: 10px 0 0 0;
}

.entry:last-child:before {
    width: 10px;
    height: 50%;
    border-radius: 0 0 0 10px;
}

.entry:last-child:after {
    height: 10px;
    border-top: none;
    border-bottom: 2px solid aqua;
    border-radius: 0 0 0 10px;
    margin-top: -10px;
}

.entry.sole:after {
    width: 50px;
    height: 0;
    margin-top: 1px;
    border-radius: 0;
}

.entry.sole:before {
    display: none;
}


.label {
    display: block;
    min-width: 150px;
    padding: 5px 10px;
    line-height: 20px;
    text-align: center;
    border: 2px solid silver;
    border-radius: 5px;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -15px;
    overflow-wrap: break-word;
    background-color: lightblue;
}

/* left tree  */
.branch-inverse {
    position: relative;
    margin-right: 250px;
}

.branch-inverse:before {
    content: "";
    width: 50px;
    border-top: 2px solid black;
    position: absolute;
    right: -100px;
    top: 50%;
    margin-top: 1px;
}

.entry-inverse {
    position: relative;
    min-height: 60px;
    min-width: 150px;
}

.entry-inverse:after {
    content: "";
    width: 50px;
    border-top: 2px solid black;
    position: absolute;
    right: -50px;
    top: 50%;
    margin-top: 1px;
}

.entry-inverse:before {
    content: "";
    height: 100%;
    border-right: 2px solid black;
    position: absolute;
    right: -50px;
}

.entry-inverse:first-child:before {
    width: 10px;
    height: 50%;
    top: 50%;
    margin-top: 2px;
    border-radius: 0 10px 0 0;
}


.entry-inverse:first-child:after {
    height: 10px;
    border-radius: 0 10px 0 0;
}

.entry-inverse:last-child:before {
    width: 10px;
    height: 50%;
    border-radius: 0 0 10px 0;
}

.entry-inverse:last-child:after {
    height: 10px;
    border-top: none;
    border-bottom: 2px solid black;
    border-radius: 0 0 10px 0;
    margin-top: -10px;
}

.entry-inverse.sole:after {
    width: 50px;
    height: 0;
    margin-top: 1px;
    border-radius: 0;
}

.entry-inverse.sole:before {
    display: none;
}

.label-inverse {
    display: block;
    min-width: 150px;
    padding: 5px 10px;
    line-height: 20px;
    text-align: center;
    border: 2px solid silver;
    border-radius: 5px;
    position: absolute;
    right: 0;
    top: 50%;
    margin-top: -15px;
    overflow-wrap: break-word;
    background-color: lightblue;
    z-index: 9;
}

.label-small {
    min-width: 50px;
}

#tree-wrapper .card-l1 {
    background-color: #dfb8d4;
}
#tree-wrapper .card-l2 {
    background-color: #dfd6b8;
}
#tree-wrapper .card-l3 {
    background-color: #b8c9df;
}
#tree-wrapper .card-l4 {
    background-color: #b8dfda;
}
#tree-wrapper .card-l5 {
    background-color: #bfdfb8;
}
#tree-wrapper .card-l6 {
    background-color: #add8e6;
}
