// 主容器样式
.questionAnswerInfo {
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  border-radius: @border-radius-base;
  .pl-20{
    padding-left: 20px;
  }
  // 内容区域
  &-content {
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    padding: 16px 20px;

    // 标题样式
    &-title {
      width: 100%;
      max-width: 646px;
      height: 48px;
    }
  }
  .tags-info{
    border: 1px solid #d9d9d9;
    width: 100%;
    max-width: 646px;
    min-height: 46px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 2px 5px;
    .tags-list{
      width: 80%;
    }
  }
}
.modal_top{
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  .ant-input{
    width: 200px !important;
  }
  .ant-input-affix-wrapper{
    width: auto !important;
  }
}
.ant-btn-outlined {
    background: 'transparent' !important;
    border: '1px solid #1677ff';
    color: '#1677ff';
}
.cup{
  cursor: pointer;
  margin-right: 10px;
}
// 通用布局样式
.flex {
  &-center {
    &-container {
      width: 100%;
      min-height: 100%;
      background: #ffffff;
      // 移除浅灰色背景，让父级背景色生效
    }

    display: flex;
    justify-content: center;
    align-items: center;

    &-top {
      display: flex;
      justify-content: center;
      align-items: center;
      padding-top: 50px;
      font-size: 16px;
    }
  }

  &-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  &-start {
    display: flex;
    justify-content: flex-start;
  }
  &-end {
    display: flex;
    justify-content: flex-end;
  }
}

// 按钮样式
.btn {
  &-cancel {
    background: #f5f5f5;
    border: none;
    color: #000000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    &:hover {
      background: #e8e8e8;
      color: #000000;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      transform: translateY(-1px);
    }

    &:active {
      background: #dcdcdc;
      color: #000000;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
      transform: translateY(0);
    }

    &:focus {
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
  }

  &-back {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    color: #595959;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    &:hover {
      background: #fafafa;
      border-color: #40a9ff;
      color: #40a9ff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      transform: translateY(-1px);
    }

    &:active {
      background: #f0f0f0;
      border-color: #1890ff;
      color: #1890ff;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
      transform: translateY(0);
    }

    &:focus {
      border-color: #40a9ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }
  }
}

// 表单样式
.form {
  &-control {
    &-width {
      width: 100%;
      max-width: 646px;
    }

    &-height {
      height: 48px;
    }
  }

  &-input {
    &-large {
      width: 100%;
      max-width: 646px;
      height: 48px;
      padding: 8px;
    }

    &-number-small {
      margin: 0 16px;
      width: 100px;
    }
  }

  &-textarea {
    &-large {
      height: 96px;
      resize: none;
      width: 100%;
      min-width: 200px;
      max-width: 646px;
    }
  }

  // 统一表单元素宽度样式
  &-element {
    &-standard {
      width: 100%;
      max-width: 646px;
      min-width: 200px;
    }

    &-full-width {
      width: 100%;
    }

    &-button-group {
      width: 100%;
      max-width: 646px;
      display: flex;
      
      .ant-radio-group {
        width: 100%;
        display: flex;
        
        .ant-radio-button-wrapper {
          flex: 1;
          text-align: center;
        }
      }
    }

    &-select {
      width: 100%;
      max-width: 646px;
      min-width: 200px;
    }

    &-input-number {
      width: 100%;
      max-width: 646px;
      min-width: 200px;
    }
  }
}

// Splitter 面板背景样式
.ant-splitter-panel {
  &:first-child {
    // 左侧 35% 区域 - Prompt 区域
    background: #ffffff;
  }
  
  &:nth-child(2) {
    // 中间 30% 区域 - 配置区域
    background: #f5f5f5;
  }
  
  &:last-child {
    // 右侧 35% 区域 - 聊天区域保持白色背景
    background: #ffffff;
  }
}

// 更多设置区域统一样式
.more-settings-section {
  padding-top: 20px;
  
  .flex-center {
    margin-bottom: 20px;
  }
  
  .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    text-align: center;
    margin: 20px 0;
  }
}

// 文本区域样式
.textarea {
  &-full-width {
    width: 100%;
  }

  &-fixed-height {
    height: 300px;
  }
}

