/**
 * Product description: wrap pasted tables on mobile, show video frames.
 */

.wd-product-info,
.wd-product-info .wd-info-msg,
.entry-summary .wd-product-count,
.entry-summary .wd-product-count .wd-count-msg {
    white-space: normal !important;
    overflow: visible !important;
    max-width: 100%;
    flex-wrap: wrap;
    word-break: break-word;
}

#tab-description video:not([src]):not(:has(source[src])),
.woocommerce-Tabs-panel--description video:not([src]):not(:has(source[src])) {
    display: none;
}

.da-video-frame {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 8px 0 16px;
    background: #111;
    overflow: hidden;
}

.da-video-frame video {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 180px;
    object-fit: contain;
    background: #111;
}

.da-video-frame .da-video-play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    border: 0;
    padding: 0;
}

.da-video-frame.is-playing .da-video-play {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.da-video-frame .da-video-play::before {
    content: "";
    width: 68px;
    height: 68px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.da-video-frame .da-video-play::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
}

/* Spec list replaces description tables — immune to Yellow Pencil table widths */
.da-spec-list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.da-spec-item {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 18px !important;
    box-sizing: border-box !important;
}

.da-spec-title {
    display: block !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    color: #fff !important;
    font-weight: 700 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.da-spec-title h4 {
    margin: 0 !important;
    color: inherit !important;
}

.da-spec-body {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    color: #fff !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
}

/* Stop Woodmart scroll panes from clipping description text */
html body.single-product #tab-description,
html body.single-product #tab-description.wd-scroll,
html body.single-product #tab-description .wc-tab-inner,
html body.single-product #tab-description .wd-scroll-content,
html body.single-product .woocommerce-Tabs-panel--description,
html body.single-product .woocommerce-Tabs-panel--description .wc-tab-inner {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
}

@media (max-width: 1024px) {
    html body.single-product #tab-description table,
    html body.single-product #tab-description table tbody,
    html body.single-product #tab-description table tr,
    html body.single-product #tab-description table td,
    html body #tab-description table,
    html body #tab-description table tbody,
    html body #tab-description table tr,
    html body #tab-description table td,
    html body.single-product .woocommerce-Tabs-panel--description table,
    html body.single-product .woocommerce-Tabs-panel--description table tbody,
    html body.single-product .woocommerce-Tabs-panel--description table tr,
    html body.single-product .woocommerce-Tabs-panel--description table td,
    html body.single-product .wd-entry-content table,
    html body.single-product .wd-entry-content table tbody,
    html body.single-product .wd-entry-content table tr,
    html body.single-product .wd-entry-content table td {
        display: block !important;
        float: none !important;
        clear: both !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        -webkit-box-orient: vertical !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }

    html body.single-product #tab-description table td,
    html body.single-product .woocommerce-Tabs-panel--description table td,
    html body.single-product .wd-entry-content table td {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    html body.single-product #tab-description table td h4,
    html body.single-product .woocommerce-Tabs-panel--description table td h4 {
        margin: 16px 0 8px !important;
    }

    html body.single-product #tab-description video,
    html body.single-product .woocommerce-Tabs-panel--description video,
    html body.single-product .wd-entry-content video {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
}
