/* Star Rating widget — restyled over the fyneworks jQuery Star Rating plugin.
 *
 * The plugin's markup and geometry are kept intact: each rating is a row of
 * div.star-rating columns, and the community summary slices every star into
 * four ({split:4}) 4px quarter-columns for fractional averages. We only change
 * the paint — crisp inline-SVG stars in rating amber instead of the old 16px
 * GIF sprite (whose path pointed at a ReferenceSite tree that no longer ships).
 */

/* Until the plugin upgrades them into star <div>s (its JS runs at the bottom of
 * the page), the raw radio inputs paint as "o" circles for a beat on load, which
 * looks broken. Keep them hidden from the start — the plugin also hides them once
 * applied, so this only removes the flash — and reserve the row height so the
 * stars appear without a layout jump. */
input.star { display: none; }
.rate-product, .customer-rating, #community-rating { min-height: 16px; }

/* Lay each widget out as a flat flex row. float:none lets the columns (whole
 * stars, or the community widget's quarter-star slices) sit adjacent without
 * the plugin's original float-clearing. */
.star-rating-control { display: inline-flex; align-items: center; }

div.rating-cancel, div.star-rating {
    float: none;
    display: block;
    width: 16px;
    height: 16px;
    overflow: hidden;
    text-indent: -999em;
    cursor: pointer;
    background: transparent;
}

/* Empty star. */
div.rating-cancel a, div.star-rating a {
    display: block;
    width: 16px;
    height: 100%;
    border: 0;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d9dade' d='M12 .587l3.668 7.431 8.2 1.192-5.934 5.786 1.401 8.169L12 18.896l-7.335 3.869 1.401-8.169L.132 9.21l8.2-1.192z'/%3E%3C/svg%3E");
}

/* Filled star. */
div.star-rating-on a {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f5a623' d='M12 .587l3.668 7.431 8.2 1.192-5.934 5.786 1.401 8.169L12 18.896l-7.335 3.869 1.401-8.169L.132 9.21l8.2-1.192z'/%3E%3C/svg%3E") !important;
}

/* Hover (interactive form only — the summaries are read-only). */
div.star-rating-hover a {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f7b733' d='M12 .587l3.668 7.431 8.2 1.192-5.934 5.786 1.401 8.169L12 18.896l-7.335 3.869 1.401-8.169L.132 9.21l8.2-1.192z'/%3E%3C/svg%3E");
}

div.star-rating-readonly a { cursor: default !important; }

/* No delete.gif ships with this site and a rating is required to submit, so
 * hide the plugin's "cancel" control rather than render a broken image box. */
div.rating-cancel { display: none !important; }

/* Community summary: quarter-stars stay flush; kept small since the big
 * average number beside them carries the visual weight. */
#community-rating .star-rating-control { gap: 0; }

/* Interactive and per-review stars: same compact 16px as the summary, with a
   hair of spacing so the row still reads as distinct stars, not a solid bar. */
.customer-rating .star-rating-control,
.rate-product .star-rating-control { gap: 2px; }
