So I know there are a few stories that take the inspiration of older stories like Cinderella, Alice in Wonderland, Little Red Ridding Hood, etc. and obviously, even using the characters and settings, they’re not considered copyright infringements, but I was wondering if it’s because it’s ok to use stories for inspiration (as well as the characters) if you’re not using the same storyline, or is it because they’re old stories and therefore have lost their copyrights? (I remember learning that after fifty years, the copyrights are gone or something?)
If that’s the case, does a story need to be at least fifty years old in order to take inspiration and characters from a previous story and write your own? Or are any stories and characters allowed to be used for inspiration as long as it’s a different storyline?