.stars {
    top: 3px;
    direction: rtl;
    display: inline-flex;
    gap: 6px;
    position: relative;
}

.stars input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.stars label {
    font-size: 1.8em;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
}

.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label {
    color: #ffc107;
}

.stars label::after {
    content: attr(data-text);
    position: absolute;
    top: 30%;
    left: 100%;
    margin-left: 12px;

    color: #198754;
    font-size: 0.95rem;
    font-weight: 600;

    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.stars label:hover::after {
    opacity: 1;
}

.stars.has-selection:not(:hover) label.selected::after {
    opacity: 1;
    color: #198754;
}
