/* Star Rating Widget
   Reusable component for displaying and inputting star ratings.
   Uses 10 stars with half-star precision (20 possible values).
   Database value: 0-100, display value: 0-10 stars.
*/

.star-rating {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 1px;
    line-height: 1;
}

.star-rating .star {
    position: relative;
    display: inline-block;
    width: 1.4em;
    height: 1.4em;
}

.star-rating .star svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* N/A button (shown in input mode) */
.star-na {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    padding: 0.1em 0.35em;
    margin-right: 0.3em;
    border: 1.5px solid #999;
    border-radius: 3px;
    color: #666;
    background: transparent;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    vertical-align: middle;
}

.star-na:hover {
    border-color: #333;
    color: #333;
    background: #eee;
}

.star-na-active {
    border-color: #d9534f;
    color: #fff;
    background: #d9534f;
}

.star-na-active:hover {
    border-color: #c9302c;
    color: #fff;
    background: #c9302c;
}

/* Interactive (input) mode */
.star-rating.star-rating-input {
    cursor: pointer;
}

.star-rating.star-rating-input .star {
    cursor: pointer;
}

/* Small variant for list views */
.star-rating-sm .star {
    width: 1.2em;
    height: 1.2em;
}

/* Remove bottom margin from last element in review text so it doesn't gap before attribution */
.review-text > *:last-child {
    margin-bottom: 0;
}
