.node {
    direction: rtl;
}

@keyframes blinking-arrow {
    0%   { opacity: 0; }
    50%  { opacity: 1; }
    100% { opacity: 0; }
}

.hasChildren {
    position: relative;
}

.hiddenChildren::after {
    content: "\f103";
    font-family: "fontawesome";
    cursor: pointer;
    color: green;
    font-size: 17px;
    animation: blinking-arrow 2s infinite;
}

.shownChildren::after {
    content: "\f102";
    font-family: "fontawesome";
    cursor: pointer;
    color: red;
    font-size: 17px;
    animation: blinking-arrow 2s infinite;
}

.level0::after {
    content: "";
}

.orgchart-modal {
    direction: rtl;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    display: none;
    border-radius: 8px;
}

.orgchart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.orgchart-modal-title {
    font-size: 18px;
    font-weight: bold;
}

.orgchart-modal-close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
}

.orgchart-modal-separator {
    border-top: 1px solid #ccc;
    margin: 10px 0;
}

.orgchart-modal-body {
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.orgchart-modal-col-image {
    flex: 0 0 auto;
    aspect-ratio: 3 / 4;
    width: 180px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    background: #f0f0f0;
}

.orgchart-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.orgchart-modal-col-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orgchart-modal-col-details div[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: bold;
    margin-left: 5px;
    color: #333;
}

@media (max-width: 768px) {
    .orgchart-modal-body {
        flex-direction: column;
        align-items: center;
    }

    .orgchart-modal-col-image {
        width: 70%;
        max-width: 250px;
    }

    .orgchart-modal-col-details {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .orgchart-modal-col-image {
        max-width: 400px;
    }
}

.orgchart-modal-btn {
    pointer-events: auto;
}