<template>
  <div v-if="unit" class="unit-info-card">
    <div class="unit-icon">📚</div>
    <div class="unit-content">
      <h3 class="unit-title">{{ unit.title }}</h3>
      <p class="unit-desc">{{ unit.description }}</p>
    </div>
  </div>
</template>

<script lang="ts" setup>
import type { CurriculumUnit } from '@/types/englishSpeaking'

defineProps<{
  unit: CurriculumUnit | undefined
}>()
</script>

<style lang="scss" scoped>
.unit-info-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), #fff);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(251, 191, 36, 0.15);
  box-shadow: 0 1px 3px rgba(251, 191, 36, 0.08);
}

.unit-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(251, 191, 36, 0.3);
}

.unit-content {
  flex: 1;
  min-width: 0;
}

.unit-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 4px 0;
}

.unit-desc {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  margin: 0;
}
</style>
