#side-video-container {
    position: fixed;
    bottom: 85px;
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 300px;
    height: auto;
    z-index: 9999;
    background-color: var(--wp--preset--color--yellow-300);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform-origin: bottom right;
    transition: width 0.3s ease, height 0.3s ease, right 0.3s ease;
    max-width: 90vw;
    max-height: 90vh;

    /* Start with the container off-screen */
    transform: translate(100%, 100%);
    opacity: 0;
}

/* Page load slide-in from bottom-right */
#side-video-container.animation {
    animation: slide-in 1s ease-out forwards;
}

/* Horizontal toggle animations */
#side-video-container.show {
    animation: slide-show 0.5s ease-out forwards;
}

#side-video-container.hide {
    animation: slide-hide 0.5s ease-out forwards;
}

/* Prevent unintended interactions */
#side-video-container video {
    pointer-events: none;
}

/* Allow interaction when visible */
#side-video-container.show video {
    pointer-events: auto;
}

/* Define the animation */
@keyframes slide-in {
    0% {
        transform: translate(100%, 100%);
        opacity: 0;
    }

    100% {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes slide-hide {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }

    100% {
        transform: translate(100%, 0);
        opacity: 0;
    }
}

@keyframes slide-show {
    0% {
        transform: translate(100%, 0);
        opacity: 0;
    }

    100% {
        transform: translate(0, 0);
        opacity: 1;
    }
}

#controls-container {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    display: flex;
    justify-content: space-between;
    z-index: 10000;
}

#resize-button,
#close-button {
    width: 30px;
    height: 30px;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    background-color: var(--wp--preset--color--pink-600);
}

#resize-button:hover,
#close-button:hover {
    background-color: var(--wp--preset--color--pink-900);
}

#side-video-container video {
    width: 98%;
    height: auto;
    border-radius: 10px;
    margin-top: 40px;
    margin-bottom: 5px;
}

#video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
    background-color: var(--wp--preset--color--pink-600);
    border-radius: 50%;
    border: 3px solid #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
}

#toggle-button:hover {
    transform: scale(1.1);
}