/* ---------------------------------------------------- */
/* Global Reset and Node Style */
/* ---------------------------------------------------- */
.org-chart-block{
    width: auto;
    position: relative;
    overflow: auto;
}
.org-chart .btn.btn-icon.btn-sm {
    height: calc(1em + 1rem + 0px);
    width: calc(1em + 1rem + 0px);
}

.org-chart {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.org-chart .family{
    display: flex;
    flex-direction: column;
    justify-items: center;
    align-items: center;
}
.org-chart > .parent{
    justify-content: space-between;
    width: 100%;
}
.org-chart .parent{
    display: flex;
    justify-content: space-around;
    position: relative;
    width: 100%;
}
.org-chart .parent .parent-control{
    position: absolute;
    z-index: 9;
    display: flex;
    justify-content: center;
    background-color: var(--bs-body-bg) !important;
    padding: 2px;
    top: -13px;
}
.org-chart .parent > .family{
    flex: 1;
}
.node {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bs-body-bg) !important;
    margin: 30px 0px 30px;
    position: relative;
    padding-top: 10px;
}
.org-chart .node .pic{
    width: 150px;
    height: 150px;
    border-radius: 50%;

    /* Set border to transparent and use background-clip */
    border: 5px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;

    /* Define the gold gradient for the border */
    background-image: linear-gradient(to right, #655905, #FCF6BA, #AA8E43, #b3a43b), linear-gradient(to right, #cfb811, #FCF6BA, #AA8E43, #aba06a);

    /* Optional: center content if needed */
    display: flex;
    justify-content: center;
    align-items: center;
}
.org-chart .node .avatar{
    width: 100%;
    height: 100%;
    min-width: 50px;
    min-height: 50px;
    background-image: url(../img/no-image/no-user.png);
    border-width: 7px;
    border-color: #dfdfd9;

}
/*.org-chart .node.lvl-0 .avatar{
    width:6vw;
    height: 6vw;
}
.org-chart .node.lvl-1 .avatar{
    width: 5.5vw;
    height: 5.5vw;
}
.org-chart .node.lvl-2 .avatar{
    width: 4.5vw;
    height: 4.5vw;
}
.org-chart .node.lvl-3 .avatar{
    width: 4vw;
    height: 4vw;
}*/

.org-chart .node .info{
    text-align: center;
    white-space: nowrap;
    padding: 10px 0 0;
    width: 100%;
}
.org-chart .node .info .name{
    font-weight: bold;
    position: relative;
    border-bottom: 1px solid transparent; /* Set a transparent solid border as a fallback */
    border-image: linear-gradient(to right, #FFD700, #DAA520, #B8860B) 1;
    padding: 5px 20px;
    padding-top: 5px;
    width: 100%;
}

.org-chart .node .info .name:before{
    content: "";
    width: 8px;
    height: 8px;
    position: absolute;
    left: 0;
    bottom: -4px;
    background-color: #FFD700;
    /*border-radius: 50%;*/
    rotate: 45deg;
}
.org-chart .node .info .name:after{
    content: "";
    width: 8px;
    height: 8px;
    position: absolute;
    right: 0;
    bottom: -4px;
    background-color: #B8860B;
    /*border-radius: 50%;*/
    rotate: -45deg;
}
.org-chart .node .info .position{
    color: var(--bs-gray-800);
    margin-top: 5px;
    padding: 0 10px;
}
.org-chart .node .info .mobile{
    color: var(--bs-gray-600);
    margin-top: 5px;
}
.org-chart .node .control{
    position: absolute;
    top: -10px;
    right: 0;
    opacity: 0;
    transition: 0.3s;
}
.org-chart .node:hover .control{
    opacity: 1;
    top: 0;
}
@media (max-width: 991px) {
    .org-chart .node .pic{
        width: 100px;
        height: 100px;
    }
    .org-chart .parent {
        display: flex;
        flex-wrap: wrap;
    }
}
.org-chart .node.add .avatar{
    background-image: url('../img/no-image/no-user-plus.png');
    cursor: pointer;
}
.org-chart .node.add .info{
    display: none;
}
.dynamic-line {
    position: absolute;
    width: 5px; /* ความหนาของเส้น (จะถูกแทนที่ด้วยความยาวเมื่อเป็นแนวนอน) */
    background-color: var(--bs-body-bg);
    transform-origin: 0 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}
