.video-popup-container {
    display: none;
}

.video-popup-container.active {
    display: block;
}

.video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999;
}

.video-popup {
    position: fixed;
    top: 40px;
    width: fit-content;
    height: fit-content;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    z-index: 1000;
    border: 1px solid #000;
    box-sizing: border-box;
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 80px);
    min-height: 300px;
    border-radius: 13px;
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-popup>.video-popup-iframe-container {
    width: fit-content;
    height: fit-content;
    position: relative;
}

.video-popup iframe {
    width: min(calc((100vh - 178px) * 16/9), calc(100vw - 180px));
    height: min(calc(100vh - 178px), calc((100vw - 180px) * 9/16));
}

.video-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    cursor: pointer;
}

.video-popup-close svg {
    width: 24px;
    max-height: 25px;
}

.video-popup-close svg path {
    fill: #cdccda;
}

@media screen and (max-width: 768px) {
    .video-popup {
        padding: 50px 20px;
        max-width: 100%;
        max-height: fit-content;
        height: 100%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .video-popup iframe {
        width: min(calc((100vh - 40px) * 16/9), calc(100vw - 40px));
        height: min(calc(100vh - 40px), calc((100vw - 40px) * 9/16));
    }
}

@media screen and (max-width: 368px) {
    .video-popup {
        padding: 20px;
    }
}