<template>
  <div class="card">
    <div class="card-hd">
      <div class="card-hd__title">
        <slot name="title">{{ title }}</slot>
      </div>
      <div class="card-hd__aside"><slot name="header-aside"></slot></div>
    </div>
    <div class="card-bd"><slot /></div>
  </div>
</template>

<script setup>
defineProps({
  title: String,
  titleAlign: { type: String, default: 'left' },
})
</script>

<style lang="scss">
.is-pc {
  .card-hd {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 60px;
  }
  .card-hd__title {
    flex: 1;
    // border-left: 7px solid #aa1941;
    // padding-left: 20px;
    font-size: 30px;
    font-weight: bold;
    line-height: 1;
    // text-align: v-bind(titleAlign);
    text-align: center;
    a:hover {
      color: var(--main-color);
    }
  }
  .card-hd__aside {
    position: absolute;
    right: 0;
    font-size: 16px;
    color: #9b9b9b;
    cursor: pointer;
  }
}
.is-h5 {
  .card {
    margin: 0.2rem 0.15rem;
  }
  .card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.15rem;
  }
  .card-hd__title {
    flex: 1;
    border-left: 0.03rem solid #aa1941;
    padding-left: 0.05rem;
    font-size: 0.17rem;
    font-weight: bold;
    line-height: 1;
  }
  .card-hd__aside {
    font-size: 0.1rem;
    color: #9b9b9b;
  }
}
</style>
