@tailwind components;

.star-rating {
    height: 16px;
    position: relative;
    width: 80px;
}

.star-rating:before {
    background-image: url('data:image/svg+xml,<svg width="16" height="16" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6309 6.34368L12.0795 5.66504L10.0453 1.4467C9.6808 0.694789 8.62473 0.685231 8.25713 1.4467L6.22286 5.66504L1.67147 6.34368C0.855269 6.46475 0.528167 7.49384 1.12007 8.08326L4.4129 11.3649L3.63408 16.0006C3.49389 16.8386 4.35682 17.4662 5.07956 17.0743L9.15121 14.8855L13.2229 17.0743C13.9456 17.463 14.8085 16.8386 14.6683 16.0006L13.8895 11.3649L17.1823 8.08326C17.7742 7.49384 17.4471 6.46475 16.6309 6.34368ZM12.2852 10.8296L13.0235 15.2392L9.15121 13.1587L5.27894 15.2392L6.01725 10.8296L2.8833 7.70731L7.21351 7.06373L9.15121 3.04929L11.0889 7.06373L15.4191 7.70731L12.2852 10.8296Z" fill="%23FABC2A"></path></svg>');
    background-repeat: repeat-x;
    background-size: 16px;
    bottom: 0;
    content: "";
    display: block;
    height: 16px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 80px;
}

.star-rating>span {
    display: block;
    text-indent: -10000px;
    width: 80px;
    height: 16px;
    position: absolute;
    overflow: hidden;
}

.star-rating>span:before {
    background-image: url('data:image/svg+xml,<svg width="18" height="17" viewBox="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.25713 1.50931L6.22286 5.4866L1.67147 6.12645C0.855269 6.24061 0.528167 7.2109 1.12007 7.76664L4.4129 10.8608L3.63408 15.2316C3.49389 16.0216 4.35682 16.6134 5.07956 16.2439L9.15121 14.1802L13.2229 16.2439C13.9456 16.6104 14.8085 16.0216 14.6683 15.2316L13.8895 10.8608L17.1823 7.76664C17.7742 7.2109 17.4471 6.24061 16.6309 6.12645L12.0795 5.4866L10.0453 1.50931C9.6808 0.800361 8.62473 0.791349 8.25713 1.50931Z" fill="%23FABC2A"></path></svg>');
    background-repeat: repeat-x;
    background-size: 16px;
    bottom: 0;
    content: "";
    display: block;
    height: 16px;
    left: 0;
    position: absolute;
    right: 0;
    text-indent: 10000px;
    top: 0;
}

.start-xl.star-rating {
    height: 20px;
    width: 100px;
}

.start-xl.star-rating:before {
    background-image: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6309 6.34368L12.0795 5.66504L10.0453 1.4467C9.6808 0.694789 8.62473 0.685231 8.25713 1.4467L6.22286 5.66504L1.67147 6.34368C0.855269 6.46475 0.528167 7.49384 1.12007 8.08326L4.4129 11.3649L3.63408 16.0006C3.49389 16.8386 4.35682 17.4662 5.07956 17.0743L9.15121 14.8855L13.2229 17.0743C13.9456 17.463 14.8085 16.8386 14.6683 16.0006L13.8895 11.3649L17.1823 8.08326C17.7742 7.49384 17.4471 6.46475 16.6309 6.34368ZM12.2852 10.8296L13.0235 15.2392L9.15121 13.1587L5.27894 15.2392L6.01725 10.8296L2.8833 7.70731L7.21351 7.06373L9.15121 3.04929L11.0889 7.06373L15.4191 7.70731L12.2852 10.8296Z" fill="%23FABC2A"></path></svg>');
    background-size: 20px;
    height: 20px;
    width: 100px;
}

.start-xl.star-rating>span {
    width: 100px;
    height: 20px;
}

.start-xl.star-rating>span:before {
    background-image: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.25713 1.50931L6.22286 5.4866L1.67147 6.12645C0.855269 6.24061 0.528167 7.2109 1.12007 7.76664L4.4129 10.8608L3.63408 15.2316C3.49389 16.0216 4.35682 16.6134 5.07956 16.2439L9.15121 14.1802L13.2229 16.2439C13.9456 16.6104 14.8085 16.0216 14.6683 15.2316L13.8895 10.8608L17.1823 7.76664C17.7742 7.2109 17.4471 6.24061 16.6309 6.12645L12.0795 5.4866L10.0453 1.50931C9.6808 0.800361 8.62473 0.791349 8.25713 1.50931Z" fill="%23FABC2A"></path></svg>');
    background-size: 20px;
    height: 20px;
}

#rating_global {
    position: relative;
    width: auto;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

#rating_global input {
    display: none;
}

#rating_global label {
    float: right;
    display: inline-block;
    width: 24px;
    height: 24px;
    margin: 0;
    position: relative;
    transition: all .3s;
    cursor: pointer;
}

#rating_global label svg {
    width: 24px;
    height: 24px;
}

#rating_global label svg path {
    @apply tw-fill-n-20;
}

#rating_global input:checked~label svg path,
#rating_global label:hover~label svg path,
#rating_global label svg:hover path {
    @apply tw-fill-f-yellow;
}

@tailwind utilities;