/* نظرات و امتیاز — صفحات معرفی */
.cc-box {
  --cc-ink: #1e293b;
  --cc-muted: #64748b;
  --cc-line: #e2e8f0;
  --cc-teal: #0f766e;
  --cc-amber: #f59e0b;
  --cc-card: #fff;
  display: block;
  clear: both;
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1.25rem 0 0.5rem;
  padding: 1rem 1.1rem 1.15rem;
  background: var(--cc-card);
  border: 1px solid var(--cc-line);
  border-radius: 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.04);
  color: var(--cc-ink);
  direction: rtl;
  overflow: visible;
  height: auto !important;
  min-height: 0;
}
/* در صفحه معرفی مجموعه‌ها: زیر ردیف درباره/تماس، تمام‌عرض داخل تب */
.refahi-detail-comments-wrap {
  display: block;
  clear: both;
  width: 100%;
  margin-top: 1.15rem;
}
.refahi-detail-comments-wrap .cc-box {
  margin: 0;
  border-radius: 12px;
  box-shadow: none;
  border-color: #e9ecef;
}
.refahi-detail-tab-content .cc-box,
.refahi-detail-page .cc-box {
  height: auto !important;
}
.cc-box__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cc-line);
}
.cc-box__head-main { min-width: 0; flex: 1 1 12rem; }
.cc-box__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--cc-ink);
  line-height: 1.35;
}
.cc-box__title i { color: var(--cc-teal); margin-left: 0.35rem; }
.cc-box__sub {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: var(--cc-muted);
  line-height: 1.5;
}
.cc-box__mod {
  margin-right: 0.35rem;
  color: var(--cc-teal);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.cc-box__mod:hover { text-decoration: underline; }
.cc-box__summary {
  text-align: center;
  min-width: 7.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--cc-line);
}
.cc-box__summary.is-empty {
  padding: 0.4rem 0.65rem;
}
.cc-box__avg {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  color: var(--cc-ink);
  font-variant-numeric: tabular-nums;
}
.cc-box__count {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--cc-muted);
  font-weight: 600;
}

.cc-stars { display: inline-flex; gap: 0.12rem; align-items: center; }
.cc-stars--static .is-on { color: var(--cc-amber); }
.cc-stars--static .is-off { color: #cbd5e1; }
.cc-stars--input {
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.2rem;
  margin: 0.15rem 0 0;
  padding: 0.35rem 0.45rem;
  border-radius: 0.55rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  width: fit-content;
  max-width: 100%;
}
.cc-stars--input input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cc-stars--input label {
  cursor: pointer;
  font-size: 1.55rem;
  color: #d6d3d1;
  line-height: 1;
  transition: color 0.12s ease, transform 0.12s ease;
}
.cc-stars--input label:hover,
.cc-stars--input label:hover ~ label,
.cc-stars--input input:checked ~ label {
  color: var(--cc-amber);
}
.cc-stars--input label:hover { transform: scale(1.1); }

.cc-alert {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.55rem;
  font-size: 0.86rem;
  line-height: 1.55;
}
.cc-alert--ok { background: #ecfdf5; border: 1px solid #99f6e4; color: #115e59; }
.cc-alert--err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.cc-pending {
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.cc-pending__badge {
  display: inline-flex;
  margin-bottom: 0.4rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 750;
}
.cc-pending p {
  margin: 0.35rem 0 0.2rem;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
}
.cc-pending small { color: var(--cc-muted); font-size: 0.75rem; }

.cc-form-wrap { margin-bottom: 0.85rem; }
.cc-login-need {
  padding: 0.75rem 0.85rem;
  border-radius: 0.6rem;
  background: #f8fafc;
  border: 1px solid var(--cc-line);
  font-size: 0.88rem;
  color: var(--cc-muted);
}
.cc-login-need a { color: var(--cc-teal); font-weight: 700; }
.cc-form {
  padding: 0.85rem 0.95rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--cc-line);
}
.cc-form__rate { margin-bottom: 0.75rem; }
.cc-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 750;
  color: #475569;
}
.cc-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 72px;
  background: #fff;
  color: var(--cc-ink);
  box-sizing: border-box;
}
.cc-form textarea:focus {
  outline: 0;
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.cc-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin-top: 0.7rem;
}
.cc-hint {
  flex: 1 1 12rem;
  font-size: 0.74rem;
  color: var(--cc-muted);
  line-height: 1.45;
}
.cc-req { color: #be123c; font-weight: 800; }
.cc-opt { color: var(--cc-muted); font-weight: 600; font-size: 0.78rem; }
.cc-only-rating {
  margin: 0.35rem 0 0.2rem !important;
  font-size: 0.82rem !important;
  color: var(--cc-muted) !important;
  font-style: normal;
}
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.55rem;
  padding: 0.52rem 1.15rem;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
  white-space: nowrap;
}
.cc-btn:hover { filter: brightness(1.05); }

