#ez-toc-container.custom_toc {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    outline: none;
    box-shadow: none;
    position: static;
    width: 100%;
}

.custom-table-of-contents {
    border-radius: 14px;
    padding: 20px 20px 25px 20px;
    background: #FFF;
    height: fit-content;
    max-height: calc(100svh - 120px);
}

body div#ez-toc-container ul.ez-toc-list a {
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: #999A9A;
}

body div#ez-toc-container ul.ez-toc-list a:visited {
    color: #999A9A;
}

nav:has(ul.ez-toc-list) {
    border-top: 1px solid #DEE3ED!important;
    margin-top: 18px;
    padding-top: 18px;
    max-height: calc(100vh - 195px);
    overflow: hidden;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
}

nav:has(ul.ez-toc-list):hover {
    overflow: auto;
}
nav:has(ul.ez-toc-list)::-webkit-scrollbar {
    width: 1px;
    height: 1px;
    opacity: 0;
}

nav:has(ul.ez-toc-list)::-webkit-scrollbar-thumb {
    border-radius: 1px;
}




.custom-table-of-contents ul.ez-toc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ez-toc-title-container {
    position: absolute;
    top: 20px;
    right: 24px;
}

.ez-toc-icon-toggle-span::after {
    content: '';
    display: inline-block;
    width: 25px; /* Встановіть ширину вашого SVG */
    height: 25px; /* Встановіть висоту вашого SVG */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M18.3056 18.4111H6.69444M8.06667 3H16.9333C18.7069 3 19.5935 3 20.271 3.34515C20.8669 3.64874 21.3513 4.13318 21.6548 4.72903C22 5.40641 22 6.29316 22 8.06667V16.9333C22 18.7069 22 19.5935 21.6548 20.271C21.3513 20.8669 20.8669 21.3513 20.271 21.6548C19.5935 22 18.7069 22 16.9333 22H8.06667C6.29316 22 5.40641 22 4.72903 21.6548C4.13318 21.3513 3.64874 20.8669 3.34515 20.271C3 19.5935 3 18.7069 3 16.9333V8.06667C3 6.29316 3 5.40641 3.34515 4.72903C3.64874 4.13318 4.13318 3.64874 4.72903 3.34515C5.40641 3 6.29316 3 8.06667 3Z' stroke='%23202020' stroke-width='2.11111' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain; /* Забезпечує пропорційне масштабування SVG */
}

.ez-toc-icon-toggle-span svg {
    display: none;
}

body .ez-toc-icon-toggle-span {
    width: 25px;
    height: 25px;
}

body #ez-toc-container .ez-toc-js-icon-con {
    border: 0!important;
    left: 0;
}

body #ez-toc-container a.ez-toc-toggle,
body #ez-toc-container .ez-toc-js-icon-con {
    width: 25px;
    height: 25px;
    padding: 0;
    margin: 0;
}

.custom-table-of-contents__heading {
    font-size: 18px;
    color: #202020;
}

.article__content #ez-toc-container {
    display: none;
}

.ez-toc-link {
    transition: all 0.3s ease;
}

li:has(.ez-toc-link):hover .ez-toc-link,
body div#ez-toc-container ul.ez-toc-list a:hover {
    color: #202029!important;
    text-decoration: none;
}

.ez-toc-link.ez-toc-link-active,
body div#ez-toc-container ul.ez-toc-list a:visited.ez-toc-link-active {
    color: #202029!important;
}

.custom-table-of-contents__sticky {
    position: sticky;
    top: 100px;
}

.custom-table-of-contents ul.ez-toc-list li::before,
.custom-table-of-contents ul.ez-toc-list li::after {
    display: none;
}

.toc-mobile {
    display: none;
}


@media screen and (max-width: 1024.98px) {
    .article__table-of-contents #ez-toc-container {
        width: 100%;
    }

    .custom-table-of-contents__heading {
        font-size: 16px;
    }

    .toc-mobile {
        display: flex;
        position: fixed;
        top: -500px;
    }

    .custom-table-of-contents {
        padding: 16px;
    }

    .ez-toc-title-container {
        top: 15px;
        right: 16px;
    }

    .article__table-of-contents nav {
        transition: all 0.3s ease-out;
    }
    .toc_close nav:has(ul.ez-toc-list) {
        border-top: 0!important;
        padding-top: 0;
        margin-top: 0;
    }
}
