/* All reviews page (extension/cireviewpro/cireviews). Loaded only there. */

/* Product the reviews belong to (single-product view) */
.ds-reviews-product {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    color: var(--ds-dark-text-color);
    text-decoration: none;
}

.ds-reviews-product img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    background: var(--ds-primary-light-color-light);
}

.ds-reviews-product:hover span {
    text-decoration: underline;
}

/* Customer photo strip */
.ds-reviews-photos {
    display: flex;
    gap: 12px;
    margin: 20px 0 0;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.ds-reviews-photo {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 132px;
    height: 132px;
    scroll-snap-align: start;
}

.ds-reviews-photo img,
.ds-review-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ds-reviews-photo.has-video,
.ds-review-media .has-video {
    background: url(/image/catalog/design/video-placeholder-150x150.webp) center / contain no-repeat;
}

.ds-reviews-photo.has-video img,
.ds-review-media .has-video img {
    opacity: .3;
}

/* Search and filters */
.ds-reviews-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 16px;
}

.ds-reviews-search {
    position: relative;
}

.ds-reviews-search input {
    width: 100%;
    height: 48px;
    padding-left: 48px;
    border-radius: 0;
    background: var(--ds-primary-light-color-light);
}

.ds-reviews-search button {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ds-primary-color);
}

.ds-reviews-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ds-reviews-filter label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
}

.ds-reviews-filter select {
    width: 100%;
    height: 48px;
    border-radius: 0;
    font-size: 14px;
    text-overflow: ellipsis;
}

/* The page-size choice is noise on a phone; the page links still work there. */
.ds-reviews-filter-limit {
    display: none;
}

/* Review cards */
.ds-review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ds-review-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--bs-border-color);
    overflow-wrap: anywhere;
}

.ds-review-body {
    min-width: 0;
}

.ds-review-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.ds-review-author {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    font-size: 14px;
    font-weight: 500;
}

.ds-review-author img {
    display: block;
}

.ds-review-verified {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    font-weight: 400;
    color: var(--ds-interactive-color);
}

.ds-review-date {
    flex: 0 0 auto;
    font-size: 13px;
    white-space: nowrap;
}

.ds-review-stars {
    display: flex;
    gap: 2px;
    margin: 8px 0 12px;
}

.ds-review-stars .ds-module-rating-star {
    display: block;
    width: 16px;
    height: 16px;
}

.ds-review-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 400;
}

.ds-review-text {
    max-width: 75ch;
    margin: 0;
}

.ds-review-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ds-review-media a {
    display: block;
    width: 88px;
    height: 88px;
}

.ds-review-reply {
    margin-top: 16px;
    padding: 12px 16px;
    border-left: 2px solid var(--ds-primary-color);
    background: var(--ds-primary-light-color-light);
    font-size: 14px;
}

.ds-review-reply strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Reviewed product: a compact row under the review on phones */
.ds-review-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--bs-border-color);
    font-size: 13px;
    line-height: 1.4;
    color: var(--ds-dark-text-color);
    text-decoration: none;
}

.ds-review-product img {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    object-fit: cover;
    background: var(--ds-primary-light-color-light);
}

.ds-review-product:hover span {
    text-decoration: underline;
}

.ds-reviews-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 56px;
    font-size: 14px;
}

.ds-reviews-footer .pagination {
    margin: 0;
}

.ds-reviews-empty {
    padding: 48px 0 72px;
    text-align: center;
}

@media (min-width: 768px) {
    .ds-reviews-photo {
        width: 170px;
        height: 170px;
    }

    .ds-reviews-toolbar {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 24px;
    }

    .ds-reviews-search {
        flex: 0 1 360px;
    }

    .ds-reviews-filters {
        grid-template-columns: 200px 180px 96px;
    }

    .ds-reviews-filter-limit {
        display: block;
    }

    .ds-review-card {
        flex-direction: row;
        gap: 32px;
        padding: 24px;
    }

    .ds-review-body {
        flex: 1 1 auto;
    }

    /* On wider screens the product sits to the left of its review */
    .ds-review-product {
        order: -1;
        flex: 0 0 140px;
        flex-direction: column;
        align-items: flex-start;
        align-self: flex-start;
        gap: 8px;
        padding-top: 0;
        border-top: 0;
    }

    .ds-review-product img {
        width: 140px;
        height: 140px;
    }

    .ds-review-media a {
        width: 112px;
        height: 112px;
    }
}