.cc-list { display: flex; flex-direction: column; gap: 0.55rem; }
.cc-empty {
  padding: 0.7rem 0.85rem;
  text-align: center;
  color: var(--cc-muted);
  font-size: 0.84rem;
  background: #f8fafc;
  border: 1px dashed var(--cc-line);
  border-radius: 0.55rem;
}
.cc-item {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--cc-line);
  border-radius: 0.65rem;
  background: #fff;
}
.cc-item__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin-bottom: 0.25rem;
}
.cc-item__top strong { font-size: 0.9rem; }
.cc-item__top time {
  margin-right: auto;
  font-size: 0.72rem;
  color: var(--cc-muted);
  font-variant-numeric: tabular-nums;
}
.cc-item p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
}
.cc-item__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
  margin-top: 0.45rem;
}
.cc-item__bar .cc-votes--compact { margin-top: 0; }
.cc-item__tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.45rem;
}
.cc-tool {
  border: 0;
  background: transparent;
  color: var(--cc-teal);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.15rem 0.15rem;
  text-decoration: none;
  line-height: 1.4;
}
.cc-tool:hover { text-decoration: underline; }
.cc-reply { margin-top: 0.65rem; }
.cc-reply[hidden] { display: none !important; }
.cc-quote,
.cc-quote-preview {
  margin: 0.45rem 0 0.15rem;
  padding: 0.45rem 0.7rem;
  border-right: 3px solid #99f6e4;
  background: #f0fdfa;
  border-radius: 0.35rem;
}
.cc-quote__who {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #0f766e;
  margin-bottom: 0.15rem;
}
.cc-item .cc-quote p,
.cc-quote-preview p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #475569;
  white-space: pre-wrap;
}
.cc-quote-preview[hidden] { display: none !important; }
.cc-replies {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.7rem;
  margin-right: 0.2rem;
  padding-right: 0.75rem;
  border-right: 2px solid #d9f3ef;
}
.cc-item--reply {
  background: #f8fafc;
  padding: 0.6rem 0.7rem;
}
.cc-item--reply.cc-item--pending {
  background: #fffbeb;
  border-color: #fde68a;
}
.cc-item--reply.cc-item--off {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.cc-mod-reply {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 800;
}
.cc-mod-quote {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #64748b;
  white-space: pre-wrap;
}
.cc-item--pending {
  background: #fffbeb;
  border-color: #fde68a;
}
.cc-item--off {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.92;
}
.cc-status {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.3;
}
.cc-status--pending { background: #fef3c7; color: #92400e; }
.cc-status--approved { background: #dcfce7; color: #166534; }
.cc-status--rejected { background: #e2e8f0; color: #475569; }
.cc-item__mod {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--cc-line);
}
.cc-item__mod form { display: inline; margin: 0; }
.cc-mod-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0.45rem;
  padding: 0.28rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 750;
  color: #475569;
  cursor: pointer;
  line-height: 1.2;
}
.cc-mod-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.cc-mod-btn--ok {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #115e59;
}
.cc-mod-btn--ok:hover { background: #d1fae5; }
.cc-mod-btn--off {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.cc-mod-btn--off:hover { background: #ffedd5; }
.cc-box--mod .cc-box__sub { color: #0f766e; }

/* پسند مطلب و پسند نظر — دو شمارندهٔ جدا */
.cc-react {
  --cc-ink: #1e293b;
  --cc-line: #e2e8f0;
  --cc-teal: #0f766e;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  width: 100%;
  box-sizing: border-box;
  margin: 1.25rem 0 0.75rem;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--cc-line);
  border-radius: 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.04);
  direction: rtl;
}
.refahi-detail-comments-wrap .cc-react {
  margin: 0 0 0.75rem;
  box-shadow: none;
}
.cc-react + .cc-box { margin-top: 0; }
.cc-react__label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cc-ink);
  line-height: 1.4;
}
.cc-react__label i {
  color: var(--cc-teal);
  margin-left: 0.35rem;
}
.cc-votes {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.cc-votes--compact { margin-top: 0.55rem; }
.cc-vote {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--cc-line);
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.cc-vote:hover { border-color: #cbd5e1; background: #fff; }
.cc-vote--up.is-on {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e;
}
.cc-vote--down.is-on {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.cc-vote__n { min-width: 0.6rem; }
.cc-votes__msg {
  flex: 1 1 8rem;
  font-size: 0.72rem;
  color: #b91c1c;
  line-height: 1.4;
}
.cc-votes__msg:empty { display: none; }
.cc-votes[data-busy="1"] { opacity: 0.65; }

@media (max-width: 640px) {
  .cc-box { padding: 0.85rem; }
  .cc-box__summary { text-align: right; }
  .cc-item__top time { margin-right: 0; width: 100%; }
  .cc-react { padding: 0.75rem 0.85rem; }
}

/* —— صفحه مدیریت نظرات (/comments) —— */
/*
 * منوی افقی fixed است؛ بدون padding-top عنوان زیر منو پنهان می‌شود.
 * عرض استاندارد داشبوردهای مدیریت: 1440px
 */
html body .content-wrapper > .menu-horizontal + .cc-mod-page,
.layout-menu-fixed .layout-horizontal .layout-page .menu-horizontal + .cc-mod-page,
.content-wrapper > .cc-mod-page {
  max-width: 1440px !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
html body .content-wrapper > .menu-horizontal + .cc-mod-page,
.layout-menu-fixed .layout-horizontal .layout-page .menu-horizontal + .cc-mod-page {
  padding-top: 6.5rem !important;
}

.cc-mod {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 2rem;
  box-sizing: border-box;
}
.cc-mod__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1.1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.04);
}
.cc-mod__hero h1 {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 800;
  color: #1e293b;
  line-height: 1.35;
}
.cc-mod__hero p {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.55;
}
.cc-mod__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.cc-mod__back:hover {
  color: #0f766e;
  border-color: #99f6e4;
  background: #ecfdf5;
}
.cc-mod__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cc-mod__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cc-mod__tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
}
.cc-mod__tabs a.is-on {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.cc-mod__filters select {
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 0.55rem;
  background: #fff;
}
.cc-mod-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}
.cc-mod-table th,
.cc-mod-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  font-size: 0.86rem;
}
.cc-mod-table th {
  background: #f8fafc;
  color: #475569;
  text-align: right;
  font-weight: 700;
}
.cc-mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cc-mod-actions form { display: inline; }
.cc-mod-actions button {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0.45rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.cc-mod-actions .ok {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #115e59;
}
.cc-mod-actions .bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.cc-badge {
  display: inline-flex;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
}
.cc-badge.pending { background: #fef3c7; color: #92400e; }
.cc-badge.approved { background: #dcfce7; color: #166534; }
.cc-badge.rejected { background: #fee2e2; color: #991b1b; }

@media (max-width: 575.98px) {
  .cc-mod__hero { padding: 0.8rem 0.9rem; }
  .cc-mod-table th:nth-child(3),
  .cc-mod-table td:nth-child(3) { display: none; }
}
