@import "settings.colors";

@import "mixins/settings.fonts";
@import "mixins/tools.mixins";

// each star element
.c-review-star {
  display: inline-block;
  width: rem(20);
  height: 100%;
  overflow: hidden;
  margin: 0 rem(5) 0 0;

  &:last-child {
    margin: 0;
  }
}

.c-review__icon {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  fill: $color-grey-700;
}

.c-review__label {
  @include font-gm-sans-bold;
  display: inline-block;
  margin: 0;
  padding: 0;
  width: auto;
  color: $color-grey-500;
  font-size: rem(12);
  letter-spacing: rem(1);
  text-transform: uppercase;
  line-height: rem(30);
  vertical-align: middle;
}

.c-review__total {
  @include font-pratt-bold;
  font-size: rem(34);
  margin: 0 0 0 rem(10);
  color: $color-grey-700;
}

.c-review__total--big-number {
  color: $color-red-900;
}

.c-review__body {
  padding: rem(20);
  background-color: $color-grey-50;
}

.c-review__item-name,
.c-review__item-value {
  font-size: rem(13);
}

.c-review__item-name {
  @include font-gm-sans-bold;
  color: $color-grey-500;
  text-transform: uppercase;
  display: inline-block;
}

.c-review__item-value {
  @include font-gm-sans;
  margin: 0;
  color: $color-grey-660;
  display: inline;
  &::after {
    content: "";
    display: block;
  }
  // Because, in PageBuilder, we're not able to programmatically identify "a"
  // elements that are nested inside of review item elements, we can't give them
  // their own class. So, for PageBuilder, we're forced to use child selectors.
  a {
    @include font-gm-sans;
    color: $color-grey-660;
    text-decoration: underline;
    &:hover,
    &:focus {
      color: $color-grey-660;
      text-decoration: none;
    }
  }
}


//////////////////////////////////////////////////////
// legacy rating styles
//////////////////////////////////////////////////////
.c-review__star-rating {
  text-indent: -9999em;
  background: transparent image-url("4-star-rating-sprite.svg") no-repeat 0 0;
  background-size: auto 900%;
}

.c-review__star-rating--05 {
  background-position: 0 12.5%;
}

.c-review__star-rating--1 {
  background-position: 0 25%;
}

.c-review__star-rating--15 {
  background-position: 0 37.5%;
}

.c-review__star-rating--2 {
  background-position: 0 50%;
}

.c-review__star-rating--25 {
  background-position: 0 62.5%;
}

.c-review__star-rating--3 {
  background-position: 0 75%;
}

.c-review__star-rating--35 {
  background-position: 0 87.5%;
}

.c-review__star-rating--4 {
  background-position: 0 100%;
}
