You are still doing things without thinking about how they work.
You have a transition on the element when the slide class has been added but that is to late as there is no change from one thing to another. You also duplicate the content property when there is no need.
You need something like this:
.video-wrapper::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
border: 1px solid #333;
pointer-events: none;
background: url(https://i.imgur.com/ShS6nAO.png) no-repeat;
background-size: contain;
background-position: center;
transition: all 2s ease-in;/* transition needs to be on the default state for a transition to occur when the class is added and a property changed*/
opacity:1;
}
.video-wrapper.slide::after {
opacity:0;
/*content: "";
animation: border 1s ease-in 1 forwards;*/
/*border: 1px solid #0059dd;
transition: border 2s ease-in;*/
}
I don’t know what you were doing with the border but it would have no effect other than applying a border when the play button was clicked?
You said you wanted to hide the green so I assumed you wanted to hide that element.
I’m not sure why you have an image for the green background but if it has to be an image then you can’t fade an image like you can a background-color. That’s why I just set the whole thing to opacity zero.
If you want the border to stay then you can hide the image but it will be instant unless you move the image to another element and then use opacity as I just showed.
If you want the image to fade out then you’ll need an extra element to hold the image at the end of video-wrapper as all the pseudo elements are already in use. You can then use opacity without losing the border.