/**
 * Flashy product reviews slider (custom, RTL).
 */

.elementor-widget-shortcode .zh-flashy-reviews,
.elementor-element .zh-flashy-reviews {
    display: block;
    width: 100%;
    max-width: 100%;
}

.zh-flashy-reviews {
    --zh-fr-gap: 14px;
    --zh-fr-star: #A648C5;
    --zh-fr-border: #e6e6e6;
    direction: rtl;
    width: 100%;
    font-family: "Open Sans", sans-serif;
    text-align: right;
}

.zh-flashy-reviews__viewport {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    direction: rtl;
}

.zh-flashy-reviews__swiper {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.zh-flashy-reviews__swiper .swiper-wrapper {
    align-items: stretch;
}

.zh-flashy-reviews__swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
    direction: rtl;
}

.zh-flashy-reviews__swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

.zh-flashy-reviews__card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    min-height: 220px;
    padding: 16px 14px 14px;
    background: #fff;
    border: 1px solid var(--zh-fr-border);
    border-radius: 4px;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
}

.zh-flashy-reviews__header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 8px;
    direction: rtl;
}

/* Name + verified badge on one row (RTL: name on the right, badge to its left) */
.zh-flashy-reviews__author {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    max-width: 100%;
    min-width: 0;
    text-align: right;
}

.zh-flashy-reviews__name {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    text-align: right;
    text-transform: capitalize;
    color: #6C757D;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.zh-flashy-reviews__verified {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 16px;
    padding: 4px 8px;
    background: #E9F2FF;
    border-radius: 2px;
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 10px;
    line-height: 8px;
    letter-spacing: 0;
    text-align: right;
    vertical-align: middle;
    color: #3B82F6;
    white-space: nowrap;
}

.zh-flashy-reviews__date {
    align-self: flex-end;
    flex-shrink: 0;
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0;
    text-align: right;
    color: #6C757D;
    white-space: nowrap;
}

/* Stars: fill from the right in RTL (first filled star at the right edge) */
.zh-flashy-reviews__stars {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    direction: rtl;
    gap: 1px;
    margin: 0 0 10px;
    letter-spacing: 0;
}

.zh-flashy-reviews__star {
    color: #ddd;
    font-size: 15px;
    line-height: 1;
}

.zh-flashy-reviews__star.is-filled {
    color: var(--zh-fr-star);
}

.zh-flashy-reviews__text {
    flex: 1 1 auto;
    margin: 0 0 14px;
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    text-align: right;
    color: #35393D;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    white-space: pre-line;
}

/* Product row: match design — thumbnail on the left, title on the right */
.zh-flashy-reviews__product {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    direction: rtl;
}

.zh-flashy-reviews__product-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f5f5f5;
    order: 0;
}

.zh-flashy-reviews__product-title {
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0;
    text-align: right;
    vertical-align: middle;
    color: #000000;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.zh-flashy-reviews button.zh-flashy-reviews__arrow,
.zh-flashy-reviews .zh-flashy-reviews__arrow {
    flex: 0 0 auto;
    align-self: center;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #b0b0b0 !important;
    cursor: pointer;
    line-height: 0 !important;
    font-size: 0 !important;
    text-decoration: none !important;
    outline: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1;
}

.zh-flashy-reviews button.zh-flashy-reviews__arrow:hover,
.zh-flashy-reviews button.zh-flashy-reviews__arrow:focus,
.zh-flashy-reviews button.zh-flashy-reviews__arrow:focus-visible,
.zh-flashy-reviews button.zh-flashy-reviews__arrow:active,
.zh-flashy-reviews button.zh-flashy-reviews__arrow:visited,
.zh-flashy-reviews .zh-flashy-reviews__arrow:hover,
.zh-flashy-reviews .zh-flashy-reviews__arrow:focus,
.zh-flashy-reviews .zh-flashy-reviews__arrow:focus-visible,
.zh-flashy-reviews .zh-flashy-reviews__arrow:active {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #b0b0b0 !important;
    outline: none !important;
    transform: none !important;
    opacity: 1 !important;
}

.zh-flashy-reviews button.zh-flashy-reviews__arrow.swiper-button-disabled,
.zh-flashy-reviews .zh-flashy-reviews__arrow.swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: default;
    pointer-events: none;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #b0b0b0 !important;
}

@media (max-width: 767px) {
    .zh-flashy-reviews__arrow {
        display: none;
    }

    .zh-flashy-reviews__card {
        min-height: 200px;
        padding: 14px 12px 12px;
    }
}

/* Hide Elementor reviews section when there are no published reviews */
body.zh-no-flashy-reviews .flashy-reviews-section,
body.zh-no-flashy-reviews .elementor-element-b3b518a,
body.zh-no-flashy-reviews .elementor-element-1d30736b,
body.zh-no-flashy-reviews #flashy-reviews-sec,
body.zh-no-flashy-reviews #flashy-reviews-link,
.flashy-reviews-section:not(:has(.zh-flashy-reviews)):not(:has(.flashy-product-rating)),
.elementor-element-b3b518a:not(:has(.zh-flashy-reviews)):not(:has(.flashy-product-rating)),
.elementor-element-1d30736b:not(:has(.zh-flashy-reviews)):not(:has(.flashy-product-rating)),
#flashy-reviews-sec:not(:has(.zh-flashy-reviews)):not(:has(.flashy-product-rating)),
#flashy-reviews-link:not(:has(.zh-flashy-reviews)):not(:has(.flashy-product-rating)) {
    display: none !important;
}
