@use './variables.scss' as *;

@mixin rich-text($font-size: 16pt) {
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: $font-size;

  :deep ul {
    padding-inline-start: 40px;

    li {
      list-style: disc;
    }
  }
}

// 预览
@mixin preview {
  display: flex;
  flex-direction: column;
  row-gap: 24px;
  min-height: calc(100% - 32px);
  padding: 32px 64px;
  margin: 16px 0;
  background-color: #fff;
  border-radius: 8px;

  // 富文本格式
  .rich-text {
    @include rich-text;
  }

  // 题干
  .stem {
    display: flex;
    align-items: flex-start;
    color: #34343a;

    @include rich-text(18pt);

    .question-number {
      margin-right: 4px;

      + span {
        flex: 1;
      }
    }

    :deep p {
      margin: 0;
    }
  }

  // 描述
  .description {
    min-height: 48px;
    padding: 12px 24px;
    background-color: $content-color;
    border-radius: 16px;
  }

  .option-list {
    :deep p {
      margin: 0;
    }
  }

  // 参考答案
  .reference-box {
    padding: 12px;
    background: $content-color;

    .reference-title {
      margin: 0 0 10px;
      font-size: 14px;
      font-weight: 400;
      line-height: 32px;
      color: $font-light-color;
    }

    .reference-answer {
      white-space: pre-wrap;
    }
  }

  // 解析
  .analysis {
    padding: 12px;
    background: $content-color;

    &-title {
      display: block;
      font-size: 14px;
      font-weight: 400;
      line-height: 32px;
      color: $font-light-color;
    }

    &-content {
      @include rich-text(14pt);
    }
  }
}

// 列表
@mixin list {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  height: calc(100% - 16px);
  padding: 24px;
  margin: 0 24px 16px;
  background: #fff;
  border-radius: 4px;
}
