/* =====================================================
   CBF Review Count — Styles v1.0.0
   CleanBabyFormula.com
   Brand: #97aa82 · #f8f8f8 · #000 · #fff
   ===================================================== */


/* =========================================================
   PART A — ELEMENTOR RATING WIDGET (Single Product Page)
   ========================================================= */

/* ---------------------------------------------------------
   1. STAR RATING CONTAINER
   --------------------------------------------------------- */

.elementor-widget-rating .e-rating {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

.elementor-widget-rating .e-rating .e-rating-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

/* ---------------------------------------------------------
   2. INDIVIDUAL STARS
   --------------------------------------------------------- */

.elementor-widget-rating .e-rating .e-icon {
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
}

.elementor-widget-rating .e-rating .e-icon svg {
    width: 18px !important;
    height: 18px !important;
}

/* Filled star color — warm amber/gold */
.elementor-widget-rating .e-rating .e-icon-wrapper.e-icon-marked svg {
    fill: #f5a623 !important;
}

/* Empty star color */
.elementor-widget-rating .e-rating .e-icon-wrapper.e-icon-unmarked svg {
    fill: #e0e0e0 !important;
}

/* ---------------------------------------------------------
   3. REVIEW COUNT BADGE — Injected by JS after .e-rating
   --------------------------------------------------------- */

.cbf-rc-single-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #666 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.cbf-rc-single-badge .cbf-rc-badge-rating {
    font-weight: 700 !important;
    color: #1a1a1a !important;
    font-size: 15px !important;
}

.cbf-rc-single-badge .cbf-rc-badge-dot {
    width: 3px !important;
    height: 3px !important;
    background: #bbb !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

.cbf-rc-single-badge .cbf-rc-badge-text {
    color: #777 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.cbf-rc-single-badge .cbf-rc-badge-text a {
    color: #777 !important;
    text-decoration: none !important;
    border-bottom: 1px dashed #ccc !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
}

.cbf-rc-single-badge .cbf-rc-badge-text a:hover {
    color: #97aa82 !important;
    border-bottom-color: #97aa82 !important;
}

/* No reviews state */
.cbf-rc-single-badge--empty {
    margin-left: 10px !important;
}

.cbf-rc-single-badge--empty .cbf-rc-badge-text {
    font-size: 13px !important;
    color: #999 !important;
}

.cbf-rc-single-badge--empty .cbf-rc-badge-text a {
    color: #97aa82 !important;
    border-bottom: 1px dashed #97aa82 !important;
    font-weight: 600 !important;
}

.cbf-rc-single-badge--empty .cbf-rc-badge-text a:hover {
    color: #6e9050 !important;
    border-bottom-color: #6e9050 !important;
}


/* =========================================================
   PART B — SHOP / ARCHIVE / HOMEPAGE LOOP
   ========================================================= */

/* ---------------------------------------------------------
   4. LOOP REVIEW COUNT — Below stars in product cards
   --------------------------------------------------------- */

.cbf-rc-loop-count {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    margin-top: 2px !important;
    margin-bottom: 6px !important;
}

.cbf-rc-loop-count .cbf-rc-rating-num {
    font-weight: 700 !important;
    color: #1a1a1a !important;
    font-size: 13px !important;
}

.cbf-rc-loop-count .cbf-rc-separator {
    color: #ccc !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}

.cbf-rc-loop-count .cbf-rc-count {
    font-weight: 500 !important;
    color: #888 !important;
    font-size: 12.5px !important;
}

/* ---------------------------------------------------------
   5. WOOCOMMERCE DEFAULT STAR-RATING INLINE COUNT
   Used in related products, upsells, widgets, shortcodes
   --------------------------------------------------------- */

.cbf-rc-inline-count {
    display: inline !important;
    margin-left: 5px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #888 !important;
    vertical-align: baseline !important;
}

/* ---------------------------------------------------------
   6. WOOCOMMERCE DEFAULT STAR RATING — Color polish
   Unify star colors across all loop contexts
   --------------------------------------------------------- */

.star-rating span::before {
    color: #f5a623 !important;
}

.star-rating::before {
    color: #e0e0e0 !important;
}


/* =========================================================
   PART C — RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 900px) {

    .cbf-rc-single-badge {
        margin-left: 8px !important;
        font-size: 13px !important;
    }

    .cbf-rc-single-badge .cbf-rc-badge-rating {
        font-size: 14px !important;
    }

    .cbf-rc-single-badge .cbf-rc-badge-text {
        font-size: 12.5px !important;
    }

    .elementor-widget-rating .e-rating .e-icon,
    .elementor-widget-rating .e-rating .e-icon svg {
        width: 17px !important;
        height: 17px !important;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .cbf-rc-single-badge {
        margin-left: 8px !important;
        gap: 5px !important;
        font-size: 12px !important;
    }

    .cbf-rc-single-badge .cbf-rc-badge-rating {
        font-size: 13px !important;
    }

    .cbf-rc-single-badge .cbf-rc-badge-text {
        font-size: 12px !important;
    }

    .elementor-widget-rating .e-rating .e-icon,
    .elementor-widget-rating .e-rating .e-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .cbf-rc-loop-count {
        font-size: 12px !important;
        gap: 4px !important;
    }

    .cbf-rc-loop-count .cbf-rc-rating-num {
        font-size: 12px !important;
    }

    .cbf-rc-loop-count .cbf-rc-count {
        font-size: 11.5px !important;
    }
}

/* Small Mobile */
@media (max-width: 420px) {

    .elementor-widget-rating .e-rating .e-icon,
    .elementor-widget-rating .e-rating .e-icon svg {
        width: 15px !important;
        height: 15px !important;
    }

    .cbf-rc-single-badge {
        margin-left: 6px !important;
        gap: 4px !important;
    }

    .cbf-rc-single-badge .cbf-rc-badge-rating {
        font-size: 12px !important;
    }

    .cbf-rc-single-badge .cbf-rc-badge-text {
        font-size: 11px !important;
    }
}
