<x-emails.layout subject="Your video is live on TAKEONE">

    {{-- Icon --}}
    <div style="width:64px;height:64px;border-radius:50%;background:rgba(230,30,30,.12);border:1px solid rgba(230,30,30,.25);margin:0 auto 24px;text-align:center;line-height:64px;font-size:28px;">&#x1F3AC;</div>

    <h1 class="email-title">Your video is live!</h1>
    <p class="email-subtitle">It's uploading and processing right now — we'll have it ready shortly.</p>

    <p class="email-text">Hi <strong style="color:#f1f1f1;">{{ $userName }}</strong>,</p>
    <p class="email-text">
        Your video <strong style="color:#f1f1f1;">"{{ $video->title }}"</strong> has been received and is now queued for processing.
        Once encoding is complete it will be publicly available on your channel.
    </p>

    {{-- Thumbnail --}}
    @php($thumbEmbed = \App\Support\EmailThumbnail::localPath($video))
    <div class="email-thumb-wrap">
        @if($video->thumbnail)
            <a href="{{ route('videos.show', $video) }}">
                <img src="{{ $thumbEmbed ? $message->embed($thumbEmbed) : route('media.thumbnail', $video->thumbnail) }}" alt="{{ $video->title }}">
            </a>
        @else
            <div class="email-thumb-placeholder">
                <span style="font-size:32px;">▶</span>
                <span>{{ Str::limit($video->title, 40) }}</span>
            </div>
        @endif
    </div>

    {{-- Details box --}}
    <div class="email-infobox">
        <div class="email-infobox-label">Video Details</div>
        <div class="email-inforow">
            <span class="email-inforow-key">Title</span>
            <span class="email-inforow-val">{{ $video->title }}</span>
        </div>
        @if($video->description)
        <div class="email-inforow">
            <span class="email-inforow-key">Description</span>
            <span class="email-inforow-val">{{ Str::limit($video->description, 80) }}</span>
        </div>
        @endif
        <div class="email-inforow">
            <span class="email-inforow-key">File size</span>
            <span class="email-inforow-val">{{ round($video->size / 1024 / 1024, 2) }} MB</span>
        </div>
        @if($video->formatted_duration)
        <div class="email-inforow">
            <span class="email-inforow-key">Duration</span>
            <span class="email-inforow-val">{{ $video->formatted_duration }}</span>
        </div>
        @endif
        <div class="email-inforow">
            <span class="email-inforow-key">Type</span>
            <span class="email-inforow-val" style="text-transform:capitalize;">{{ $video->type ?? 'Generic' }}</span>
        </div>
        <div class="email-inforow">
            <span class="email-inforow-key">Visibility</span>
            <span class="email-inforow-val" style="text-transform:capitalize;">{{ $video->visibility ?? 'Public' }}</span>
        </div>
    </div>

    {{-- CTA --}}
    <div class="email-btn-wrap">
        <a href="{{ route('videos.show', $video) }}" class="email-btn">&#9654;&nbsp; Watch Video</a>
    </div>

    <hr class="email-divider">

    <p class="email-note">
        Questions? Reply to this email or visit
        <a href="{{ config('app.url') }}">{{ config('app.url') }}</a>.
    </p>

</x-emails.layout>
