.rating {
    display: inline-block;
    position: relative;
    height: 50px;
    line-height: 50px;
    font-size: 26px;
}

.rating label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    cursor: pointer;
}

.rating label:last-child {
    position: static;
}

.rating label:nth-child(1) {
    z-index: 5;
}

.rating label:nth-child(2) {
    z-index: 4;
}

.rating label:nth-child(3) {
    z-index: 3;
}

.rating label:nth-child(4) {
    z-index: 2;
}

.rating label:nth-child(5) {
    z-index: 1;
}

.rating label input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.rating label .icon {
    float: left;
    color: transparent;
}

.rating label:last-child .icon {
    color: #514F4F;
}

.rating:not(:hover) label input:checked ~ .icon,
.rating:hover label:hover input ~ .icon {
    color: #E68758;
}

.rating label input:focus:not(:checked) ~ .icon:last-child {
    color: #514F4F;
    text-shadow: 0 0 5px #E68758;
}

.rating.rating-yellow:not(:hover) label input:checked ~ .icon,
.rating.rating-yellow:hover label:hover input ~ .icon {
    color: #EDD289;
}

.rating.rating-yellow label input:focus:not(:checked) ~ .icon:last-child {
    color: #514F4F;
    text-shadow: 0 0 5px #EDD289;
}

.bottom-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

.bottom-rating span.rating-title {
    font-size: 16px;
    margin-left: 8px;
    margin-top: 2px;
}

@media(max-width: 768px) {
    .bottom-rating {
        flex-direction: column;
        margin-bottom: 30px;
    }
}
