.c-finder-leaf {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calculateRem(7px) calculateRem(20px) calculateRem(7px) calculateRem(8px);
    position: relative;

    &:hover {
        background-color: $ibexa-color-base-medium;

        .c-toggle-selection-button {
            opacity: 1;
        }
    }

    &--has-children:after {
        content: '';
        width: 0;
        height: 0;
        border-top: calculateRem(5px) solid transparent;
        border-left: calculateRem(8px) solid $ibexa-color-base-dark;
        border-bottom: calculateRem(5px) solid transparent;
        position: absolute;
        right: calculateRem(5px);
        top: 50%;
        transform: translateY(-50%);
    }

    &--marked {
        font-weight: bold;
        background-color: $ibexa-color-base-medium;
        color: $ibexa-color-primary;

        &:hover {
            background-color: $ibexa-color-base-medium;
        }

        &.c-finder-leaf--not-selectable {
            background-color: $ibexa-color-base-medium;

            &:hover {
                background-color: $ibexa-color-base-medium;
            }
        }

        .c-toggle-selection-button {
            &--selected {
                background-color: $ibexa-color-primary;

                .ez-icon {
                    fill: $ibexa-white;
                }
            }
        }

        &.c-finder-leaf--has-children:after {
            border-left-color: $ibexa-color-primary;
        }

        .c-finder-leaf__name {
            .ez-icon {
                fill: $ibexa-color-primary;
            }
        }
    }

    &--not-selectable {
        background-color: $ibexa-color-base-light;
        cursor: not-allowed;

        &:hover {
            background-color: $ibexa-color-base-light;
        }
    }

    &__name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: calculateRem(16px);

        .ez-icon {
            margin-right: calculateRem(5px);
        }
    }

    &__icon-wrapper {
        position: relative;
        margin-right: calculateRem(20px);
        text-align: center;

        .ez-icon {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            margin-top: calculateRem(-1px);
        }
    }
}
