         let topConstant = computeTopInsetToText()
         updatePlaceholderConstraint(.top, to: topConstant)
         
-        let leadingConstant = horizontalTextPadding
+        let leadingConstant = computeLeadingInsetToText()
         updatePlaceholderConstraint(.leading, to: leadingConstant)
         
-        let trailingConstant = -leadingConstant
+        let trailingConstant = -computeTrailingInsetToText()
         updatePlaceholderConstraint(.trailing, to: trailingConstant)
     }
     

        placeholderLabel.layer.removeAllAnimations()
        
        let animation = CABasicAnimation(keyPath: "transform")
        let duration = placeholderAnimationDuration ?? Constants.defaultPlaceholderAnimationDuration
        animation.duration = duration
        animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
        let fromValue = placeholderLabel.layer.presentation()?.transform ?? placeholderLabel.layer.transform
        animation.fromValue = fromValue

    
    private func computeRightInsetToText() -> CGFloat {
        
        let inset: CGFloat
        if isRightViewVisible && rightViewPosition == .right {
            inset = bounds.width - rightViewRect(forBounds: bounds).minX + Constants.overlaySpaceToText
        } else if isLeftViewVisible && leftViewPosition == .right {
            inset = bounds.width - rightViewRect(forBounds: bounds).minX + Constants.overlaySpaceToText
        } else if isClearButtonVisible() && clearButtonPosition == .right {
            inset = bounds.width - clearButtonRect(forBounds: bounds).minX + Constants.overlaySpaceToText
        } else {
            inset = horizontalTextPadding
        }
        
        return inset
    }
    
    private func computeLeadingInsetToText() -> CGFloat {
        
        if textAlignment == .natural && UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft {
            return computeRightInsetToText()
        } else {
            return computeLeftInsetToText()
        }
    }
    
    private func computeTrailingInsetToText() -> CGFloat {
        
        if textAlignment == .natural && UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft {
            return computeLeftInsetToText()
        } else {
            return computeRightInsetToText()
        }
    }
    