// 预设问题区域样式
.preset-questions {
  margin: 24px 0;

  h4 {
    margin-bottom: 16px;
    color: #262626;
  }

  .question-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;

    label {
      min-width: 60px;
      color: #595959;
      flex-shrink: 0;
    }

    .question-input {
      flex: 1;
      min-width: 200px;
      max-width: 400px;
      margin: 0;
    }

    .question-actions {
      display: flex;
      gap: 8px;
      flex-shrink: 0;

      .question-icon {
        margin: 0;
        font-size: 18px;
        color: @primary-color;
        cursor: pointer;
        transition: all 0.3s ease;

        &:hover {
          color: @primary-color;
          transform: scale(1.1);
        }
      }
    }
  }
}

// 问题输入框样式（保留向后兼容）
.question-input {
  width: 100%;
  max-width: 300px;
  padding-top: 8px;
  margin-left: 20px;
}

.link-more-settings {
  color: @primary-color;
  cursor: pointer;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

// 标题和链接样式
.section-title {
  font-size: 14px;
  font-weight: 500;
  color: #262626;
  background: #f5f5f5;
  padding: 12px 20px;
}

// Prompt编辑器布局样式
.prompt {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  // 滚动条
  overflow-y: auto;
  background: #f5f5f5;
  // 提示词模板显示区域
  &-info {
    padding: 0px 20px 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    // border-bottom: 1px solid #fff;

    &-text {
      // 说明文本

      .variable-highlight {
        color: #1890ff;
        font-weight: 500;
        padding: 2px 6px;
        border-radius: 1px;
        font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
        margin: 0 2px;
      }
    }
  }

  // 提示词编辑区域
  &-editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    // background: #ffffff;
    // border-top: none; // 移除顶部边框，避免与 prompt-info 的底部边框重叠
    padding: 0 20px;
    .ant-form-item {
      margin-bottom: 0;
      height: 100%;

      .ant-form-item-control {
        height: 100%;

        .ant-form-item-control-input {
          height: 100%;

          .ant-form-item-control-input-content {
            height: 100%;

            .ant-input {
              height: 100%;
              border: 1px solid #f0f0f0;
              border-radius: 8px;
              padding: 16px;
              font-size: 14px;
              line-height: 1.6;
              resize: none;

              &:focus {
                border-color: #1890ff;
                box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
              }

              &::placeholder {
                color: #bfbfbf;
                font-style: italic;
              }
            }
          }
        }
      }
    }
  }
}

// 隐藏 prompt 区域的滚动条（仍可滚动，只隐藏可视滚动条）
.questionAnswerInfo {
  .ant-splitter-panel{
        -ms-overflow-style: none; /* IE 10+ */
    scrollbar-width: none; /* Firefox */

    &::-webkit-scrollbar {
      display: none; /* Chrome, Safari, Opera */
      width: 0;
      height: 0;
    }
  }
  .prompt,
  .prompt-editor-area,.ant-input {
    -ms-overflow-style: none; /* IE 10+ */
    scrollbar-width: none; /* Firefox */

    &::-webkit-scrollbar {
      display: none; /* Chrome, Safari, Opera */
      width: 0;
      height: 0;
    }
  }
}

.half-width {
  margin: 0 auto;
  width: 100%;
  height: 100%;
}

// 间距样式
.padding {
  &-top {
    &-10 {
      padding-top: 10px;
    }

    &-20 {
      padding-top: 20px;
    }
  }

  &-bottom {
    &-10 {
      padding-bottom: 10px;
    }

    &-12 {
      padding-bottom: 12px;
    }

    &-16 {
      padding-bottom: 16px;
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .questionAnswerInfo {
    &-content {
      &-title {
        max-width: 100%;
      }
    }
  }

  .form {
    &-control-width,
    &-input-large,
    &-textarea-large {
      max-width: 100%;
    }
  }

  .question-input {
    max-width: 100%;
    margin-left: 0;
  }

  .half-width {
    width: 100%;
  }

  .preset-questions {
    .question-item {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;

      label {
        min-width: auto;
      }

      .question-input {
        width: 100%;
        max-width: 100%;
        min-width: auto;
      }

      .question-actions {
        align-self: flex-end;
      }
    }
  }
}

@media (max-width: 480px) {
  .questionAnswerInfo {
    &-content {
      padding: 16px;
    }
  }

  .form {
    &-input-large,
    &-textarea-large {
      padding: 6px;
    }
  }

  .preset-questions {
    .question-item {
      .question-actions {
        align-self: center;
        width: 100%;
        justify-content: center;
      }
    }
  }
}
