CSS Rating Start not checking after click
CSS
/* Hide Radio button */
.rate > input{
display: none;
}
.rate{
display: inline-block;
border: 0;
}
.rate > label{
float: right;
}
/* Showing the stars */
.rate > label:before{
display: inline-block;
font-size: 1.1rem;
font-family: FontAwesome;
content: "\f005";
margin:0;
padding:0.3rem .2rem;
cursor: pointer;
}
/* Half star */
.rate .half:before{
content: "\f089";
position: absolute;
padding-right: 0;
}
/* Click and hover */
input:checked ~ label, label:hover ~ label{
color: #ffb503;
}
/* Hover highlight */
input:checked + label:hover, input:checked ~ label:hover, input:checked ~ label:hover ~ label,
label:hover ~ input:checked ~label{
color: #cc9000;
}
I try to click on starts and remains saved at least on frontend to see them as checked but after i click one start it don't remain with that color, instead it remains the same as the beginning. How to fix it so after i click to see the input ( to see the stars colored )