<script setup lang="ts">
interface Question {
  id: number
  title: string
  content: string[]
}

const questions: Question[] = [
  {
    title: '文案文案文案',
    content: [
      '文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案',
    ],
  },
  {
    title: '文案文案文案',
    content: [
      '文案文案文案文案文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文',
      '文案文案文案文案文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文',
      '文案文案文案文案文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文',
    ],
  },
  {
    title: '文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案',
    content: [
      '文案文案文案文案文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文案文',
      '文案文案文案文案文案文案文案文案文案文文案文案文案文案文案文文案文案文案文案文文案文案',
      '文案文案文',
    ],
  },
].map((item, index) => ({ ...item, id: index + 1 }))
</script>

<template>
  <div class="questions-list">
    <div v-for="item in questions" :key="item.id" class="card">
      <h2>Q: {{ item.title }}</h2>
      <div class="card-body">
        <div class="card-body-inner">
          <p v-for="(content, index) in item.content" :key="index">{{ content }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.questions-list {
  overflow-y: auto;
  height: calc(100vh - 136px);
  padding-bottom: $space-4_h;
}

.card {
  + .card {
    margin-top: $space-2_h;
  }

  h2 {
    padding: $space-2_h $space-4;
    border-radius: 1.67vh;
    background: linear-gradient(269deg, #c0c7f7 -35.56%, #ded3fb 25.96%, #e3e3ff 89.99%);
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));

    color: $font-color;
    font-family: $font-special, serif;
    font-size: 3vh;
    font-style: normal;
    font-weight: 400;
    line-height: 4.5vh;
  }
}

.card-body {
  border-radius: $space-2;
  padding: $space-1;

  background: linear-gradient(
    180deg,
    rgba(241, 234, 250, 0.35) 65.43%,
    rgba(241, 241, 250, 0.35) 99.5%
  );
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}

.card-body-inner {
  padding: $space-2_h 24px;
  border-radius: 1.33vh;
  background: linear-gradient(180deg, #fafafa 0%, #f4f0fa 100%);

  color: #666;
  font-size: 2.33vh;
  font-style: normal;
  font-weight: 400;
  line-height: 3.5vh;
}
</style>
