/**
 * SRB Review - star rating
 *
 * Self-contained replacement for Elementor's `widget-star-rating` stylesheet,
 * which is only enqueued on pages carrying a native (deprecated since 3.17)
 * Star Rating widget and so never loaded for this plugin's widget.
 *
 * Each star carries its own fill percentage inline as `--srb-star-fill`, set by
 * the widget, so the old per-decile `.elementor-star-1` ... `.elementor-star-9`
 * classes are no longer needed. Fill resolution is 1% rather than 10%.
 */

.srb-star-rating {
    display: inline-block;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
    color: var( --srb-star-unmarked-color, #ccd6df );
}

.srb-star-rating i {
    display: inline-block;
    position: relative;
    font-style: normal;
    cursor: default;
}

/**
 * The `i` renders the unmarked star as text; this overlay renders the marked
 * star on top of it, clipped to the star's fill percentage. Both must share
 * font metrics for the clip to land in the right place, hence `inherit`.
 */
.srb-star-rating i:before {
    content: "\2605";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    width: var( --srb-star-fill, 0% );
    color: var( --srb-star-color, #ffdd00 );
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

body.rtl .srb-star-rating i:before {
    right: 0;
    left: auto;
}

/**
 * Optional: restore the original outline-style unmarked star.
 *
 * The previous markup used Elementor's icon font - an outline star (eicons
 * \e933) as the base with a solid star (\e934) overlaid. Unmarked stars are now
 * solid grey instead of grey outlines. To go back to the old appearance,
 * uncomment the block below, add 'elementor-icons' to `get_style_depends()` in
 * widgets/srb-review.php, and set `$icon = '&#xE933;'` in `render()` and
 * `icon = '&#xE933;'` in `content_template()`.
 *
 * .srb-star-rating {
 *     font-family: eicons;
 * }
 *
 * .srb-star-rating i:before {
 *     content: "\e934";
 * }
 */
