/* 12/08/2025 Tree UI - Clean Fixed Version */
.tree-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    max-width: 2000px;
    margin: 0 auto;
    backdrop-f.profile-img-circle.male {
        border-color: #1976d2;
    }
}

.profile-img-circle.female {
    border-color: #e91e63;
}

.profile-img-circle.unknown {
    border-color: #ff9800;
}

/* Ex-partner styles with higher specificity */
.tree-node.ex-partner-member .profile-img-circle.male {
    border: 3px dashed #1976d2 !important;
}

.tree-node.ex-partner-member .profile-img-circle.female {
    border: 3px dashed #e91e63 !important;
}

.tree-node.ex-partner-member .profile-img-circle.unknown {
    border: 3px dashed #ff9800 !important;
}

.tree-title {
    text-align: center;
    color: rgb(0, 0, 0);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tree {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.tree ul {
    padding-top: 0px;
    position: relative;
    transition: all 0.5s;
    list-style: none;
    margin: 0;
    padding-left: 0;
    display: flex;
    justify-content: center;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 0px 5px 0 5px;
    transition: all 0.5s;
    /* z-index: 1000; */
}

/* .tree-node.has-partner:before {
    position: absolute;
    content: "";
    height: 1px;
    border: 1px solid #1f76ce;
    width: 100%;
    right: -78%;
    top: 35%;
} */
/* .tree>ul:before {
    position: absolute;
    content: "";
    height: 34px;
    width: 80%;
    top: 52%;
    border: 1px solid black;
    border-bottom: none;
} */
/* .tree-node.has-child:before {
    position: absolute;
    content: "";
    height: 1px;
    width: 110%;
    background: #1f76ce;
    top: 36%;
} */

/* .child-item:before {
    position: absolute;
    content: "";
    height: 189px;
    width: 1px;
    background: green;
    top: -81%;
    left: 39%;
} */



/* Children wrapper and container styles */
.children-wrapper {
    position: relative;
    margin-top: 20px;
}

.children-wrapper.has-partner {
    margin-left: 0%;
    width: 200%;
    position: absolute;
}


.children-wrapper.has-partner .children-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    padding-top: 20px !important;
}

/* .tree-node.has-child:after {
    position: absolute;
    content: "";
    height: 160px;
    width: 2px;
    background: #1f76ce;
    top: 82px;
    left: 119.5%;
} */
.tree-node.has-child-no-partner:after  {
    position: absolute;
    content: "";
    height: 142px;
    left: 0;
    right: 0;
    margin: auto;
}

/* .children-wrapper.has-partner .children-container:before {
    position: absolute;
    content: "";
    height: 100px;
    width: 50%;
    border: 1px solid red;
    border-bottom: none;
} */
/* .children-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 20px;
    width: 2px;
    background-color: #ccc;
    transform: translateX(-50%);
}  */
/* .child-item:before  {
    position: absolute;
    content: "";
    width: 80%;
    height: 115px;
    left: 10%;
    border-top: 2px solid #1f76ce;
    top: -32px;
    border-bottom: none;
} */

.child-item:before {
    position: absolute;
    content: "";
    width: 74%;
    height: 115px;
    left: 0;
    border-top: 2px solid #1f76ce;
    top: -32px;
    border-bottom: none;
    right: 0;
    margin: auto;
}
.child-item {
    position: relative;
}
.child-item.has-partner.common-blood-relation .tree-node .child-item.has-partner.common-blood-relation ul>li:first-child:after {
    position: absolute;
    content: "";
    height: 100px;
    width: 2px;
    background: #1f76ce;
    left: 0;
    right: 0;
    margin: auto;
    top: -30px;
}

.child-item.has-partner.common-blood-relation ul>li:nth-child(2) > ul > li:after {
    display: none;
}
.tree-node.has-child.has-sibling.has-partner.has-child-with-partner.common-blood-relation:after {
    position: absolute;
    content: "";
    height: 100px;
    width: 2px;
    left: 50%;
    top: -30px;
    background: #1f76ce;
}
li.member-connection.common-blood-relation:after {
    position: absolute;
    content: "";
    height: 100px;
    width: 2px;
    background: #1f76ce;
    top: -30px;
    left: 50%;
}
.member-connection.common-blood-relation+li .children-wrapper ul > li > ul >li:after{
    position: absolute;
        content: "";
        height: 100px;
        width: 2px;
        background: #1f76ce;
        top: -30px;
        left: 50%;
}
.member-connection.common-blood-relation+li .children-wrapper ul>li>ul>li.member-connection:after {
    display: none;
}
/* .member-connection.common-blood-relation+li:after{
    position: absolute;
        content: "";
        height: 100px;
        width: 2px;
        background: #1f76ce;
        top: -30px;
        left: 50%;
} */
.member-connection.common-blood-relation+li+.member-connection:after  {
    position: absolute;
    content: "";
    height: 162px;
    width: 2px;
    background: #1f76ce;
    top: 82px;
    left: 0;
}
/* .common-blood-relation:after {
    position: absolute;
    content: "";
    height: 100px;
    width: 2px;
    background: #1f76ce;
    top: -30px;
} */
/* .has-child .common-blood-relation:after{
    display: none;
} */
/* .member-connection:before {
    position: absolute;
    content: "";
    height: 100px;
    width: 2px;
    background: #1f76ce;
    top: -31px;
} */
/* .child-item:before  {
    position: absolute;
    content: "";
    height: 189px;
    width: 1px;
    background: green;
    top: -60%;
    left: 25%;
} */
/* .children-container:before  {
    position: absolute;
    content: "";
    height: 1px;
    width: 80%;
    background: orange;
    top: 37%;
} */
/* .child-item::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    height: 20px;
    width: 2px;
    background-color: #ccc;
} */

/* Standard connector lines */
/* .tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ccc;
    width: 50%;
    height: 90px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ccc;
}

.tree li:only-child::after,
.tree li:only-child::before {
    display: none;
} */

.tree li:only-child {
    padding-top: 0;
}

/* Clean up first and last child borders */
/* .tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
} */

/* Add proper corner rounding */
/* .tree li:last-child::before {
    border-right: 2px solid #ccc;
    border-radius: 0 5px 0 0;
} */

/* .tree li:first-child::after {
    border-radius: 5px 0 0 0;
} */

/* Vertical line above children groups */
/* .tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #ccc;
    width: 0;
    height: 20px;
} */

/* Ex-partner dashed connectors - ONLY override what's needed */
/* .tree li.ex-partner-connection::before {
    border-top: 2px dashed #CCCCCC !important;
} */


/* css for dashed border start */
/* .tree li.ex-partner-connection::after {
    border-left: 2px dashed #CCCCCC !important;
} */

/* Fix the corner for ex-partner last child */
/* .tree li.ex-partner-connection:last-child::before {
    border-right: 2px dashed #CCCCCC !important;
    border-radius: 0 5px 0 0;
} */
/* css for dashed border end */

.tree li .person {
    border: 3px solid #fff;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    display: inline-block;
    border-radius: 15px;
    transition: all 0.3s;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

/* .tree li .person::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
} */

.tree li .person:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Tree node styling */
.tree-node {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.radial-menu-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.profile-img-circle {
    border: 3px solid #ddd;
    transition: all 0.3s ease;
}

.profile-img-circle.male {
    border-color: #1976d2;
}

.profile-img-circle.female {
    border-color: #e91e63;
}

.profile-img-circle.unknown {
    border-color: #ff9800;
}

.ex-partner-member .profile-img-circle.male {
    border: 3px dashed #1976d2 !important;
}

.ex-partner-member .profile-img-circle.female {
    border: 3px dashed #e91e63 !important;
}

.ex-partner-member .profile-img-circle.unknown {
    border: 3px dashed #ff9800 !important;
}

.node-name {
    font-weight: bold;
    margin-top: 8px;
    font-size: 14px;
    margin-right: 0;
}

.node-years {
    font-size: 12px;
    color: #666;
}

.node-details {
    font-size: 10px;
    color: #999;
}

/* Empty tree styling */
.empty-tree {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.gender-plus-container:hover .gender-plus-circle {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}



/* 27-08-2025 */

.modal-content{
    border: 3px solid #ffffff40;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}


/* CSS for zoom in and zoom out and reset (start) 29th Aug, 2025 */
.tree-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.zoom-controls {
    position: fixed;
    /* top: 20px; */
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.zoom-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 8px;
    background: #007bff;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.zoom-btn:active {
    transform: translateY(0);
}

.zoom-level {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 5px 0;
}

.reset-btn {
    background: #28a745;
    font-size: 12px;
    height: 35px;
    width: auto;
    padding: 0 12px;
}

.reset-btn:hover {
    background: #1e7e34;
}

.tree-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    position: relative;
}

.tree-viewport.dragging {
    cursor: grabbing;
}

.tree-content {
    transform-origin: 0 0;
    transition: transform 0.3s ease;
    min-width: 100%;
    min-height: 100%;
    padding: 50px;
}
.top-parents{
    position: relative;
}
.top-parents:before {
    position: absolute;
    content: "";
    height: 20%;
    width: 50%;
    background: none;
    border: 2px solid #2371c2;
    border-top: none;
    top: 123px;
}
.top-parents:after {
    position: absolute;
    content: "";
    height: 24%;
    width: 2px;
    background: #538ecc;
    bottom: -44%;
}
.tree>ul>li:nth-child(2):before  {
    position: absolute;
    content: "";
    height: 2px;
    width: 100%;
    background: #2796ef;
    left: -50%;
    top: 59%;
}
.tree>ul>li:nth-child(2):after {
    position: absolute;
    content: "";
    width: 2px;
    background: #1f76ce;
    left: 0;
    height: 43%;
    top: 59%;
}
li.member-connection.current-partner:before  {
    position: absolute;
    content: "";
    height: 2px;
    width: 100%;
    background: #2476ca;
    top: 36%;
    left: -60%;
}
li.child-item.has-child.has-partner.has-child-with-partner.common-blood-relation .member-connection.current-partner:after  {
    position: absolute;
    content: "";
    height: 100%;
    width: 2px;
    background: #2476ca;
    top: 36%;
    left: 0;
}
.child-item:after  {
    position: absolute;
    content: "";
    height: 140px;
    width: 2px;
    background: #2876c7;
    top: -32px;
    left: 130px;
}
/* li.child-item.has-child.has-partner.has-child-with-partner.common-blood-relation.has-no-child .member-connection.current-partner:after {
    display: none;
} */
/* .child-item:before {
    position: absolute;
    content: "";
    width: 100%;
    height: 115px;
    left: 0;
    border: 2px solid #1f76ce;
    top: -32px;
    border-bottom: none;
    right: 0;
    margin: auto;
} */
/* Responsive design */
@media (max-width: 768px) {
    .zoom-controls {
        top: 10px;
        right: 10px;
        padding: 10px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
/* CSS for zoom in and zoom out and reset (end) 29th Aug, 2025 */
