/* Popup promotional video modal overrides to match testimonial modal styles */
:root {
    --muvd-video-player-popup-max-height: 90vh;
    --muvd-video-player-popup-padding: 40px;
}

@media only screen and (max-width: 480px) {
    .muvd-video-modal.mkdf-subscribe-popup-holder {
        width: 80%;
    }
}

.muvd-video-modal.mkdf-subscribe-popup-holder {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .3);
}

.muvd-video-modal.mkdf-subscribe-popup-holder .mkdf-sp-content-container {
    padding: var(--muvd-video-player-popup-padding);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
    /* Constrain the popup content so inner media can size against it */
    max-height: var(--muvd-video-player-popup-max-height);
    overflow: hidden;
}

.muvd-video-modal.mkdf-subscribe-popup-holder .mkdf-sp-inner {
    margin: 0px;
}

.muvd-video-modal.mkdf-subscribe-popup-holder .mkdf-sp-table {
    position: fixed;
    left: 50%;
    transform: translate(-50%, 0);
    width: auto;
}

.muvd-video-modal.mkdf-subscribe-popup-holder .mkdf-sp-close {
    line-height: 16px;
    position: absolute;
    top: 20px;
    right: 20px;
    display: block;
    color: #fff;
    background: #000;
    padding: 0px 3px;
    border-radius: 50%;
}

/* Video specific content */
.muvd-video-modal.mkdf-subscribe-popup-holder .muvd-video-modal-content {
    border: none;
}

.muvd-video-modal.mkdf-subscribe-popup-holder .muvd-video-wrapper .muvd-video-player {
    /* Keep video within viewport and popup padding */
    max-width: 90vw;
    max-height: calc(var(--muvd-video-player-popup-max-height) - calc(2 * var(--muvd-video-player-popup-padding)));
    overflow: hidden;
}

.muvd-video-modal.mkdf-subscribe-popup-holder .muvd-video-player {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Handle embeds that might be iframes instead of <video> */
.muvd-video-modal.mkdf-subscribe-popup-holder .muvd-video-wrapper iframe,
.muvd-video-modal.mkdf-subscribe-popup-holder .muvd-video-wrapper video,
.muvd-video-modal.mkdf-subscribe-popup-holder .muvd-video-wrapper .muvd-video-player {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.muvd-remove-no-smooth-scroll {
    scroll-behavior: auto !important;
}

@media only screen and (max-width: 768px) {
    .muvd-video-modal.mkdf-subscribe-popup-holder .mkdf-sp-table {
        left: 1%;
        transform: none;
        width: 98%;
    }

    .mkdf-subscribe-popup-holder .mkdf-sp-inner {
        max-width: none;
    }

    .muvd-video-modal.mkdf-subscribe-popup-holder .mkdf-sp-content-container {
        max-height: 85vh;
    }

    .muvd-video-modal.mkdf-subscribe-popup-holder .muvd-video-wrapper {
        max-height: calc(85vh - calc(2 * var(--muvd-video-player-popup-padding)));
    }
}

/* Promotional videos section (moved from inline styles) */
#muvd-promotional-videos {
    width: 100%;
    background: var(--muvd-color-accent-fade);
    padding: 88px 0;
}

#muvd-promotional-videos .muvd-promotional-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: start;
}

@media only screen and (max-width: 1039px) {
    #muvd-promotional-videos .muvd-promotional-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        margin: 0 auto;
        gap: 20px;
    }
}

#muvd-promotional-videos .muvd-promo-video {
    width: 100%;
    height: auto;
    display: block;
}

#muvd-promotional-videos .muvd-title {
    text-align: center;
}

#muvd-promotional-videos .muvd-title h2 {
    font-weight: bold;
    font-size: 24px;
    text-transform: none;
    margin: 0;
    padding-bottom: 88px;
}

#muvd-promotional-videos .muvd-promo-title {
    font-size: 20px;
    margin: 0;
    font-weight: bold;
}

#muvd-promotional-videos .muvd-promo-subtitle {
    font-size: 10px;
    margin: 5px 0;
}

#muvd-promotional-videos .muvd-promo-sep {
    margin-bottom: 10px;
    margin-top: 10px;
    margin-right: 40%;
    margin-left: 0;
}

#muvd-promotional-videos .muvd-promo-desc {
    font-size: 12px;
}

/* Video wrapper + play icon (bottom-right) */
#muvd-promotional-videos .muvd-col-video {
    position: relative;
}

#muvd-promotional-videos .muvd-video-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    opacity: 0.9;
}

#muvd-promotional-videos .muvd-video-play:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    opacity: 1;
}

#muvd-promotional-videos .muvd-video-play i {
    font-size: 19px;
    line-height: 1;
    margin-left: 2px;
}

/* Elementor widget variant: no background or section padding, but keep layout/styles */
.muvd-promotional-videos-widget .muvd-promotional-videos {
    width: 100%;
    background: transparent;
    padding: 0;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-promotional-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: start;
}

@media only screen and (max-width: 1039px) {
    .muvd-promotional-videos-widget .muvd-promotional-videos .muvd-promotional-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        margin: 0 auto;
        gap: 20px;
    }
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-promo-video {
    width: 100%;
    height: auto;
    display: block;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-promo-title {
    font-size: 20px;
    margin: 0;
    font-weight: bold;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-promo-subtitle {
    font-size: 10px;
    margin: 5px 0;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-promo-sep {
    margin-bottom: 10px;
    margin-top: 10px;
    margin-right: 40%;
    margin-left: 0;
    background-color: #767676;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-promo-desc {
    font-size: 12px;
}

/* Video wrapper + play icon (bottom-right) */
.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-col-video {
    position: relative;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-video-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    opacity: 0.9;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-video-play:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    opacity: 1;
}

.muvd-promotional-videos-widget .muvd-promotional-videos .muvd-video-play i {
    font-size: 19px;
    line-height: 1;
    margin-left: 2px;
}
