#spv-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#spv-modal.spv-open {
    display: flex;
}

.spv-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    cursor: pointer;
}

.spv-dialog {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
    padding: 14px;
    box-sizing: border-box;
}

.spv-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 28px;
    line-height: 38px;
    cursor: pointer;
}

.spv-video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.spv-video-wrap iframe,
.spv-video-wrap video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #000;
}

.spv-footer {
    padding: 14px 0 0;
}

.spv-buy-now {
    display: block;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 9px;
    background: #0b1b72;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.spv-buy-now:hover {
    opacity: .92;
}

.spv-buy-now:disabled {
    opacity: .6;
    cursor: wait;
}

body.spv-no-scroll {
    overflow: hidden;
}

@media (max-width: 600px) {
    #spv-modal {
        padding: 10px;
    }

    .spv-dialog {
        width: 100%;
        border-radius: 10px;
        padding: 10px;
    }

    .spv-buy-now {
        min-height: 48px;
        font-size: 17px;
    }
}


/* Video button beside the WooCommerce purchase button */
.spv-watch-video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    margin: 8px 0 0 8px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: #c62828;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}

.spv-watch-video:hover {
    opacity: .92;
}

.spv-watch-video-icon {
    font-size: 14px;
}

@media (max-width: 600px) {
    .spv-watch-video {
        width: 100%;
        margin: 8px 0 0;
    }
}
