/**
 * @file 比较器页面样式。
 * 定义 API 配置、控制台、差异结果、使用说明及响应式布局。
 */

/* 基础元素 */
body{
  font-family: 'Arial', sans-serif;
}

li{
  list-style: none;
}

fieldset{
  padding: 0.5em;
  margin: 1px;
}

button:hover{
  cursor: pointer;
}

button:disabled{
  cursor: not-allowed;
  opacity: 0.55;
}

/* 页头与项目入口 */
header{
  height: 32px;
}

.header-anchor{
  display: inline-block;
  padding: 0;
  margin: 0;
  height: 100%;
}

.header-anchor-logo{
  display: inline-block;
  padding: 1px;
  height: 30px;
}

/* API 配置区域 */
.APIConfig{
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-group{
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.input-group label{
  width: 230px;
  margin-right: 10px;
}

.APIConfig button{
  width: 200px;
}

.selectForm{
  width: 15em;
  box-sizing: border-box;
}

/* DeepSeek 峰谷时段状态 */
.time-context{
  margin-left: 10px;
  font-weight: normal;
}

.deepseek-time-status{
  margin-left: 4px;
  font-size: 1.1em;
  font-weight: bold;
}

.deepseek-time-status.peak{
  color: #D32F2F;
}

.deepseek-time-status.off-peak{
  color: #2E7D32;
}

.field-link{
  margin-left: 10px;
  white-space: nowrap;
}

/* Vue 抽屉过渡动画 */
.reasoning-drawer-enter-active,
.reasoning-drawer-leave-active{
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-bottom 0.25s ease;
}

.reasoning-drawer-enter,
.reasoning-drawer-enter-from,
.reasoning-drawer-leave-to{
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
}

.reasoning-drawer-enter-to,
.reasoning-drawer-leave,
.reasoning-drawer-leave-from{
  max-height: 40px;
  margin-bottom: 4px;
  opacity: 1;
}

.step-drawer-enter-active,
.step-drawer-leave-active{
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease,
  margin-bottom 0.3s ease, transform 0.3s ease;
}

.step-drawer-enter,
.step-drawer-enter-from,
.step-drawer-leave-to{
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(-6px);
}

.step-drawer-enter-to,
.step-drawer-leave,
.step-drawer-leave-from{
  max-height: 200px;
  margin-bottom: 4px;
  opacity: 1;
  transform: translateY(0);
}

/* 使用说明区域 */
#introduction{
  background-color: #F5F5F5;
  padding: 0.5em;
}

.introduction-list,
.introduction-list-li{
  padding: 0;
  margin: 0 0 0 4px;
  list-style: decimal;
}

/* 控制台与说明栏布局 */
.operation{
  min-height: 75vh;
  display: grid;
  grid-template-columns: 3fr 1fr;
}

#console{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-btns{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 4px;
  height: 2em;
}

.console-inputs{
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

#console-textarea{
  flex: 1;
  overflow: auto;
}

#sp{
  margin-right: 6px;
}

#textJson{
  width: 100%;
  height: 95%;
  overflow: auto;
  margin-top: 10px;
  resize: none;
  padding: 4px;
  box-sizing: border-box;
}

summary{
  font-weight: bold;
  cursor: pointer;
}

/* 差异结果与状态提示 */
.diff-green{
  color: green;
}

.diff-red{
  color: red;
}

.diff-blue{
  color: blue;
}

.error-message{
  margin-left: 10px;
  color: red;
  font-weight: bold;
}

.save-message{
  margin-left: 10px;
  font-weight: bold;
}

.save-message.success{
  color: green;
}

.save-message.error{
  color: red;
}

.status-message{
  margin-left: 10px;
  font-weight: bold;
}

.status-message.success{
  color: green;
}

.status-message.error{
  color: red;
}

.disc-list-item{
  list-style: circle;
}

.warning-text{
  color: #F00;
}

/* 响应式布局 */
@media (max-width: 1001px){
  .operation{
    display: grid;
    grid-template-columns: 2fr 1fr;
  }
}

@media (max-width: 768px){
  .operation{
    grid-template-columns: 1fr;
  }

  .input-group{
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .input-group label{
    width: 100%;
    margin-right: 0;
  }

  .selectForm{
    width: 100%;
    max-width: none;
  }

  .console-inputs{
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .console-inputs label{
    flex: 0 0 100%;
  }

  .console-btns{
    height: auto;
  }

  #textJson{
    min-height: 320px;
  }
}
