<x-mail::layouts.branded title="AI-аар баяжуулсан маркетингийн тайлан">

<h1 style="color: #C8102E; font-size: 24px; margin: 0 0 16px 0;">
    🤖 Танай AI-аар баяжуулсан тайлан бэлэн
</h1>

<p style="font-size: 16px; margin: 0 0 24px 0;">
    Сайн уу{{ $lead->name ? ', ' . $lead->name : '' }}! Танай судалгааны хариултанд тулгуурлан AI-аар баяжуулсан тайлан бэлэн боллоо.
</p>

@if($survey->ai_strategic_diagnosis)
<h3 style="color: #C8102E; font-size: 16px; margin: 24px 0 8px 0;">📊 Стратегийн оношлогоо</h3>
<p style="font-size: 14px; margin: 0 0 16px 0; white-space: pre-line;">{{ $survey->ai_strategic_diagnosis }}</p>
@endif

@if($survey->ai_customer_narrative)
<div style="border-top: 1px solid #E5E5E5; padding-top: 16px; margin: 16px 0;">
    <h3 style="color: #C8102E; font-size: 16px; margin: 0 0 8px 0;">👤 Танай хэрэглэгчийн дүр</h3>
    <p style="font-size: 14px; font-style: italic; margin: 0 0 16px 0;">{{ $survey->ai_customer_narrative }}</p>
</div>
@endif

@if(! empty($survey->ai_action_plan_30day))
<div style="border-top: 1px solid #E5E5E5; padding-top: 16px; margin: 16px 0;">
    <h3 style="color: #C8102E; font-size: 16px; margin: 0 0 12px 0;">📅 30-хоногийн ажлын төлөвлөгөө</h3>
    @foreach($survey->ai_action_plan_30day as $week)
        <div style="background-color: #FCEAEC; padding: 12px; border-radius: 6px; margin-bottom: 8px;">
            <div style="font-weight: bold; color: #C8102E; font-size: 13px;">Долоо хоног {{ $week['week'] }}: {{ $week['focus'] ?? '' }}</div>
            <ul style="margin: 6px 0 0 0; padding-left: 20px; font-size: 13px;">
                @foreach($week['tasks'] ?? [] as $task)
                    <li>{{ $task }}</li>
                @endforeach
            </ul>
        </div>
    @endforeach
</div>
@endif

@if(! empty($survey->ai_content_ideas))
<div style="border-top: 1px solid #E5E5E5; padding-top: 16px; margin: 16px 0;">
    <h3 style="color: #C8102E; font-size: 16px; margin: 0 0 12px 0;">💡 5 пост-ийн санаа танай бизнест зориулсан</h3>
    @foreach($survey->ai_content_ideas as $idea)
        <div style="background-color: #F5F5F5; padding: 12px; border-radius: 6px; margin-bottom: 8px;">
            <span style="display: inline-block; background-color: #C8102E; color: #FFFFFF; font-size: 10px; font-weight: bold; padding: 2px 8px; border-radius: 50px;">{{ $idea['type'] ?? '' }}</span>
            <div style="font-weight: bold; font-size: 13px; margin: 4px 0;">{{ $idea['title'] ?? '' }}</div>
            <p style="font-size: 12px; color: #666; margin: 0;">{{ $idea['outline'] ?? '' }}</p>
        </div>
    @endforeach
</div>
@endif

@if($survey->ai_brand_voice_sample)
<div style="border-top: 1px solid #E5E5E5; padding-top: 16px; margin: 16px 0;">
    <h3 style="color: #C8102E; font-size: 16px; margin: 0 0 8px 0;">✍️ Танай brand voice-аар бичсэн жишээ пост</h3>
    <div style="background-color: #FFF8E1; border-left: 4px solid #FFA500; padding: 16px; border-radius: 4px;">
        <p style="font-size: 14px; font-style: italic; margin: 0; white-space: pre-line;">{{ $survey->ai_brand_voice_sample }}</p>
    </div>
    <p style="font-size: 12px; color: #666; margin: 8px 0 0 0; font-style: italic;">→ Хуулж аваад Facebook-д шууд тавихад тохирно.</p>
</div>
@endif

<div style="background-color: #C8102E; color: #FFFFFF; padding: 20px; border-radius: 12px; text-align: center; margin: 24px 0;">
    <p style="margin: 0 0 12px 0; font-size: 14px;">Хэрэгжүүлэхэд тусламж хэрэгтэй юу?</p>
    <a href="mailto:info@nsma.mn?subject=AI%20insights-ийн%20дараа%20ярилцлага" style="display: inline-block; background-color: #FFFFFF; color: #C8102E; font-weight: 700; padding: 10px 24px; border-radius: 50px; text-decoration: none;">📩 Зөвлөхтэй ярилц</a>
</div>

</x-mail::layouts.branded>
