/* Окно с видео о товаре: рисует его магазин, поэтому и стили общие для всех тем. */

.cx-video {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cx-video.is-open { display: flex; }

.cx-video__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
}

.cx-video__window {
    position: relative;
    width: min(960px, 100%);
}

.cx-video__frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;               /* обычные пропорции ролика, 16:9 */
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.cx-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cx-video__close {
    position: absolute;
    top: -42px;
    right: 0;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.cx-video__close:hover { background: #fff; }

/* Пока окно открыто, страница под ним не прокручивается */
body.cx-video-open { overflow: hidden; }

@media (max-width: 640px) {
    .cx-video { padding: 12px; }
    .cx-video__close { top: -38px; }
}
