#comments {
  margin: 30px 0;
}

#comments .block-head {
  position: relative;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8ecf1;
}
#comments .block-head h5 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#comments .block-head h5::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: #0083b4;
  border-radius: 2px;
}
#comments .hr {
  display: none;
}

#respond {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #f0f2f5;
  transition: box-shadow 0.3s ease;
}
#respond:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#respond .block-head {
  margin-bottom: 16px;
}
#respond .block-head h5 {
  font-size: 16px;
}

#commentform .input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
#commentform .input-group .form-control {
  flex: 1;
  min-width: 180px;
}
#commentform .form-control {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  background: #fafbfc;
  transition: all 0.25s ease;
  outline: none;
  box-shadow: none;
}
#commentform .form-control:focus {
  border-color: #0083b4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,131,180,0.12);
}
#commentform .form-control::placeholder {
  color: #adb5bd;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8f9fe;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #5a6072;
  border: 1px solid #eef0f5;
}
.comment-user i {
  color: #0083b4;
}
.comment-user a {
  color: #0083b4;
  font-weight: 500;
  text-decoration: none;
}
.comment-user a:hover {
  text-decoration: underline;
}

.form_imcn {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.form_imcn img {
  border-radius: 50%;
  width: 44px !important;
  height: 44px !important;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #eef0f5;
}
.form_imcn > div {
  flex: 1;
}

.emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #e8ecf1;
}
.emoji-item {
  cursor: pointer;
  padding: 2px 4px;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
  border-radius: 4px;
  user-select: none;
}
.emoji-item:hover {
  transform: scale(1.25);
  background: #f0f2f5;
}

#commentform textarea.form-control {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  line-height: 1.6;
}

.form-group.text-center {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.buttom_r {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0083b4;
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,131,180,0.3);
}
.buttom_r:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,131,180,0.4);
}
.buttom_r:active {
  transform: translateY(0);
}
.buttom_r i {
  font-size: 14px;
}

ul.commentlist,
ol.commentlist,
ul.children,
ol.children {
  list-style: none;
  padding: 0;
  margin: 0;
}
.commentlist li,
#comments li {
  list-style: none;
}

.commentlist > li {
  position: relative;
  padding: 20px 0;
  border-bottom: 1px solid #f0f2f5;
  transition: background 0.2s ease;
}
.commentlist > li:last-child {
  border-bottom: none;
}
.commentlist > li:hover {
  background: rgba(0,131,180,0.02);
}

.commentlist li.comment .gravatar {
  float: left;
  margin-right: 16px;
  text-align: center;
  width: 44px;
}
.commentlist li.comment .gravatar img {
  border-radius: 50%;
  width: 44px !important;
  height: 44px !important;
  object-fit: cover;
  border: 2px solid #f0f2f5;
}
.commentlist li.comment .gravatar .comment-reply-link {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #9099a8;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.commentlist li.comment .gravatar .comment-reply-link:hover {
  color: #0083b4;
}

.commentlist li.comment .comment_content {
  overflow: hidden;
}

.commentlist li.comment .author_name {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 14px;
  font-style: normal;
}
.commentlist li.comment .author_name a {
  color: #1a1a2e;
  text-decoration: none;
}
.commentlist li.comment .author_name a:hover {
  color: #0083b4;
}

.comment-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: transparent;
  color: #b0b8c4;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.comment-edit-link:hover {
  background: #0083b4;
  color: #fff;
  text-decoration: none;
}
.comment-edit-wrap-btn {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.commentlist li.comment .comment-meta,
.commentlist li.comment .commentmetadata {
  font-size: 12px;
  color: #a0a8b5;
  margin: 2px 0 8px;
  display: inline;
}

.comment-edit-wrap {
  margin: 8px 0;
}
.comment-edit-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1.5px solid #0083b4;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #fff;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.comment-edit-textarea:focus {
  box-shadow: 0 0 0 3px rgba(0,131,180,0.12);
}
.comment-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.comment-edit-save,
.comment-edit-cancel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.comment-edit-save {
  background: #0083b4;
  color: #fff;
}
.comment-edit-save:hover {
  background: #006f99;
}
.comment-edit-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.comment-edit-cancel {
  background: #f0f2f5;
  color: #5a6072;
}
.comment-edit-cancel:hover {
  background: #e0e2e6;
}

.commentlist li.comment .comment_text {
  color: #4a5064;
  line-height: 1.8;
  word-wrap: break-word;
  font-size: 14px;
  clear: both;
}
.commentlist li.comment .comment_text p {
  margin-bottom: 6px;
}

.commentlist li.comment .comment_text em {
  display: inline-block;
  background: #fff8e1;
  color: #b8860b;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-style: normal;
  margin-bottom: 8px;
}

.commentlist .children {
  padding-left: 60px !important;
  margin: 12px 0 4px;
  border-left: 3px solid #e8ecf1;
  border-radius: 0 0 0 4px;
}
.commentlist .children li {
  padding: 14px 0;
  border-bottom: 1px solid #f5f6f8;
}
.commentlist .children li:last-child {
  border-bottom: none;
}

.comment-awaiting-moderation {
  background: #fff8e1 !important;
  color: #b8860b;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 10px;
  display: block;
  border: 1px solid #ffecb3;
}

#cancel-comment-reply-link {
  color: #ef4444;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}
#cancel-comment-reply-link:hover {
  text-decoration: underline;
  color: #dc2626;
}

.butterBar {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  text-align: center;
  pointer-events: none;
}
.butterBar-message {
  background: #0083b4;
  color: #fff;
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0,131,180,0.35);
  display: inline-block;
  font-size: 14px;
  margin-bottom: 0;
  padding: 12px 32px;
  animation: slideDown 0.35s ease;
  pointer-events: auto;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.decmt-box {
  list-style: none;
  padding: 30px 20px;
  text-align: center;
  background: #f8f9fe;
  border-radius: 10px;
  border: 1px dashed #d0d5e0;
  margin: 10px 0;
}
.decmt-box p {
  margin: 0;
}
.decmt-box a {
  color: #9099a8;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.decmt-box a:hover {
  color: #0083b4;
}
.decmt-box a i {
  margin-right: 6px;
}

@media (max-width: 768px) {
  #respond {
    padding: 16px;
    border-radius: 8px;
  }
  #commentform .input-group {
    flex-direction: column;
    gap: 8px;
  }
  #commentform .input-group .form-control {
    min-width: auto;
  }
  .form_imcn {
    flex-direction: column;
    gap: 10px;
  }
  .form_imcn img {
    width: 36px !important;
    height: 36px !important;
  }
  .commentlist .children {
    padding-left: 24px !important;
  }
  .commentlist li.comment .gravatar {
    width: 36px;
    margin-right: 12px;
  }
  .commentlist li.comment .gravatar img {
    width: 36px !important;
    height: 36px !important;
  }
  .commentlist li.comment .gravatar .comment-reply-link {
    font-size: 10px;
  }
  .butterBar {
    top: 60px;
    width: 90%;
  }
  .butterBar-message {
    font-size: 13px;
    padding: 10px 20px;
  }
}
