@import 'styles/mat-selectors';

$search-result-height: calc(100% - 60px);

.adf {
    &-permission-result-list {
        display: flex;
        height: $search-result-height;
        overflow: auto;
        border: 2px solid var(--adf-theme-foreground-text-color-007);

        #{$mat-list-item-end} {
            display: none;
        }

        &-elements {
            width: 100%;
        }

        &-search {
            display: none;
        }
    }

    &-list-option-item {
        display: flex;
        flex-direction: row;
        align-items: center;

        .adf-result-name {
            padding-left: 16px;
        }
    }

    &-permission-start-message {
        display: flex;
        align-items: center;
        justify-content: space-around;
        height: $search-result-height;
        overflow: auto;
        border: 2px solid var(--adf-theme-foreground-text-color-007);
    }

    &-permission-no-result {
        display: flex;
        align-items: center;
        justify-content: space-around;
        width: 100%;
    }

    &-permission-search {
        &-input {
            width: 100%;
            padding-bottom: 0;
            padding-top: 12px;

            #{$mat-form-field-wrapper} {
                #{$mat-form-field-flex} {
                    align-items: center;

                    #{$mat-form-field-infix} {
                        padding-top: 0;
                        padding-bottom: 0;
                    }
                }
            }

            #{$mat-form-field-subscript-wrapper} {
                height: 16px;
            }

            .adf-permission-search-input-control {
                &:focus::placeholder {
                    color: var(--theme-primary-color);
                }
            }

            .adf-permission-search-icon:is(mat-icon) {
                padding: 0 0 12px;
                width: 1em;
                height: 1em;
                font-size: 20px;
                cursor: pointer;

                &:hover {
                    color: var(--adf-theme-foreground-base-color);
                }
            }
        }
    }

    &-permission-action {
        &[disabled] {
            opacity: 0.6;
        }

        &:enabled {
            color: var(--theme-primary-color);
        }
    }
}
