.table-of-content-widget {
    position: relative;
    justify-self: center;
    width: 752px;
    background-color: var(--Gray-Gray-100, #161616);
    display: flex;
    padding: 24px;
    flex-direction: column;
    border-radius: 12px;
}

.table-of-content-widget:not(.active) {
    cursor: pointer;
}

.table-of-content-widget.active {
    padding-bottom: 40px;
}

.table-of-content-widget .toc-toggle-button {
    position: absolute;
    top: 20px;
    right: 32px;
    width: 36px;
    height: 36px;
    background-image: url(assets/open.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: 0.3s;
}

.table-of-content-widget:not(.active) .toc-toggle-button {
    filter: grayscale(0.8);
    rotate: 10deg;
    transform: scale(0.8);
    transition: 0.3s;
}

.table-of-content-widget:not(.active):hover .toc-toggle-button {
    filter: grayscale(0);
    rotate: 0deg;
    transform: scale(1);
    transition: 0.3s;
}

.table-of-content-widget.active .toc-toggle-button {
    background-image: url(assets/close.svg);
    border-radius: 50%;
    transition: 0.3s;
}

.table-of-content-widget h4.table-title {
    color: var(--Gray-Gray-700, #DDD);
    font-family: "Hanken Grotesk";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    margin: 0;    
}

.table-of-content-widget ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    max-height: 0;
    pointer-events: none;
    opacity: 0;
    transition:
        opacity 0.15s,
        max-height 0.3s,
        padding-top 0.3s;
}

.table-of-content-widget.active ul {
    padding-top: 24px;
    max-height: none;
    pointer-events: all;
    opacity: 1;
    transition:
        opacity 0.3s,
        max-height 0.3s,
        padding-top 0.3s;
}

.table-of-content-widget ul li.h2 {
    padding-left: 16px;
    font-size: 16px;
}

.table-of-content-widget ul li.h3 {
    padding-left: 32px;
    font-size: 14px;
}

.table-of-content-widget ul li.h4 {
    padding-left: 48px;
    font-size: 12px;
}


.table-of-content-widget ul li.h5 {
    padding-left: 56px;
    font-size: 11px;
}


.table-of-content-widget ul li.h6 {
    padding-left: 60px;
    font-size: 10px;
}

.table-of-content-widget ul li a {
    color: var(--Gray-Gray-700, #DDD);
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-color: grey;
}

.table-of-content-widget ul li a:hover {
    color: var(--Default-White, #FFF);
    text-decoration-color: white;
    transition: 0.3s;
}

@media (max-width: 600px) {
    .table-of-content-widget {
        width: 100%;
        padding: 16px;
    }
    .table-of-content-widget h4.table-title {
        font-size: 18px;
    }
    .table-of-content-widget .toc-toggle-button{
        top: 12px;
        right: 16px;
        width: 30px;
        height: 30px;
    }
    .table-of-content-widget:not(.active) .toc-toggle-button{
        filter: grayscale(0);
        rotate: 0deg;
        transform: scale(1);
    }
    .table-of-content-widget ul li.h2 {
        padding-left: 0px;
    }
    .table-of-content-widget ul li.h3 {
        padding-left: 16px;
    }
    .table-of-content-widget ul li.h4 {
        padding-left: 32px;
    }
    .table-of-content-widget ul li.h5 {
        padding-left: 40px;
    }
    .table-of-content-widget ul li.h6 {
        padding-left: 44px;
    }
}