.tree-active {
    color: #027BFF;
}


.tree summary.no-children::before {
    background: #666666 url("expand-collapse.svg") 0 0;
    z-index: 1;
}


/* โค้ดเดิมที่ใช้ตกแต่งเส้น */
.tree ul {
    list-style: none;
    padding: 0;
}

.tree li {
    position: relative;
    padding-left: calc(1.5 * var(--spacing));
}

.tree li::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(var(--spacing) - 1px);
    height: 100%;
}

/* แก้ไขส่วนนี้เพื่อใช้เครื่องหมาย +/- แทนรูปภาพ */
.tree summary::before {
    background: #669966;
    border-radius: 50%;
    content: "+";
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    font-size: 1.2rem;
    font-weight: bold;
}

/* เมื่อคลิกแล้วเปลี่ยนเป็นเครื่องหมายลบ */
.tree details[open]>summary::before {
    content: "-";
    background-color: #669966;
}

.tree ul li {
    border-left: none;
}

.sl-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}
/* Loading */
/* .loading {
    display: flex;
    justify-content: center;
}

.loading div {
    width: 1rem;
    height: 1rem;
    margin: 2rem 0.3rem;
    background: #979fd0;
    border-radius: 50%;
    -webkit-animation: 0.9s bounce infinite alternate;
    animation: 0.9s bounce infinite alternate;
}

.loading div:nth-child(2) {
    -webkit-animation-delay: 0.3s;
    animation-delay: 0.3s;
}

.loading div:nth-child(3) {
    -webkit-animation-delay: 0.6s;
    animation-delay: 0.6s;
}

@-webkit-keyframes bounce {
    to {
        opacity: 0.3;
        transform: translate3d(0, -1rem, 0);
    }
}

@keyframes bounce {
    to {
        opacity: 0.3;
        transform: translate3d(0, -1rem, 0);
    }
}

.donut {
    width: 2rem;
    height: 2rem;
    margin: 2rem;
    border-radius: 50%;
    border: 0.3rem solid rgba(151, 159, 208, 0.3);
    border-top-color: #979fd0;
    -webkit-animation: 1.5s spin infinite linear;
    animation: 1.5s spin infinite linear;
}

.donut.multi {
    border-bottom-color: #979fd0;
}

@-webkit-keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.ripple {
    width: 2rem;
    height: 2rem;
    margin: 2rem;
    border-radius: 50%;
    border: 0.3rem solid #979fd0;
    transform: translate(50%);
    -webkit-animation: 1s ripple ease-out infinite;
    animation: 1s ripple ease-out infinite;
}

@-webkit-keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }

    to {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }

    to {
        transform: scale(1);
        opacity: 0;
    }
}

.multi-ripple {
    width: 2.6rem;
    height: 2.6rem;
    margin: 2rem;
}

.multi-ripple div {
    position: absolute;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 0.3rem solid #979fd0;
    -webkit-animation: 1.5s ripple infinite;
    animation: 1.5s ripple infinite;
}

.multi-ripple div:nth-child(2) {
    -webkit-animation-delay: 0.5s;
    animation-delay: 0.5s;
}

.fancy-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
}

.fancy-spinner div {
    position: absolute;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
}

.fancy-spinner div.ring {
    border-width: 0.5rem;
    border-style: solid;
    border-color: transparent;
    -webkit-animation: 2s fancy infinite alternate;
    animation: 2s fancy infinite alternate;
}

.fancy-spinner div.ring:nth-child(1) {
    border-left-color: #979fd0;
    border-right-color: #979fd0;
}

.fancy-spinner div.ring:nth-child(2) {
    border-top-color: #979fd0;
    border-bottom-color: #979fd0;
    -webkit-animation-delay: 1s;
    animation-delay: 1s;
}

.fancy-spinner div.dot {
    width: 1rem;
    height: 1rem;
    background: #979fd0;
}

@-webkit-keyframes fancy {
    to {
        transform: rotate(360deg) scale(0.5);
    }
}

@keyframes fancy {
    to {
        transform: rotate(360deg) scale(0.5);
    }
} */

.loading-overlay {
    /* ทำให้ overlay ครอบคลุมทั้งหน้าจอ */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* ทำให้พื้นหลังโปร่งแสงเล็กน้อย */
    background-color: rgba(255, 255, 255, 0.8);

    /* จัดตำแหน่ง loading indicator ให้อยู่กึ่งกลาง */
    display: flex;
    justify-content: center;
    align-items: center;

    /* ให้ loading overlay อยู่เหนือทุกอย่าง */
    z-index: 9999;
}

/* CSS สำหรับ Donut ของคุณ */
.donut {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #3498db; /* สีของส่วนที่หมุน */
  animation: spin 1s infinite linear; /* เพิ่ม animation */
}

/* สร้าง animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}