.unit {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;

    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding: 7px 0 6px;

    line-height: 1.3;
    user-select: none;
}

.unit__avatar {
    position: relative;

    flex: 0 0 auto;

    margin-right: 10px;
}

.unit__avatar-tooltip {
    display: inline-block;
}

.unit__avatar-tooltip-content {
    box-sizing: border-box;
    width: 273px;
    padding: 12px 16px;

    font-size: 15px;
    line-height: 19px;

    background-color: #fff;
}

.unit__avatar-tooltip .ui-tip {
    top: 0;
    left: calc(100% - 3px);
}

.unit__avatar-tooltip .ui-tip__tail {
    top: 17px;
    left: -3px;
}

.unit .avatar {
    border-radius: 50%;
    background-color: #e8e8e8;
}

.unit_type-user .unit__avatar {
    position: relative;
}

.unit_type-user .unit__avatar::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    content: '';

    opacity: 1;
    background: url('../../../static/i/empty-avatar.png') 50% 50%/contain no-repeat;

    transition: opacity .5s;
}

.unit_type-user .unit__avatar .avatar {
    opacity: 0;
    background-color: transparent;

    transition: opacity .5s;
}

.unit_type-user .unit__avatar_complete {
    background: none;
}

.unit_type-user .unit__avatar_complete::after {
    opacity: 0;
}

.unit_type-user .unit__avatar_complete .avatar {
    opacity: 1;
}

.unit__details {
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
}

.unit__title {
    overflow: hidden;

    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.unit__title_link {
    cursor: pointer;
}

.unit__title_link:hover {
    text-decoration: underline;
}

.unit_type-department .unit__title,
.unit_type-group .unit__title {
    font-size: 15px;
}

.unit__description {
    overflow: hidden;

    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: #adadad;
}

.unit__description:empty {
    display: none;
}

.unit_size-m .unit__avatar {
    margin-right: 12px;
}

.unit_size-m .unit__details {
    font-weight: normal;
}

.unit_size-m .unit__title {
    font-size: 16px;
}

.unit_size-m .unit__description {
    font-size: 13px;

    color: #939393;
}

.unit_size-l .unit__avatar {
    margin-right: 18px;
}

.unit_size-l .unit__details {
    line-height: 1.5;
}

.unit_size-l .unit__title,
.unit_size-l .unit__description {
    font-size: 16px;
}

.unit_size-l .unit__title {
    font-weight: bold;
}
