<script setup lang="ts">
defineProps<{
  title: string
  description?: string
}>()
</script>

<template>
  <section class="form-section">
    <header class="section-heading">
      <h2>{{ title }}</h2>
      <span v-if="description">{{ description }}</span>
    </header>
    <slot />
  </section>
</template>

<style scoped>
.form-section {
  padding: 20px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(20, 34, 56, 0.05);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 28px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: #171b24;
  font-size: 17px;
}

.section-heading span {
  margin: 0;
  color: #7b8492;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
</style>
