/* Scope every rule to the existing product-specific CusRev widget. */
body.single-product div.product > #customer-reviews.cr-all-reviews-shortcode {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr);
    gap: 14px 24px;
    margin: 8px 0 0;
    padding: 22px;
    border: 1px solid #d7e1eb;
    border-radius: 14px;
    background: rgba(255, 255, 255, .75);
    scroll-margin-top: 110px;
}
body.single-product #customer-reviews > .cr-summaryBox-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    width: 100%;
    max-width: 600px;
    margin: 0;
    padding: 0;
    background: transparent;
}
body.single-product #customer-reviews > .cr-ajax-search {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    min-width: 0;
    margin: 0;
}
body.single-product #customer-reviews > .cr-count-row {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    min-width: 0;
    margin: 0;
    padding: 8px 0;
    background: transparent;
}
body.single-product #customer-reviews > ol.commentlist {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    float: none;
    width: 100%;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}
body.single-product #customer-reviews > ol.commentlist > li.review {
    float: none !important;
    width: auto !important;
    max-width: none;
    min-width: 0;
    margin: 0 !important;
    padding: 16px !important;
    border: 1px solid #dce4ec;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
body.single-product #customer-reviews .comment_container {
    position: relative;
    min-height: 0;
    margin: 0;
    padding: 0;
}
body.single-product #customer-reviews .comment_container > .cr-avatar {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 50%;
}
body.single-product #customer-reviews .comment_container > .cr-avatar-check {
    top: 21px;
    left: 22px;
    width: 13px;
    height: 13px;
}
body.single-product #customer-reviews .cr-comment-text {
    width: auto;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
}
body.single-product #customer-reviews .cr-comment-text > .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 10px;
    min-height: 36px;
    margin: 0 0 8px;
    padding-left: 44px;
    line-height: 1.35;
}
body.single-product #customer-reviews .cr-meta-author-featured-date {
    flex: 1 1 100px;
    min-width: 0;
}
body.single-product #customer-reviews .woocommerce-review__verified {
    display: block;
    font-size: 12px;
    line-height: 1.3;
}
body.single-product #customer-reviews .meta time {
    float: none;
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
}
body.single-product #customer-reviews .cr-comment-text > .crstar-rating-svg {
    margin: 6px 0 10px;
}
body.single-product #customer-reviews .description p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.55;
}
body.single-product #customer-reviews .description p:last-child { margin-bottom: 0; }
body.single-product #customer-reviews > .cr-show-more-button {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
    margin: 4px 0 0;
    padding: 10px 20px;
}
body.single-product #customer-reviews > .cr-show-more-review-spinner,
body.single-product #customer-reviews > .cr-search-no-reviews {
    grid-column: 1 / -1;
    justify-self: center;
}
body.single-product #customer-reviews.bm-product-reviews-empty > .bm-product-reviews-empty-message {
    grid-column: 1 / -1;
    margin: 0;
    color: #526174;
    font-size: 14px;
}
@media (max-width: 1100px) {
    body.single-product #customer-reviews > ol.commentlist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 900px) {
    body.single-product div.product > #customer-reviews.cr-all-reviews-shortcode {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
    }
    body.single-product #customer-reviews > .cr-summaryBox-wrap,
    body.single-product #customer-reviews > .cr-ajax-search,
    body.single-product #customer-reviews > .cr-count-row {
        grid-column: 1;
        grid-row: auto;
    }
}
@media (max-width: 600px) {
    body.single-product #customer-reviews > ol.commentlist {
        grid-template-columns: minmax(0, 1fr);
    }
    body.single-product div.product > #customer-reviews.cr-all-reviews-shortcode {
        padding: 12px;
        scroll-margin-top: 92px;
    }
    body.single-product #customer-reviews > ol.commentlist > li.review { padding: 14px !important; }
}

/* Newer CusRev versions use divs instead of table cells for the histogram. */
body.single-product #customer-reviews .cr-histogramTable { display: block; width: 100%; }
body.single-product #customer-reviews .cr-histogramTable .ivole-histogramRow { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 8px; align-items: center; margin: 4px 0; }
body.single-product #customer-reviews .cr-histogramTable [class^="ivole-histogramCell"] { display: block; width: auto; padding: 0; }
body.single-product #customer-reviews .cr-histogram-rating-label { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
body.single-product #customer-reviews .cr-histogram-rating-icon { color: #ffb400; flex: 0 0 14px; }
