@use '/src/components/config' as *;

.toggle-setting-container{
    ul{
        position: relative;
        padding: 0.5rem;
        border: .063rem solid #d4d1d9;
        border-radius: $border-radius-small;
        display: flex;
        gap: 0.5rem;
        align-items: center;
        overflow: hidden;
        width: max-content;
        margin: 0;

        li{
            list-style-type: none;
            margin: 0;

            input[type="radio"]{
                display: none; // for radio button hide
            }

            input:checked + label{
                background: $color-active;
                color: $menu-color;
                border-color: $color-active;
            }

            label{
                color: #181718;
                font-size: 0.9rem;
                line-height: 2.2;
                text-align: center;
                padding: 0.4rem 0.7rem;
                border-radius: $border-radius-small;
                border: .063rem solid #d4d1d9;
                transition: .1s ease-in-out;
            }
        }
    }
}
div:has(.exclusion-modal) {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100%;
    height: 100%;
    background-color: rgba($color: #000000, $alpha: 0.3) !important;

    .exclusion-modal {
        max-width: 31.25rem;
        height: 25rem;
        width: 100%;
        background-color: #fff;
        border-radius: 0.25rem;
        box-shadow: 0 0 1rem rgba(255, 255, 255, 0.125);
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.75rem;
        flex-direction: column;
        padding: 3rem 2rem 2rem;
        margin: 1rem;
        position: relative;

        *{
            box-sizing: border-box;
        }

        .modal-close-btn{
            position: absolute;
            top: 0.625rem;
            right: 0.625rem;
            width: 1.875rem;
            height: 1.875rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: $color-active;
            background-color: #f2eeee;
            border-radius: 0.25rem;
            cursor: pointer;
            user-select: none;
        }

        .selected-container {
            border: 0.115rem solid rgba(0, 0, 0, 0.125);
            border-radius: 0;
            min-height: 2.5rem;
            padding: 0.5rem 0.5rem;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.25rem;
            background-color: #fff;
            position: relative;
            width: 100%;
            height: auto;

            .selected-items-container {
                display: flex;
                height: 100%;
                align-items: center;
                justify-content: flex-start;
                gap: 0.25rem;
                max-width: calc(100% - 1.25rem);
                width: 100%;
                flex-wrap: wrap;
                overflow: hidden;

                .selected-items {
                    max-width: 5rem;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    gap: 0.25rem;
                    padding: 0.15rem 0.25rem;
                    border-radius: 0.25rem;
                    font-size: 0.75rem;
                    background: #f2eeee;
                    width: 100%;

                    span {
                        text-overflow: ellipsis;
                        overflow: hidden;
                        max-height: 1.25rem;
                        height: 100%;
                        text-overflow: ellipsis;
                        overflow: hidden;

                    }

                    button {
                        background: transparent;
                        padding: 0;
                        cursor: pointer;
                    }
                }
            }

            .container-items-controls {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 1.25rem;
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                right: 0.313rem;

                .clear-all-data {
                    background: transparent;
                    border-radius: 50%;
                    transition: all 0.3s linear;
                    cursor: pointer;
                    width: 1.25rem;
                    height: 1.25rem;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    padding: 0;
                    font-size: 0.75rem;

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


        }

        .selected-input {
            position: relative;
            width: 100%;

            input {
                background: $color-white;
                margin: 0;
                width: 100%;
                height: 2.5rem;
                border: 0.115rem solid rgba(0, 0, 0, 0.125);
                border-radius: 0;
                padding: 0.25rem 0.5rem;
                font-size: 0.875rem;
                line-height: 1.5714285714;

                &:focus {
                    outline: none;
                }
            }

            span {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                right: 0.313rem;

                i {
                    font-size: 1.15rem;
                }
            }
        }

        .option-container {
            max-height: 16.25rem;
            height: auto;
            overflow-y: scroll;
            width: 100%;
            background: #fff;
            display: flex;
            padding: 0.5rem;
            border: 0.115rem solid rgba(0, 0, 0, 0.125);
            flex-direction: column;
            gap: 0.25rem;

            &::-webkit-scrollbar{
                width: 0.5rem;
                margin: 0;
            }
            &::-webkit-scrollbar-thumb{
                background-color: $color-active;
                border-radius: 0.25rem;
            }

            .options-item {
                cursor: pointer;
            }

        }
    }
}