.avito-rating {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  flex: 0 0 auto;
  min-height: 48px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid var(--border, #3a3c40);
  border-radius: 12px;
  background: rgba(29, 30, 32, 0.78);
  color: var(--text, #f7f7f5);
  text-decoration: none;
}

.avito-rating__label {
  color: var(--muted, #a8a8a8);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.avito-rating__score {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.avito-rating__stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 0;
}

.avito-rating__star {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: rgba(255, 196, 0, 0.28);
}

.avito-rating__star-base,
.avito-rating__star-full {
  display: block;
  width: 12px;
  height: 12px;
}

.avito-rating__star-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  overflow: hidden;
  color: var(--yellow, #ffc400);
}

.avito-rating__count {
  color: var(--muted, #a8a8a8);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.header-actions .avito-rating {
  margin-left: 0;
}

.avito-rating + .cart-button,
.avito-rating + a.cart-button {
  margin-left: 0;
}

@media (max-width: 420px) {
  .avito-rating {
    min-height: 44px;
    padding: 4px 8px;
  }

  .avito-rating__label {
    font-size: 9px;
  }

  .avito-rating__score {
    font-size: 15px;
  }

  .avito-rating__star,
  .avito-rating__star-base,
  .avito-rating__star-full {
    width: 11px;
    height: 11px;
  }

  .avito-rating__count {
    font-size: 10px;
  }
}

@media (min-width: 1024px) {
  .header-actions .avito-rating {
    min-height: 56px;
    padding: 6px 12px;
  }

  .avito-rating__star,
  .avito-rating__star-base,
  .avito-rating__star-full {
    width: 13px;
    height: 13px;
  }
}
