/* ================= ORG CHART ONLY ================= */

#chart-wrapper {
    width: 100%;
    height: 80vh;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    margin: 30px auto;
    border-radius: 16px;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

#chart-wrapper:active {
    cursor: grabbing;
}

/* ================= CONTROLS ================= */
#chart-wrapper #chart-controls {
    position: absolute;
    top: 14px;
    left: 18px;
    z-index: 20;
    display: flex;
    gap: 8px;
}

#chart-wrapper #chart-controls button {
    background: linear-gradient(135deg, #2c3e50, #1f2a36);
    color: #fff;
    border: none;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    min-width: 55px;
    font-weight: 600;
}

/* ================= CONTAINER ================= */
#chart-wrapper #chart-container {
    position: absolute;
    top: 8%;
    left: 50%;
    transform-origin: top center;
    transform: translateX(-50%) scale(0.4);
    width: max-content;
    height: max-content;
}

/* ================= PERSON CARD ================= */
#chart-wrapper .person-box {
    background: linear-gradient(180deg, #ffffff, #fafafa);
    border-radius: 16px;
    padding: 16px 14px;
    width: 210px;
    text-align: center;
    margin: 22px auto;
    position: relative;
    transition: all 0.35s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

#chart-wrapper .person-box:hover {
    transform: scale(2.2);
    z-index: 999;
}

/* ================= TEXT ================= */
#chart-wrapper h5,
#chart-wrapper h6 {
    font-weight: 700;
}

#chart-wrapper small {
    font-weight: 500;
    color: #666;
}

/* ================= PHOTO ================= */
#chart-wrapper .person-photo {
    width: 82px;
    height: 125px;
    border-radius: 40%;
    object-fit: cover;
    border: 2px solid #e6e6e6;
    margin-bottom: 6px;
    background: #fff;
}

/* ================= LINES ================= */
#chart-wrapper .line-down {
    width: 3px;
    height: 70px;
    background: linear-gradient(to bottom, #aaa, #777);
    margin: 0 auto;
    border-radius: 2px;
}

/* ================= DEPUTIES ================= */
#chart-wrapper .deputy-scroll {
    width: 100%;
    white-space: nowrap;
    padding-bottom: 30px;
}

#chart-wrapper .deputy-row {
    display: inline-flex;
    gap: 50px;
    padding-inline: 40px;
    position: relative;
}

#chart-wrapper .deputy-row::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: calc(100% - 80px);
    background: linear-gradient(to right, #aaa, #777);
    border-radius: 2px;
}

#chart-wrapper .deputy-box {
    width: 210px;
    text-align: center;
    position: relative;
}

#chart-wrapper .deputy-box::before {
    content: "";
    width: 3px;
    height: 18px;
    background: linear-gradient(to bottom, #aaa, #777);
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
}

/* ================= CHILDREN ================= */
#chart-wrapper .line-child-down {
    width: 3px;
    height: 26px;
    background: linear-gradient(to bottom, #999, #666);
    margin: 0 auto;
}

#chart-wrapper .children-container {
    margin-top: 18px;
    border-right: 3px dashed #aaa;
    margin-right: 45px;
    padding-right: 22px;
}
