/**
 * SmartQA 知识板块样式
 */

/* 集合卡片网格 */
.smartqa-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

/* 集合卡片 */
.smartqa-collection-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smartqa-collection-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.collection-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 8px;
}

.collection-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collection-meta {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  font-size: 14px;
  color: #6b7280;
  padding: 8px 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

.collection-date {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
}

.collection-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.collection-actions button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 文档列表 */
.document-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.document-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.document-table thead {
  background: #f9fafb;
}

.document-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.document-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #111827;
  border-bottom: 1px solid #f3f4f6;
}

.document-table tbody tr:last-child td {
  border-bottom: none;
}

.document-table tbody tr:hover {
  background: #f9fafb;
}

.doc-checkbox {
  cursor: pointer;
}

.btn-delete-doc {
  padding: 4px 12px;
  font-size: 13px;
}

/* 对话框样式 */
.smartqa-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.smartqa-dialog-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.smartqa-dialog h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.smartqa-dialog label {
  display: block;
  margin-bottom: 16px;
}

.smartqa-dialog label span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.smartqa-dialog input[type="text"],
.smartqa-dialog input[type="file"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.smartqa-dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

.smartqa-dialog-status {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 13px;
  color: #1e40af;
  min-height: 20px;
}

/* 空状态 */
.smartqa-empty {
  padding: 60px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
}

/* 集合详情页标题 */
.smartqa-collection-detail-header {
  margin-bottom: 24px;
}

.smartqa-collection-detail-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.smartqa-collection-detail-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}
