li.dor-video-gallery-item {
    display: inline-block;
    flex: 0 0 auto;
    /* Match the photo margin plus the space between inline list items. */
    margin: 0 25px 0 0;
    vertical-align: top;
    list-style: none;
}

.dor-video-thumb {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100px;
    height: 100px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 5px;
    background: #161616;
    color: #fff;
}

.dor-video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dor-video-thumb .dor-video-play {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: clamp(22px, 28%, 28px);
    aspect-ratio: 7 / 5;
    border-radius: 5px;
    background: #e60018;
    font-size: 0;
    pointer-events: none;
}

.dor-video-thumb .dor-video-play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 52%;
    transform: translate(-50%, -50%);
    width: 34%;
    height: 42%;
    background: #fff;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.dor-video-badge {
    position: absolute;
    right: 3px;
    bottom: 3px;
    padding: 2px 5px;
    border-radius: 3px;
    background: #202020;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.dor-video-thumb:focus-visible,
.dor-video-choice:focus-visible {
    outline: 2px solid #73a951;
    outline-offset: -2px;
}

.dor-video-preview {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: #161616;
    color: #fff;
}

.dor-video-preview span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.35em 0.65em;
    border-radius: 5px;
    background: #202020;
    color: #fff;
}

.dor-video-preview,
.dor-video-preview img,
.dor-video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.dor-video-preview img {
    object-fit: contain;
}

.dor-gallery-player {
    width: min(var(--dor-video-dialog-width, 1100px), calc(100vw - 24px), max(280px, calc((100dvh - 76px) * 16 / 9)));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 0;
    margin: auto;
    border: 0;
    border-radius: 14px;
    background: #161616;
    color: #fff;
}

.dor-gallery-player:not([open]) {
    display: none;
}

.dor-gallery-player::backdrop {
    background: rgb(0 0 0 / 75%);
}

.dor-video-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 4px 12px 4px 16px;
}

.dor-video-dialog-header h2 {
    margin: 0;
    color: inherit;
    font-size: 16px;
}

.dor-video-close {
    flex: 0 0 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #303030;
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.dor-gallery-player .dor-video-frame {
    margin: 0;
}

html.dor-video-dialog-open {
    overflow: hidden;
}

.dor-video-frame {
    aspect-ratio: 16 / 9;
    min-height: 200px;
    width: 100%;
    margin-bottom: 12px;
    background: #161616;
}


.dor-gallery-player-multiple {
    width: min(var(--dor-video-dialog-width, 1100px), calc(100vw - 24px), max(280px, calc((100dvh - 172px) * 16 / 9)));
}

.dor-video-playlist {
    display: none;
}

.dor-gallery-player-multiple .dor-video-playlist {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
}

.dor-video-choice {
    flex: 0 0 auto;
    padding: 3px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #282828;
    color: #fff;
    font-size: 13px;
}

.dor-video-choice[aria-current="true"] {
    border-color: #8cc769;
}

.dor-video-choice img {
    display: block;
    width: 96px;
    height: 54px;
    object-fit: cover;
}

#video-product > .dor-tab-video {
    max-width: var(--dor-video-tab-width, 100%);
    margin: 0 auto 12px;
}
.dor-tab-video > .dor-video-frame {
    margin-bottom: 0;
}

@media (max-width: 530px), (min-width: 768px) and (max-width: 991px) {
    li.dor-video-gallery-item {
        margin-right: 10px;
    }

    .dor-video-thumb {
        width: 70px;
        height: 70px;
    }
}

.dor-description-video {
    display: block;
    width: 100%;
    margin: 1rem 0;
}
.dor-description-video .dor-video-frame {
    display: block;
    min-height: 0;
    margin: 0;
}
:is(.dor-description-video, .dor-tab-video) .dor-video-preview {
    cursor: pointer;
}
.dor-description-video .dor-video-preview span {
    width: max-content;
    max-width: 95%;
    white-space: normal;
}
/* Keep the text label when the server has no cover for this video. */
:is(.dor-description-video .dor-video-preview img + span, .dor-tab-video .dor-video-preview > span) {
    box-sizing: border-box;
    width: 68px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    text-indent: -9999px;
    border-radius: 13px;
    background: #e60018;
}
:is(.dor-description-video .dor-video-preview img + span, .dor-tab-video .dor-video-preview > span)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 52%;
    transform: translate(-50%, -50%);
    border-block: 10px solid transparent;
    border-left: 16px solid white;
}
:is(.dor-description-video, .dor-tab-video) .dor-video-preview:focus-visible {
    outline: 3px solid white;
    outline-offset: -5px;
}
:is(.dor-description-video, .dor-tab-video) > small {
    display: block;
    margin-top: .5rem;
    color: #4b514b;
    font: inherit;
    font-size: .9375rem;
    line-height: 1.5;
}
.dor-description-short {
    width: min(100%, 405px);
}
.dor-description-short .dor-video-frame {
    aspect-ratio: 9 / 16;
}

.dor-description-video,
.dor-description-pair {
    max-width: var(--dor-desc-width, 100%);
}
.dor-desc-centered :is(.dor-description-video, .dor-description-pair) {
    margin-inline: auto;
}
.dor-description-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    margin-block: 1rem;
    align-items: start;
}
.dor-description-pair > .dor-description-video {
    min-width: 0;
    margin-block: 0;
}
@media (max-width: 767px) {
    .dor-description-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}
:is(.dor-description-video, .dor-tab-video) .dor-desc-caption {
    position: absolute;
    inset: 0 0 auto;
    padding: .65rem .85rem 1.3rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .83), rgba(0, 0, 0, .68) 65%, transparent);
    color: white;
    text-align: start;
    line-height: 1.25;
    pointer-events: none;
}
.dor-desc-caption b,
.dor-desc-caption small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.dor-desc-caption b {
    font-size: clamp(.95rem, 2vw, 1.2rem);
}
.dor-desc-caption small {
    margin-top: .2rem;
    font-size: .86rem;
    font-weight: 400;
}
:is(.dor-description-video, .dor-tab-video) .dor-video-preview > span {
    z-index: 1;
}
