/* ── Modern Comments Section ──────────────────────────────── */
.cmt-section {
  background: #f8f8f8;
}

.cmt-inner {
  max-width: 1070px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

@media (min-width: 800px) {
  .cmt-inner { padding: 80px 40px; }
}

@media (min-width: 1200px) {
  .cmt-inner { padding: 100px 0; }
}

/* ── Header ───────────────────────────────────────────────── */
.cmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}

.cmt-title {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: -0.2px;
}

@media (min-width: 800px) {
  .cmt-title { font-size: 26px; }
}

.cmt-count {
  font-weight: 400;
  color: #aaa;
}

/* ── Filter tabs ──────────────────────────────────────────── */
.cmt-filter {
  display: inline-flex;
  gap: 2px;
  background: #f0f0f0;
  padding: 4px;
  border-radius: 9999px;
}

.cmt-filter-btn {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background: none;
  border: none;
  border-radius: 9999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.cmt-filter-btn:hover:not(.active) {
  background: #e2e2e2;
  color: #333;
}

.cmt-filter-btn.active {
  background: #CE4257;
  color: #fff;
}

/* ── New comment form ─────────────────────────────────────── */
.cmt-form-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #ebebeb;
}

/* ── Avatars ──────────────────────────────────────────────── */
.cmt-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background-color: #CE4257;
  user-select: none;
  text-transform: uppercase;
}

.cmt-form {
  flex: 1;
  min-width: 0;
}

.cmt-textarea {
  width: 100%;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 15px;
  color: #333;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  line-height: 1.55;
}

.cmt-textarea::placeholder { color: #c0c0c0; }

.cmt-textarea:focus {
  outline: none;
  border-color: #CE4257;
}

.cmt-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.cmt-form-hint {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 12px;
  color: #ccc;
  display: none;
}

@media (min-width: 600px) {
  .cmt-form-hint { display: block; }
}

.cmt-submit-btn {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #CE4257;
  border: none;
  border-radius: 20px;
  padding: 9px 22px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.cmt-submit-btn:hover:not(:disabled) { background: #a8283a; }
.cmt-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Comment list ─────────────────────────────────────────── */
.cmt-list {
  display: flex;
  flex-direction: column;
}

/* ── Comment item ─────────────────────────────────────────── */
.cmt-item {
  display: flex;
  gap: 14px;
  padding: 24px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cmt-item:last-child { border-bottom: none; }

@media (min-width: 800px) {
  .cmt-item { gap: 18px; }
}

.cmt-body {
  flex: 1;
  min-width: 0;
}

/* ── Comment meta ─────────────────────────────────────────── */
.cmt-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cmt-author {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}

.cmt-date {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 13px;
  color: #bbb;
}

.cmt-options {
  margin-left: auto;
  background: none;
  border: none;
  color: #d0d0d0;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: color 0.15s ease;
}

.cmt-options:hover { color: #555; }

/* ── Comment text ─────────────────────────────────────────── */
.cmt-text {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 15px;
  color: #333;
  line-height: 1.65;
  margin: 0 0 12px;
}

/* ── Actions row ──────────────────────────────────────────── */
.cmt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.cmt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  padding: 6px 10px;
  border-radius: 20px;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.cmt-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.cmt-like.active,
.cmt-dislike.active {
  color: #CE4257;
}

.cmt-like.active:hover,
.cmt-dislike.active:hover {
  background: #fdf0f2;
}

.cmt-count-val {
  font-size: 13px;
  font-weight: 600;
}

/* caret animates when replies open */
.cmt-caret {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.cmt-replies-toggle[aria-expanded="true"] .cmt-caret {
  transform: rotate(90deg);
}

/* ── Inline reply form ────────────────────────────────────── */
.cmt-reply-form {
  margin-top: 16px;
  background: #f8f8f8;
  border-radius: 10px;
  padding: 14px;
}

.cmt-reply-textarea {
  width: 100%;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 14px;
  color: #333;
  resize: none;
  box-sizing: border-box;
  background: #fff;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}

.cmt-reply-textarea::placeholder { color: #c0c0c0; }
.cmt-reply-textarea:focus { outline: none; border-color: #CE4257; }

.cmt-reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.cmt-reply-cancel {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.cmt-reply-cancel:hover { border-color: #aaa; color: #333; }

.cmt-reply-submit {
  font-family: "DM Sans", Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #CE4257;
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cmt-reply-submit:hover { background: #a8283a; }

/* ── Replies list ─────────────────────────────────────────── */
.cmt-replies {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  border-left: 2px solid #f0f0f0;
  padding-left: 16px;
}

@media (min-width: 800px) {
  .cmt-replies { padding-left: 24px; }
}

.cmt-reply-item {
  padding: 16px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
}

.cmt-reply-item:last-child { border-bottom: none; padding-bottom: 0; }
.cmt-reply-item:first-child { padding-top: 0; }

.cmt-reply-item .cmt-avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.cmt-reply-item .cmt-text {
  font-size: 14px;
  margin-bottom: 8px;
}

.cmt-reply-item .cmt-author { font-size: 14px; }

/* ── Utility ──────────────────────────────────────────────── */
.cmt-hidden { display: none !important; }
