/* stylelint-disable comment-pattern, selector-max-compound-selectors, max-nesting-depth */
.ratingsContainer {
  display: flex;
  box-shadow: 0 4px 6px -2px #1b1b1c0a, 0 12px 16px -4px #1b1b1c12;
  padding: 1.6rem;
  background: #fff;
  border-radius: 0.8rem;
  gap: 1.7rem;
  flex-direction: column;

  @include min(laptop) {
    flex-direction: row;
  }

  > li {
    background: #f1f5f9;
    padding: 1.6rem 0.8rem;
    border-radius: 0.8rem;
    display: flex;
    flex-flow: row-reverse wrap;
    justify-content: center;
    min-width: 11.4rem;
    gap: 0.8rem;
    min-height: 7.2rem;
    align-items: center;

    @include min(laptop) {
      flex-direction: column-reverse;
      min-height: 14.2rem;
    }

    > div {
      @include flex-direction(row);

      align-items: center;
      gap: 0.8rem;

      @include min(laptop) {
        @include flex-direction(column);
      }
    }

    > p {
      font-size: 1.4rem;
      line-height: 2.2rem;
      font-weight: 600;
      color: #0f172a;
    }
  }
}

.ratingList {
  display: grid;
  width: 100%;
  gap: 1.6rem 2.2rem;
  background: #f1f5f9;
  border-radius: 1.6rem;
  padding: 1.6rem;

  @include min(laptop) {
    grid-template-columns: 1fr 1fr;
  }
}

.item {
  display: grid;
  position: relative;

  @include min(laptop) {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.label {
  color: #0f172a;
  font-size: 1.4rem;
  line-height: 2.2rem;
  font-weight: 600;
}

.value {
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
  color: #1c1a28;
  display: flex;

  @include min(tablet) {
    font-weight: 800;
  }
}

.showOnlyMobile {
  border: 1.5px solid #d63b54;
}

.ratingWithBoxes {
  background: transparent;
  padding: 0;
  overflow-y: auto;
  padding-bottom: 1.6rem;

  &::-webkit-scrollbar {
    height: 0.5rem;
  }

  &::-webkit-scrollbar-track {
    background: #5b8bb933;
    border-radius: 1rem;
  }

  &::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 1rem;
  }

  @include min(tablet) {
    padding-bottom: 0;
  }

  > ul {
    background: transparent;
    display: flex;
    padding: 0;
    gap: 0.8rem;

    @include min(tablet) {
      gap: 1.6rem;
    }

    > li {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: 0.8rem;
      min-height: 9.6rem;
      background: #f4f4f4;
      border-radius: 0.8rem;
      padding: 2.2rem;
      color: #1b1b1c;
      font-weight: 600;
      font-size: 1.4rem;
      line-height: 2.2rem;
      // min-width: 13.6rem;
      text-align: center;
      align-items: center;
      justify-content: center;
      white-space: nowrap;

      @include min(tablet) {
        white-space: normal;
      }

      > p {
        font-size: 1.4rem;
        line-height: 2.2rem;
        font-weight: 500;
        color: #3c3c40;
        min-width: 98px;
      }
    }
  }
}

.withTitle {
  @include flex-direction(column);

  gap: 1.6rem;

  @include min(tablet) {
    justify-content: space-between;

    @include flex-direction(row);
  }

  h3 {
    margin: 0;
    font-size: 2.4rem;
    color: #000;
    line-height: 4rem;
    font-weight: 600;
  }

  > li {
    display: flex;
    justify-content: space-between;
    gap: 1.8rem;

    @include min(tablet) {
      gap: 1.5rem;
    }

    > p {
      color: #000;
      font-size: 1.8rem;
      line-height: 2.8rem;
      font-weight: 600;
    }

    > div {
      gap: 1.5rem;
      display: flex;

      @include min(tablet) {
        display: inherit;
      }

      > div:first-child {
        background: #fff;
        margin: 1rem 0;
        border-radius: 0.8rem;

        > div {
          background: #59be28;
          border-radius: 0.8rem;
        }
      }

      > div:last-child {
        display: flex;
        align-items: center;
        position: static;

        > svg {
          margin-right: 1.5rem;
        }
      }
    }
  }
}

.ratingsWithComments {
  flex-direction: column;
  padding: 0;
  box-shadow: none;

  @include min(tablet) {
    padding: inherit;
  }

  > ul {
    gap: 1.6rem;

    @include min(tablet) {
      row-gap: 3.2rem;
    }

    > li {
      @include flex-direction(column);

      align-items: flex-start;

      > p {
        font-size: 2rem;
        line-height: 3.6rem;
        color: #000;
        font-weight: 600;
        margin-bottom: 0.8rem;
      }

      > span {
        grid-column: 1 / 3;
        font-size: 1.6rem;
        line-height: 2.6rem;
        color: #000;
      }

      > div {
        min-width: 100%;
        grid-template-columns: 8fr auto;
        gap: 2rem;

        > div:first-child {
          background: #fff;
          margin: 1rem 0;
          border-radius: 0.8rem;

          > div {
            background: #59be28;
            border-radius: 0.8rem;
          }
        }

        > div:last-child {
          font-size: 1.8rem;
          line-height: 2.8rem;
          color: #000;
          display: flex;
          align-items: center;

          svg {
            margin-right: 0.8rem;
          }
        }
      }
    }
  }
}