/* کانتینر کلی */
.ccs-comment-wrapper {
  border-top: 1px solid #e8eff6;
}

/* دسترسی‌پذیری */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* فرم */
.ccs-comment-submit {
  text-align: center;
  margin: 24px 0px;
  position: relative;
}

.ccs-form-wrapper {
  background: #f9fcff00;
  border: 1px solid #A2D5F2;
  padding: 40px 24px 24px 24px;
  border-radius: 12px;
}

form#commentform {
  max-width: 1114px;
}

.ccs-row.four-col {
  display: flex;
  gap: 24px;
  align-items: flex-end;
}

.ccs-input-block label {
  gap: 8px;
  font-size: 14px;
  color: #78A5BF;
}

.ccs-form-group.group-two {
  margin-top: 24px;
  display: flex;
  align-items: flex-end;
  gap: 108px;
}

.ccs-input-block input[type=text],
.ccs-input-block textarea {
  width: 100%;
  background: #d7e4f000;
  border: 1px solid #A2D5F2;
  border-radius: 10px;
  padding: 10px 12px;
  outline: 0;
}

.ccs-input-block textarea {
  min-height: 140px;
}

.form-submit .submit {
  background: #88B04B;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
}

.form-submit .submit:hover {
  background: #577629;
  border: 1px solid #577629;
}

/* ستاره‌ها (فرم) */
.star {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.ccs-stars {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ccs-stars .star {
  width: 36px;
  margin-top: 4px;
  transition: transform .05s;
}

.ccs-stars .star:hover {
  transform: translateY(-1px);
}

/* لنگر تاریخ: پنهان ولی نزدیک دکمه */
.ccs-date-block {
  position: relative;
}

.ccs-date-anchor {
  position: absolute;
  top: 50%;
  inset-inline-end: 12px;
  transform: translateY(-50%);
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
}

/* خطا زیر فیلد */
.ccs-input-block {
  position: relative;
}

.ccs-input-block.has-error input[type="text"],
.ccs-input-block.has-error textarea,
.ccs-input-block.has-error .ccs-picker-btn {
  border-color: #d33 !important;
}

.ccs-field-error {
  margin-top: 8px;
  font-size: 12px;
  color: #b3261e;
}

/* دکمه‌های انتخاب فایل/تاریخ */
.ccs-file-label {
  width: 242px
}

.ccs-picker-btn,
.ccs-file-label {
  border: 1px solid #A2D5F2 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
}

.ccs-picker-text {
  color: #78A5BF;
  font-size: 14px;
}

.ccs-file-label {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: center;
}

#commentform .ccs-input-block input[type=file].ccs-file-input,
#commentform input#ccs_photo[type=file] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

div#ccs_photo_list {
  font-size: 12px;
}

/* آیتم دیدگاه */
.comment-body {
  border: 1px solid #A2D5F2;
  border-radius: 12px;
  padding: 0px;
  margin: 16px 0px 32px 0px;
}

.comment-meta {
  display: none !important;
}

.custom-avatar {
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

/* نوار بالا */
.ccs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #CCE9FA;
  padding: 16px;
}

.ccs-bar .row-items {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.ccs-bar .meta-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #174372;
}

.ccs-bar .meta-block .ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ستاره‌های ثابت */
.exp-stars {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.exp-rating-text {
  font-size: 13px;
  color: #6b7a88;
}

.exp-stars-wrap {
  display: inline-flex;
  gap: 4px;
}

.ccs-star-static svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* متن دیدگاه */
.ccs-comment-text {
  color: #1c2b39;
  padding: 16px;
}

.ccs-comment-text p {
  margin: 0px;
}

/* اکشن‌ها */
.ccs-reactions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
}

.ccs-reply a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  text-decoration: none;
  color: white;
  background: #A2D5F2;
  border-radius: 8px;
}

.ccs-reply a:hover {
  background: #78A5BF;
  color: #fff;
}

/* صفحه‌بندی */
.ccs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 26px 0;
}

