:root {
  --van-rate-icon-size: 20px;
  --van-rate-icon-gutter: var(--van-padding-base);
  --van-rate-icon-void-color: var(--van-gray-5);
  --van-rate-icon-full-color: var(--van-danger-color);
  --van-rate-icon-disabled-color: var(--van-gray-5);
}

.van-rate {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
  flex-wrap: wrap;

  &__item {
    position: relative;

    &:not(:last-child) {
      padding-right: var(--van-rate-icon-gutter);
    }
  }

  &__icon {
    display: block;
    width: 1em;
    color: var(--van-rate-icon-void-color);
    font-size: var(--van-rate-icon-size);

    &--half {
      position: absolute;
      top: 0;
      left: 0;
      overflow: hidden;
      pointer-events: none;
    }

    &--full {
      color: var(--van-rate-icon-full-color);
    }

    &--disabled {
      color: var(--van-rate-icon-disabled-color);
    }
  }

  &--disabled {
    cursor: not-allowed;
  }

  &--readonly {
    cursor: default;
  }
}
