<x-emails.layout subject="{{ $uploader->name }} uploaded a new video">

    <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">New video from {{ $uploader->name }}</h1>
    <p class="email-subtitle">A channel you follow just posted.</p>

    <p class="email-text">Hi <strong style="color:#f1f1f1;">{{ $recipient->name }}</strong>,</p>
    <p class="email-text">
        <strong style="color:#f1f1f1;">{{ $uploader->name }}</strong> uploaded a new video:
        <strong style="color:#f1f1f1;">"{{ $video->title }}"</strong>
    </p>

    @if($video->thumbnail)
    @php($thumbEmbed = \App\Support\EmailThumbnail::localPath($video))
    <div class="email-thumb-wrap">
        <a href="{{ route('videos.show', $video) }}">
            <img src="{{ $thumbEmbed ? $message->embed($thumbEmbed) : route('media.thumbnail', $video->thumbnail) }}" alt="{{ $video->title }}">
        </a>
    </div>
    @endif

    <div class="email-infobox">
        @if($video->description)
        <div class="email-inforow">
            <span class="email-inforow-key">Description</span>
            <span class="email-inforow-val">{{ \Illuminate\Support\Str::limit($video->description, 100) }}</span>
        </div>
        @endif
        @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>

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

    <hr class="email-divider">
    <p class="email-note">You can manage your notification preferences in your <a href="{{ route('settings') }}">account settings</a>.</p>

</x-emails.layout>
