@use "./colors" as *;
@use "./fonts" as *;

#dropdown-trigger {
    height: 1.5rem;
    background: white;
    border-radius: 2px;
    border: 1px solid $lightGray-8;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    &:disabled {
        background-color: $gray74;
        opacity: 0.5;
        & .placeholder,
        .icon {
            color: #000;
        }
    }
}

.placeholder {
    color: $gray74;
    width: 100%;
    @include fonts(Roboto, var(--dropdown-text-fs), normal, normal, normal, normal, normal);
    opacity: 1 !important;
}

// #dropdown-trigger:disabled .placeholder {
//   color: #000;
// }

.icon {
    font-size: 1.125rem;
    float: right;
    margin-left: auto;
}

.search-bar {
    margin: 0 7px 8px 7px;
    border: 1px solid $pinkSwan;
    height: 24px;
    border-radius: 2px;
    input {
        outline: none;
        border: none;
        position: relative;
        bottom: 4px;
        width: calc(100% - 29px);
        font-size: var(--dropdown-text-fs);
    }

    .search-icon {
        font-size: var(--multi-select-dropdown-checkbox-fs);
        color: $lightGray-7;
        margin: 5px;
    }

    .close-icon {
        cursor: pointer;
    }
}

ul {
    overflow-y: auto;
    padding-left: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    max-height: calc(50vh - 80px) !important;
}

li {
    list-style-type: none;
    cursor: pointer;
    padding-inline: 10px;
    @include fonts(Roboto, var(--dropdown-text-fs), normal, normal, normal, 2.14, normal);
    color: #4a4a4a;
    @extend .ellipsify;
    width: 100%;
}

ul::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

ul::-webkit-scrollbar-track {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

ul::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

li:hover {
    // color: white;
    background: #ebebeb;
}

li.active {
    color: white;
    background: $primary-color;
}

span.selected-item {
    background: transparent;
    @include fonts(Roboto, var(--dropdown-text-fs), normal, normal, normal, normal, normal);
    color: #4a4a4a;
    @extend .ellipsify;
    width: calc(100% - 22px);
    display: inline-block;
    vertical-align: middle;
}

.ellipsify {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

::ng-deep .cdk-overlay-container {
    z-index: 1051;
}
