/* Only model cards marked by the PHP templates (Full Face, Video, Videos). */
.mds-model-thumb.bgd-mvg-has-video {
    position: relative;
    overflow: hidden;
}

/* Preserve the first desktop image and suppress the legacy second-image hover. */
body.mmo-2 .mds-model-thumb.bgd-mvg-has-video > img:nth-child(2) {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 0;
    transition: none !important;
}

body.mmo-2 .mds-model-thumb.bgd-mvg-has-video > img:nth-of-type(2) {
    display: none !important;
}

body.mmo-2 .mds-model-thumb.bgd-mvg-has-video:hover > img:nth-child(2),
body.mmo-2 .mds-model-thumb.bgd-mvg-has-video:focus > img:nth-child(2),
body.mmo-2 .mds-model-thumb.bgd-mvg-has-video:hover > img:nth-child(1),
body.mmo-2 .mds-model-thumb.bgd-mvg-has-video:focus > img:nth-child(1) {
    opacity: 1 !important;
    visibility: visible !important;
}

/*
 * Video stage sits over the first image. During a sequence the old video stays
 * visible until the next video's first playable frame is ready. This prevents
 * the underlying photo from appearing while a new source is buffering.
 */
.mds-model-thumb.bgd-mvg-has-video > .bgd-mvg-video-stage,
.mds-model-thumb.bgd-mvg-has-video .gallery-image-wrapper.first > .bgd-mvg-video-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.mds-model-thumb.bgd-mvg-has-video .bgd-mvg-video-stage > .bgd-mvg-preview {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    background: #000;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.mds-model-thumb.bgd-mvg-has-video .bgd-mvg-video-stage > .bgd-mvg-preview.is-visible {
    z-index: 3;
    opacity: 1;
}

.mds-model-thumb.bgd-mvg-has-video .bgd-mvg-video-stage > .bgd-mvg-preview.is-fading-out {
    z-index: 2;
    opacity: 0;
}

/* Hide navigation everywhere by default. Only the authenticated member
 * model-category/videos archive is allowed to display it (see body marker).
 */
.mds-model-thumb.bgd-mvg-has-video .bgd-mvg-dots {
    display: none !important;
}

/* Shared desktop/mobile styling on the one permitted archive. */
body.bgd-mvg-member-videos-archive .mds-model-thumb.bgd-mvg-has-video .bgd-mvg-dots {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 9px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: calc(100% - 24px);
    padding: 6px 9px;
    border-radius: 20px;
    background: rgba(0, 0, 0, .42);
    transform: translateX(-50%);
    pointer-events: auto;
}

body.bgd-mvg-member-videos-archive .mds-model-thumb.bgd-mvg-has-video .bgd-mvg-dot {
    display: block;
    flex: 0 0 7px;
    width: 7px;
    min-width: 7px;
    height: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .78);
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

body.bgd-mvg-member-videos-archive .mds-model-thumb.bgd-mvg-has-video .bgd-mvg-dot.is-active {
    background: #e21b35;
    transform: scale(1.35);
}

body.bgd-mvg-member-videos-archive .mds-model-thumb.bgd-mvg-has-video .bgd-mvg-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Mobile/tablet: use the first existing gallery image as a fixed video surface. */
@media only screen and (max-width: 1024px) {
    body.mmo-2 .mds-model-thumb.bgd-mvg-has-video > img {
        display: none !important;
    }

    body.mmo-2 .mds-model-thumb.bgd-mvg-has-video > .gallery-row {
        display: block !important;
        width: 100%;
        height: auto;
        overflow: hidden !important;
        scroll-snap-type: none !important;
        scroll-behavior: auto !important;
        transform: none !important;
    }

    body.mmo-2 .mds-model-thumb.bgd-mvg-has-video > .gallery-row > .gallery-image-wrapper {
        display: none !important;
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        transform: none !important;
    }

    body.mmo-2 .mds-model-thumb.bgd-mvg-has-video > .gallery-row > .gallery-image-wrapper.first {
        display: block !important;
        position: relative !important;
    }

    body.mmo-2 .mds-model-thumb.bgd-mvg-has-video > .gallery-row > .gallery-image-wrapper img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* The new header filter is desktop-only, just like the original Duo link. */
    .bgd-mvg-header-nav.only_pc {
        display: none !important;
    }

    /* Shared dot styles above also apply to desktop pointers. */
}

/* Match the existing right-side dropdown's trigger sizing at each breakpoint.
 * The dropdown list itself intentionally uses only the theme's native neutral
 * mds-filter-list styling: no custom active background or yellow left stripe.
 */
.mds-header-left .bgd-mvg-header-nav.only_pc {
    display: block;
    width: 190px;
}

.mds-header-left .bgd-mvg-header-filter {
    width: 100%;
}

.mds-header-left .bgd-mvg-header-filter .mds-filter-type {
    width: 100%;
    padding: 4px 10px 4px 2px;
    color: #8d8d90;
    font-size: 1.9rem;
    line-height: 1;
}

.mds-header-left .bgd-mvg-header-filter .mds-filter-type:before {
    right: 5px;
    font-size: 1.9rem;
    line-height: 1;
}


@media only screen and (min-width: 1601px) and (max-width: 1921px) {
    .mds-header-left .bgd-mvg-header-filter .mds-filter-type {
        font-size: 1.6rem;
    }
}

@media only screen and (min-width: 1301px) and (max-width: 1600px) {
    .mds-header-left .bgd-mvg-header-filter .mds-filter-type {
        font-size: 1.6rem;
    }
}




/* Gallery shortcuts are appended to the theme's primary menu for mobile.
 * Keep them out of desktop navigation; on mobile they inherit the native
 * mds-main-menu typography, spacing, hover and active-state styling.
 */
.bgd-mvg-mobile-gallery-item {
    display: none !important;
}

@media only screen and (max-width: 1024px) {
    .mds-main-nav ul.mds-main-menu > li.bgd-mvg-mobile-gallery-item {
        display: list-item !important;
    }
}

/* User-requested header icon rule. */
.bgd-mvg-duos-icon img {
  display: none;
}
