body {
    height: 100vh;
    width: 100%;
    padding: none;
    display: flex;
    flex-shrink: 0;
}

main {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    box-sizing: border-box;
    padding-top: 50px;
    font-family: var(--font-body);
    width: 100%;
    max-width: 800px;
    max-height: calc(100vh - 180px);
}

main>h1 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 10px;
    width: 100%;
}

main>h1:after {
    content: "";
    display: block;
    width: 100%;
    align-self: center;
    height: var(--height);
    background: rgba(var(--text), 0.2);
    margin: 20px 0px 0px 0px;
    animation: length ease-in-out 1s;
}

@keyframes length {
    0% {
        width: 0%;
    }

    q 100% {
        width: 100%;
    }

}

.doc {
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: start;
    width: 100%;
    height: 100%;
}

.output {
    overflow-y: auto;
    scrollbar-color: rgba(var(--text), 0.25) rgba(var(--text), 0.05);
    margin-left: 10px;
    padding: 10px;
    border: solid 1px rgba(var(--text), 0.2);
    max-width: 100%;
    width: 100%;
    min-width: 0%;
    height: 100%;
}

/* change the darkmode style of the scroll bar for output */

.output::-webkit-scrollbar {}

.tree {
    width: 200px;
    padding: 10px;
    border-radius: 0px;
    border: solid 1px rgba(var(--text), 0.2);
    height: fit-content;
}

.tree-base {
    width: 100%;
    margin-bottom: 4px;
}

.tree-base p {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tree-base:hover {
    cursor: pointer;
}

.tree-base:has(> .tree-child-container.active)>p .icon {
    transform: scaley(-1);
}

.tree-base:has(> .tree-child-container.active)>p * {
    color: rgb(var(--text));
}

.tree-child-container {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    font-family: var(--font-body);
    width: 100%;
    max-height: 0px;
    overflow: hidden;
}

.tree-child-container.active {
    max-height: 100000%;
    padding: 5px;
}

.tree-child {
    margin-left: 10px;
    padding-left: 5px;
    border-radius: 0px;
    border-bottom: solid 1px transparent;
    transition: ease-in-out 0.2s;
    width: calc(100% - 10px);
    color: rgba(var(--text), 0.5);


}

.tree-child.active {
    color: rgba(var(--text), 0.8);
    background: rgb(var(--text), 0.07);
}

.tree-child.active:hover {
    background: rgb(var(--text), 0.07);
}

.tree-child:hover {
    background: rgb(var(--text), 0.03);
    cursor: pointer;
}

.icon {
    width: 15px;
    height: 15px;
    transition: transform 0.2s;
}

.icon * {
    color: rgb(var(--text), 0.4);
}




.nested-tree-base {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    width: 100%;
    padding-left: 10px;
}


.nested-tree-base {
    width: 100%;
    padding-right: 10px;
}

.nested-tree-base p {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tree-base:hover {
    cursor: pointer;
}



.nested-tree-base:has(> .nested-tree-child-container.active) .icon {
    transform: scaley(-1);
}

.nested-tree-base:has(> .nested-tree-child-container.active) .icon * {
    color: rgb(var(--text));
}

.nested-tree-child-container {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    font-family: var(--font-body);
    width: 100%;
    max-height: 0px;
    overflow: hidden;
}

.nested-tree-child-container.active {
    max-height: 100000%;
}






/*/ coumentation styles /*/







.doc-text {
    font-family: var(--font-body);
    font-size: 1.5rem;
}

.doc-content-text {
    font-size: .7rem;
    max-width: 700px;
    color: rgba(var(--text), 0.6);
    margin-bottom: 20px;
}

.description {
    font-size: .7rem;
    margin: 10px 0px;
    max-width: 700px;
    color: rgba(var(--text), 0.6);
}

.small-label {
    font-size: 1rem;
    color: rgba(var(--text));
    margin-bottom: 5px;
}

.code-snippet {
    border: solid 1px rgba(var(--text), 0.2);
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: visible;

    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    width: 100%;
    max-width: 100%;
}

.code-snippet-info {
    /* disable copying */
    user-select: none;
    display: flex;
    overscroll-behavior: auto;
    justify-content: space-between;
    align-items: center;
    color: rgba(var(--text), 0.5);
    padding: 5px;
    margin-inline: 5px;
    border-bottom: solid 1px rgba(var(--text), 0.2);
}

.code-snippet-info span {
    font-size: .7rem;
    color: rgba(var(--text), 0.5);
}

.copy-button:hover {
    cursor: pointer;
    color: rgba(var(--text));
}

.doc-content-list {
    display: flex;
    flex-direction: column;
    align-items: start;
    font-size: .7rem;
    justify-content: start;
    font-family: var(--font-body);
    border: solid 1px rgba(var(--text), 0.2);
    list-style: "- ";
    padding: 5px 20px;
    margin-bottom: 20px;
}

.doc-content-list li {
    color: rgba(var(--text), 0.6);
}

.doc-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

pre code.hljs {
    background: none;
    max-width: 100%;
    font-size: .6rem;

    overflow-x: auto;
    overflow-y: visible;

    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
}

@media screen and (max-width: 600px) {
    .output {
        margin: 0;
    }

    .doc {
        flex-direction: column;
        align-items: start;
        justify-content: start;
    }

    .tree {
        margin-bottom: 10px;
        width: 100%;
    }

    .tree-child-container div {
        width: 100%;

    }

    .doc-text {
        font-size: 1.2rem;
    }

    .doc-content-text {
        font-size: .6rem;
    }

    .description {
        font-size: .6rem;
    }

    .small-label {
        font-size: .8rem;
    }

    .code-snippet {
        font-size: .6rem;
    }

    .doc-content-list {
        font-size: .6rem;
    }
}