.x10-sr-wrap,
.x10-sr-meta {
  font-family: 'vazir matn', sans-serif;
}

.x10-sr-wrap {
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.x10-sr-wrap.x10-sr-layout-one-line {
  flex-direction: row;
  align-items: center;
}

.x10-sr-wrap.x10-sr-layout-two-line {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.x10-sr-stars {
  display: inline-flex;
  gap: 1px;
  white-space: nowrap;
}

.x10-sr-star {
  position: relative;
  display: inline-block;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  color: var(--x10-star-inactive, #d1d5db);
  font-size: var(--x10-star-size, 30px);
  line-height: 1;
  transition: transform .15s ease;
  user-select: none;
}

.x10-sr-star:hover {
  transform: scale(1.08);
}

.x10-sr-star::before {
  content: '★';
  position: absolute;
  top: 0;
  right: 0;
  width: var(--x10-fill, 0%);
  height: 100%;
  overflow: hidden;
  color: var(--x10-star-color, #f5b301);
  pointer-events: none;
  transition: width .15s ease;
}

html[dir="ltr"] .x10-sr-star::before,
body.ltr .x10-sr-star::before,
[dir="ltr"] .x10-sr-star::before {
  right: auto;
  left: 0;
}

.x10-sr-star.is-active {
  color: var(--x10-star-inactive, #d1d5db);
}

.x10-sr-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: #444;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.x10-sr-avg,
.x10-sr-count {
  display: inline-block;
  min-width: 3ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.x10-sr-count {
  min-width: 2ch;
}

.x10-sr-wrap.is-loading {
  opacity: .78;
}

.x10-sr-wrap.is-loading .x10-sr-star {
  pointer-events: none;
}

.x10-sr-star {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;
}

.x10-sr-star .x10-star-shape {
	display: inline-block;
	line-height: 1;
}

.x10-sr-star .x10-star-num {
	position: absolute;
	top: 60%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: calc(var(--x10-star-size, 15px) * 0.30);
	font-weight: 300;
	line-height: 1;
	color: #ffffff;
	pointer-events: none;
	user-select: none;
	font-family: 'vazir matn', sans-serif !important;
}

.x10-sr-star:not(.is-active) .x10-star-num {
	color: #ffffff;
	opacity: 0.85;
}

.x10-sr-wrap.is-loading {
  opacity: .6;
  pointer-events: none;
}

.x10-sr-wrap.is-loading .x10-sr-star::before {
  width: 0% !important; /* no stale fill during initial load */
}

.x10-sr-wrap.is-loading .x10-sr-avg,
.x10-sr-wrap.is-loading .x10-sr-count {
  color: transparent;
  position: relative;
  min-width: 3ch;
}

.x10-sr-wrap.is-loading .x10-sr-avg::after,
.x10-sr-wrap.is-loading .x10-sr-count::after {
  content: '...';
  position: absolute;
  inset: 0;
  text-align: center;
  color: #9ca3af;
  animation: x10-sr-pulse 1.1s ease-in-out infinite;
}

.x10-sr-wrap.is-load-error .x10-sr-avg,
.x10-sr-wrap.is-load-error .x10-sr-count {
  color: #9ca3af;
}

@keyframes x10-sr-pulse {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}