@import '~@gravity-ui/uikit/styles/mixins';
@import '../../styles/mixins.scss';

.dialog-related-entities {
    $class: &;
    width: 720px;
    max-height: 95vh;
    min-height: 590px;

    &__body {
        display: flex;
        flex-direction: column;
        gap: var(--g-spacing-5);
        align-items: flex-start;
        padding: 0 var(--g-spacing-3) 0 var(--g-spacing-8);
    }

    &__loader {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 1;
    }

    &__list {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: var(--g-spacing-6);
        flex: 1;
    }

    &__empty-state,
    &__error-state {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    &__direction-row {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    &__relations-count {
        @include text-subheader-1;
        position: sticky;
        bottom: 0;
        background-color: var(--g-color-base-modal);
        padding: var(--g-spacing-3) 0 var(--g-spacing-8) 0;
        width: 100%;
    }

    &__relations-title {
        @include text-subheader-2;
    }

    &__current-row {
        position: sticky;
        top: 0;
        background-color: var(--g-color-base-modal);
        padding-top: var(--g-spacing-3);
        padding-bottom: var(--g-spacing-1);
    }

    &__entry-menu {
        margin-left: auto;
        padding-right: var(--g-spacing-1);
        opacity: 0;
        transition: opacity 0.2s ease-in-out;
    }

    &__entity-row {
        &:hover #{$class}__entry-menu {
            opacity: 1;
        }

        padding-left: var(--g-spacing-half);
    }

    &__button-retry {
        margin: auto;
        margin-top: var(--g-spacing-5);
    }
}
