/*
 *  Pure CSS star rating that works without reversing order
 *  of inputs
 *  -------------------------------------------------------
 *  NOTE: For the styling to work, there needs to be a radio
 *        input selected by default. There also needs to be a
 *        radio input before the first star, regardless of
 *        whether you offer a 'no rating' or 0 stars option
 *
 *  This codepen uses FontAwesome icons
 */

.js-object-rating {
	margin-top: 1em;
	min-height: 64px;
}
.object-rating-c {
	display: flex;
	min-height: 64px;
	justify-content: space-between;
	align-items: center;
}

.rating-group {
	display: inline-flex;
}

/* make hover effect work properly in IE */
.rating__icon {
	pointer-events: none;
}

/* hide radio inputs */
.rating__input {
	position: absolute !important;
	left: -9999px !important;
}

/* set icon padding and size */
.rating__label {
	cursor: default;
	/* if you change the left/right padding, update the margin-right property of .rating__label--half as well. */
	padding: 0 0.1em;
	font-size: 2rem;
}

.can .rating__label {
	cursor: pointer;
}
/* add padding and positioning to half star labels */
.rating__label--half {
	padding-right: 0;
	margin-right: -0.6em;
	z-index: 2;
}

/* set default star color */
.rating__icon--star {
	color: orange;
}

/* set color of none icon when unchecked */
.rating__icon--none {
	color: #eee;
}

/* if none icon is checked, make it red */
.rating__input--none:checked + .rating__label .rating__icon--none {
	color: red;
}

/* if any input is checked, make its following siblings grey */
.rating__input:checked ~ .rating__label .rating__icon--star {
	color: #ddd;
}

/* make all stars orange on rating group hover */
.can .rating-group:hover .rating__label .rating__icon--star,
.can .rating-group:hover .rating__label--half .rating__icon--star {
	color: orange;
}

/* make hovered input's following siblings grey on hover */
.can .rating__input:hover ~ .rating__label .rating__icon--star,
.can .rating__input:hover ~ .rating__label--half .rating__icon--star {
	color: #ddd;
}

/* make none icon grey on rating group hover */
.can .rating-group:hover .rating__input--none:not(:hover) + .rating__label .rating__icon--none {
	color: #eee;
}

/* make none icon red on hover */
.can .rating__input--none:hover + .rating__label .rating__icon--none {
	color: red;
}