.comment-section {
  margin-top: 16px;
}
.c-box {
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
}
.c-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}
.c-main {
  flex: 1;
}
.c-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.c-name {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}
.c-time {
  font-size: 11px;
  color: #999;
}
.c-source-tag {
  font-size: 10px;
  background: #e6f7ff;
  color: #1890ff;
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid #91d5ff;
}
.c-body {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}
.c-content {
  /* Legacy support removed/merged into c-body */
}
.c-files {
  margin-top: 6px;
}
.c-files {
  margin-top: 4px;
}
.c-file-tag {
  display: inline-block;
  font-size: 11px;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
  color: #666;
}
.no-comments {
  color: #ccc;
  font-size: 13px;
  font-style: italic;
  margin-bottom: 12px;
}
/* Optimized Comment Input Box */
.comment-input-box {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  /* Mobile optimization: Sticky bottom for better accessibility */
  background: #fff;
  padding: 10px;
  border-top: 1px solid #f0f0f0;
  align-items: flex-end; /* Align buttons to bottom when textarea grows */
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* Common input styles */
.comment-input-box input,
.comment-input-box textarea {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px; /* Rounded pill shape */
  padding: 8px 12px;
  font-size: 14px;
  background: #f9f9f9;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

/* Specific textarea styles */
.comment-input-box textarea {
  resize: none;
  min-height: 38px;
  line-height: 1.4;
  display: block;
  overflow-y: hidden; /* Hide scrollbar initially */
}

.comment-input-box input:focus,
.comment-input-box textarea:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* Button styles */
.comment-input-box button {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 19px;
  padding: 0 16px;
  font-size: 13px;
  cursor: pointer;
  height: 38px;
  font-weight: 600;
  transition: opacity 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-input-box button:active {
  opacity: 0.8;
}

/* Icon button override */
.comment-input-box .btn-icon {
  background: #f5f5f5 !important;
  color: #666 !important;
  padding: 0 !important;
  width: 38px;
  border-radius: 50%;
  font-size: 18px;
}

/* Image styles */
.c-imgs {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.c-img-thumb {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #eee;
}

/* Attachment Preview */
.attach-preview {
  margin-top: 8px;
  padding: 0 4px;
}
.ap-box {
  position: relative;
  display: inline-block;
}
.ap-img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #ddd;
}
.ap-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
