

.rsr-wrap,
.rsr-wrap *,
.rsr-wrap *::before,
.rsr-wrap *::after {
  box-sizing: border-box;
  font-family: "YekanBakh", sans-serif !important;
}

.rsr-wrap {
  --rsr-star-size: clamp(25px, 5vw, 38px);
  --rsr-star-gap: clamp(3px, 0.8vw, 8px);

  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(8px, 1.5vw, 16px);

  width: 100%;
  max-width: 100%;
  min-width: 0;

  padding: 12px 16px;
  margin: 0;

  background: #ffffff;
  border: 1px solid #e7ebf0;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(24, 39, 75, 0.07);

  direction: rtl;
  color: #202936;
  font-family: "YekanBakh", sans-serif !important;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
}

/* عنوان */
.rsr-topline {
  flex: 1 1 auto;
  min-width: 0;

  margin: 0;
  padding: 0;

  color: #263241;
  font-family: "YekanBakh", sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ستاره ها */
.rsr-stars {
  display: flex;
  flex: 0 1 auto;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: var(--rsr-star-gap);

  min-width: 0;
  margin: 0;
  padding: 0;

  direction: ltr;
  white-space: nowrap;
}

.rsr-star-btn {
  position: relative;

  display: inline-flex;
  flex: 0 0 var(--rsr-star-size);
  align-items: center;
  justify-content: center;

  width: var(--rsr-star-size);
  height: var(--rsr-star-size);
  min-width: var(--rsr-star-size);
  min-height: var(--rsr-star-size);

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 8px;
  background: transparent;

  color: inherit;
  font-family: "YekanBakh", sans-serif !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;

  transition: transform 0.18s ease;
}

.rsr-star-btn:hover {
  transform: translateY(-1px) scale(1.04);
}

.rsr-star-btn:focus-visible {
  outline: 2px solid #3978d6;
  outline-offset: 2px;
}

.rsr-star-svg {
  display: block;

  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  fill: #d9e0e8;

  transition:
    fill 0.18s ease,
    filter 0.18s ease;
}

.rsr-star-btn.is-on .rsr-star-svg {
  fill: #f2bd32;
  filter: drop-shadow(0 3px 5px rgba(242, 189, 50, 0.25));
}

.rsr-star-btn.is-hover .rsr-star-svg {
  fill: #ffd45c;
  filter: drop-shadow(0 3px 5px rgba(255, 212, 92, 0.28));
}

.rsr-num {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0;
  padding: 0;

  color: #354052;
  font-family: "YekanBakh", sans-serif !important;
  font-size: clamp(9px, 1.5vw, 12px);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

/* امتیاز میانگین */
.rsr-meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;

  min-width: max-content;
  margin: 0;
  padding: 0;

  color: #596575;
  font-family: "YekanBakh", sans-serif !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  direction: rtl;
  white-space: nowrap;
}

.rsr-avg {
  display: inline-flex;
  align-items: center;
  gap: 3px;

  margin: 0;
  padding: 0;

  color: #202936;
  font-family: "YekanBakh", sans-serif !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.rsr-avg::before {
  content: "(";
  color: #87919d;
  font-weight: 400;
}

.rsr-avg::after {
  content: ")";
  color: #87919d;
  font-weight: 400;
}

/* حذف تعداد رای */
.rsr-count {
  display: none !important;
}

/* پیام، خارج از جریان ردیف اصلی */
.rsr-msg {
  position: absolute;
  right: 16px;
  bottom: -24px;

  min-height: 18px;
  margin: 0;
  padding: 0;

  color: #16834b;
  font-family: "YekanBakh", sans-serif !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.rsr-wrap.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

/* تبلت */
@media (max-width: 768px) {
  .rsr-wrap {
    gap: 10px;
    padding: 10px 13px;
  }

  .rsr-topline {
    font-size: 13px;
  }

  .rsr-meta,
  .rsr-avg {
    font-size: 12px;
  }
}

/* موبایل */
@media (max-width: 480px) {
  .rsr-wrap {
    gap: 7px;
    padding: 9px 10px;
  }

  .rsr-stars {
    gap: 3px;
  }

  .rsr-topline {
    font-size: 12px;
  }

  .rsr-meta,
  .rsr-avg {
    font-size: 11px;
  }

  .rsr-msg {
    right: 10px;
  }
}
