@import "../new-variables";

#ms-sidebar {
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 175px;

        .title {
            padding-left: 26px;
            font-size: $text-size-small;
            font-weight: $bold;
            letter-spacing: 0.22px;
            color: $light-grey-text-color;
        }

        .scroll-arrow {
            position: relative;
            top: 0;
            width: 50%;
            display: none;
            justify-content: flex-end;
            background-color: #f8fafc;
            pointer-events: auto;
            padding: 5px 0 5px 10px;
            z-index: 1;

            button {
                background: none;
                border: none;
                font-size: 20px;
                cursor: pointer;
                padding-right: 0;
            }
        }
    }

    padding-top: 55px;
    max-height: 640px;
    height: 100%;
    overflow-y: visible;
    overflow-x: visible;

    .ms-list {
        /* Add a class for the expanded module list */
        .module-list {
            display: none;
        }

        .module-list.active {
            display: block;
        }

        &::-webkit-scrollbar {
            width: 1px;
        }

        scrollbar-width: 1px; /* Firefox */
        width: 100%;
        position: relative;
        overflow-y: auto;
        overflow-x: visible;
        scroll-behavior: smooth;
        max-height: 560px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;

        .ms-list-li {
            .microservice-link-a {


                display: flex;
                align-items: center;
                padding: 0 26px;
                color: #040059;
                min-height: 50px;
                background-color: #f8fafc;
                width: 175px;
                height: 100%;
                border: 1px solid #DFEAF7;
                position: relative;

                span {
                    margin-left: 2px;
                }


                &:hover {
                    background-color: $main-color;
                    color: white;
                }

                .active-status{
                        width: 10px;
                    height: 10px;
                    background: #2bc48a;
                    border-radius: 50%;
                    position: absolute;
                    left: 8px;
                    top: calc(50% - 1px);
                    transform:translateY(-50%);
                }
            }

            display: flex;
            flex-direction: column;
            align-items: flex-end;
            justify-content: flex-start;
            height: 100%;
            font-size: 1.2rem;
            letter-spacing: 0.24px;
            margin-bottom: 16px;

            &:not(.active) {
                &:hover {
                    a {
                        background-color: $main-color;
                        color: white;
                    }
                }
            }

            &.active {
                a {
                    width: 200px;
                    background-color: #040059;
                    color: white;
                }
            }

            span {
                letter-spacing: 0.28px;
                font-size: $text-size-normal-bigger;
                font-weight: $bold;
            }

            p {
                font-size: $text-size-small;
                font-weight: $bold;
                letter-spacing: 0.22px;
                color: $light-grey-text-color;
            }

            .module-list {
                .module-link {
                    .active::after{
                        position: absolute;
                        left: 140px;
                        top: 6px;
                        content: "";
                        display: inline-block;
                        width: 0;
                        height: 0;
                        border-style: solid;
                        border-width: 4px 0 4px 6.9px;
                        border-color: transparent transparent transparent #040059;
                    }
                    border-radius: 5px;
                    width: 175px;
                    height: 42px;
                    background-color: #DFEAF7;
                    color: $main-color;
                    font-size: $text-size-normal;
                    letter-spacing: 0.24px;
                    font-weight: $bold;
                    margin-top: 5px;
                    display: flex;
                    align-items: center;
                    justify-content: flex-start;
                    padding-left: 19px;
                    &-a{
                        position: absolute;
                        background-color: #DFEAF7;
                        color: #040059;
                    }
                }
            }
        }
    }
}
