/* Comment Files Styles */

/* File preview in comment form */
.comment-files-preview {
  margin-top: 8px;
  padding: 8px;
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 4px;
  border: 1px solid var(--border-color, #e0e0e0);
}

.comment-file-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: white;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 13px;
}

.comment-file-preview-item:last-child {
  margin-bottom: 0;
}

.comment-file-preview-item .file-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.comment-file-preview-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary, #333);
}

.comment-file-preview-item .file-size {
  color: var(--text-secondary, #666);
  font-size: 12px;
  flex-shrink: 0;
}

.comment-file-preview-item .file-remove-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.comment-file-preview-item .file-remove-btn:hover {
  background: var(--error-color, #ff4444);
  color: white;
}

/* Files list in comments */
.comment-files-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-secondary, #f8f9fa);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 4px;
  transition: all 0.2s;
}

.comment-file-item:hover {
  background: var(--bg-hover, #e9ecef);
  border-color: var(--primary-color, #007bff);
}

.comment-file-item .file-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.comment-file-item .file-download-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 4.5px 0 !important; /* было 6px, уменьшено на 25% по вертикали */
  min-height: auto !important; /* Убрать минимальную высоту */
  height: auto !important; /* Автоматическая высота */
  cursor: pointer;
  text-align: left;
  color: var(--text-primary, #333);
  font-size: 13px;
  transition: color 0.2s;
}

.comment-file-item .file-download-btn:hover {
  color: var(--primary-color, #007bff);
}

.comment-file-item .file-download-btn .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.comment-file-item .file-download-btn .file-size {
  color: var(--text-secondary, #666);
  font-size: 12px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .comment-file-preview-item,
  .comment-file-item {
    font-size: 12px;
  }
  
  .comment-file-preview-item .file-size,
  .comment-file-item .file-download-btn .file-size {
    font-size: 11px;
  }
}
