<template>
  <div class="analysis-box">
    <div class="analysis-icon">
      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
        <circle cx="12" cy="12" r="10"/>
        <path d="M12 6v6l4 2"/>
      </svg>
    </div>
    <div class="analysis-content">
      <p class="analysis-text">{{ text }}</p>
    </div>
    <div v-if="showArrow" class="analysis-arrow">
      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
        <path d="M5 12h14M12 5l7 7-7 7"/>
      </svg>
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps<{
  text: string
  showArrow?: boolean
}>()
</script>

<style scoped>
.analysis-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #F0F7FF 0%, #E8F4FD 100%);
  border-radius: 8px;
  border: 1px solid #D4E8FC;
}

.analysis-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #2D8CF0;
}

.analysis-icon svg {
  width: 100%;
  height: 100%;
}

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

.analysis-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #2D8CF0;
}

.analysis-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #2D8CF0;
  cursor: pointer;
  transition: transform 0.2s;
}

.analysis-arrow:hover {
  transform: translateX(4px);
}

.analysis-arrow svg {
  width: 100%;
  height: 100%;
}
</style>