.ccs-page,
.ccs-prev,
.ccs-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d7e4f0;
  border-radius: 8px;
  background: #fff;
  color: #174372;
  text-decoration: none;
}

.ccs-page.active {
  background: #2fb7f3;
  color: #fff;
  border-color: #2fb7f3;
}

.ccs-page.dots {
  border: none;
  background: transparent;
  width: auto;
}

/* بچه‌ها داخل باکس والد */
.children-inside {
  list-style: none;
  margin: 12px 180px;
  padding-inline-start: 0;
}

.children-inside>li {
  margin-top: 12px;
}

.children-inside .comment-body {
  background-color: #F1F6F2;
  border: 1px solid #A2D5F2;
  border-radius: 8px;
}

.children-inside .children-inside {
  margin-top: 10px;
  border-top-style: dotted;
}

/* برچسب‌ها */
.author span {
  font-weight: 600;
  font-size: 14px;
}

.visit span {
  font-size: 14px;
}

span.ccs-picker-ico {
  margin-bottom: -5px;
  font-size: 14px;
}

button#ccs_date_btn {
  gap: 8px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
}

.ccs-like span,
.ccs-dislike span {
  color: #416173;
}

/* حالت پاسخ */
#commentform.is-reply .ccs-form-wrapper {
  padding: 16px;
  border: 1px solid #A2D5F2;
}

#commentform.is-reply .ccs-row.four-col {
  gap: 12px;
}

#commentform.is-reply .ccs-name-block {
  width: 240px;
}

#commentform.is-reply .group-two .ccs-input-block {
  width: 100%;
}

#commentform.is-reply .form-submit {
  text-align: right;
}

#commentform.is-reply .form-submit .submit {
  background: #A2D5F2;
  color: #174372;
  border: 1px solid #A2D5F2;
  border-radius: 8px;
  padding: 8px 14px;
}

#commentform.is-reply .form-submit .submit:hover {
  background: #78A5BF;
  border-color: #78A5BF;
  color: #fff;
}

/* پاپ‌آپ موفقیت */
.ccs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 25, 40, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 1;
  transition: opacity .12s ease;
}

.ccs-modal-overlay.closing {
  opacity: 0;
}

/* مودال جایگاه نسبی بگیرد تا بتوانیم دکمه را مطلق کنیم */
.ccs-modal {
  position: relative;
  /* اضافه شد */
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 20px 20px 16px;
  width: min(92vw, 430px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  flex-direction: column;
  align-items: center;
}

/* دکمهٔ بستن در چپِ بالا */
.ccs-modal-close {
  position: absolute;
  top: 8px;
  left: 8px;
  /* صراحتاً سمت چپ */
  right: auto;
  background: transparent;
  border: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: #174372;
}

.ccs-modal-close:hover {
  color: #c62828;
  transform: scale(1.05);
}

.ccs-modal-title {
  font-weight: 700;
  font-size: 18px;
  color: #174372;
  margin-bottom: 10px;
}

.ccs-modal-body {
  color: #1c2b39;
  font-size: 14px;
  line-height: 1.8;
}

.ccs-modal-actions {
  margin-top: 16px;
  text-align: center;
}

.ccs-modal-actions .ccs-modal-ok {
  background: #88B04B;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

.ccs-modal-actions .ccs-modal-ok:hover {
  background: #577629;
}
.ccs-invalid {
  border-color: #c62828 !important;
  background: #ffebee !important;
}
.ccs-picker-btn.ccs-invalid {
  border-color: #c62828 !important;
  background: #ffebee !important;
}
/* واکنش‌های ریسپانسیو */
@media screen and (max-width: 992px) {
  .ccs-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-body {
    padding: 0px;
  }

  .ccs-bar,
  .ccs-comment-text {
    padding: 16px 8px;
  }

  .ccs-row.four-col {
    gap: 24px;
  }

  .ccs-form-group.group-two {
    gap: 32px !important;
    margin-top: 0px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  input#author {
    width: 100%;
    height: 40px;
  }
}
