@import '../common.less';

/* 知识指示器容器 */
.knowledge-indicator-container {
  width: 100%;
  padding: 0;
  margin: 0;
  background-color: rgba(6, 177, 171, 0.08);
  border-bottom: 1px solid #f0f0f0;
}

.selected-knowledge-indicator {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  font-size: 13px;
  color: @text-secondary;
}

.knowledge-icon {
  margin-right: 8px;
  color: @primary-color;
  font-size: 16px;
}

/* 空状态下的知识卡片容器 */
.empty-knowledge-container {
  box-sizing: border-box;
  margin: 0 auto;
  width: 300px;
  padding: 0;
}

/* 主容器样式 */
.playground-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 头部导航栏 */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  background-color: #fff;
  border-bottom: 1px solid @border-color;
}

.logo-container {
  display: flex;
  align-items: center;
}

.midscene-logo {
  height: 24px;
  margin-right: 8px;
}

.logo-text {
  font-size: 16px;
  font-weight: 500;
  color: @text-primary;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 主要内容区域 */
.playground-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  height: calc(100vh - 48px);
  overflow: hidden;
}

/* 对话区域 */
.conversation-area {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 300px;
  max-height: none;
  height: auto;
  padding-top: 0;
  position: relative;
}

/* 修复超长内容的conversation-area会导致整个应用滚动的问题 */
.conversation-area::-webkit-scrollbar {
  width: 6px;
}

.conversation-area::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.conversation-area::-webkit-scrollbar-track {
  background-color: transparent;
}

/* 任务统计 */
.task-statistics {
  margin: 12px 0;
  padding: 12px;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid @border-color;
}

.stat-item {
  margin-bottom: 8px;
}

.stat-details {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: @text-secondary;
}

.error-count {
  color: @error-color;
}

/* 任务列表容器适配上级容器 */
.tasks-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 100%;
  padding-top: 6px;
}

/* 任务列表占位符 */
.task-list-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: @text-secondary;
  font-size: 14px;
}

.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: @primary-color;
  border-radius: 50%;
  margin: 0 4px;
  opacity: 0.6;
  animation: loadingDot 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
  animation-delay: -0.32s;
}

.dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loadingDot {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* 底部输入区域 */
.footer-input-area {
  padding: 8px 12px;
  border-top: 1px solid @border-color;
  background-color: #fff;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.footer-actions-container {
  margin-bottom: 24px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.retry-button-wrapper, 
.return-button-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

/* 返回主页按钮样式 */
.return-button-wrapper .ant-btn-primary,
.return-button-wrapper .ant-btn-primary.action-button,
.ant-btn-primary.action-button.ant-btn {
  background-color: @primary-color !important;
  border-color: @primary-color !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

.return-button-wrapper .ant-btn-primary:hover,
.return-button-wrapper .ant-btn-primary.action-button:hover,
.ant-btn-primary.action-button.ant-btn:hover {
  background-color: darken(@primary-color, 10%) !important; /* 加深绿色 */
  border-color: darken(@primary-color, 10%) !important;
  box-shadow: @box-shadow-primary !important;
}

.input-wrapper {
  margin-bottom: 0;
}

.textarea-container {
  position: relative;
}

/* 移除冲突的背景色设置 */
.input-with-button {
  display: flex;
  align-items: flex-end;
  background-color: transparent; /* 改为透明背景 */
  border-radius: 18px;
  padding: 6px 8px;
  border: none; /* 移除边框，由input.less控制 */
}

.input-with-button .ant-input-textarea {
  background: transparent;
  border: none;
  padding: 0;
  margin-right: 8px;
  flex: 1;
}

.input-with-button .ant-input-textarea .ant-input {
  background: transparent;
  border: none;
  box-shadow: none !important;
  padding: 3px 6px;
  resize: none;
  line-height: 1.5;
  font-size: 14px;
}

.input-with-button .ant-input-textarea .ant-input:focus {
  box-shadow: none !important;
  outline: none;
} 