@extends('emails.layout')

@section('content')
    <h1>📢 New Election Announced</h1>
    <p>A new election has been announced for <strong>{{ $association->name }}</strong>.</p>

    <div class="info-box">
        <div class="info-row">
            <span class="info-label">Election</span>
            <span class="info-value">{{ $election->title }}</span>
        </div>
        <div class="info-row">
            <span class="info-label">Voting Method</span>
            <span class="info-value">{{ ucfirst($election->voting_method) }}</span>
        </div>
        @if($election->nomination_start_at)
        <div class="info-row">
            <span class="info-label">Nominations Open</span>
            <span class="info-value">{{ $election->nomination_start_at->format('M d, Y \a\t h:i A') }}</span>
        </div>
        @endif
        @if($election->voting_start_at)
        <div class="info-row">
            <span class="info-label">Voting Begins</span>
            <span class="info-value">{{ $election->voting_start_at->format('M d, Y \a\t h:i A') }}</span>
        </div>
        @endif
    </div>

    @if($election->description)
    <p>{{ Str::limit(strip_tags($election->description), 300) }}</p>
    @endif

    <p>Stay tuned for nomination announcements and candidate information.</p>

    <div style="text-align: center; margin: 32px 0;">
        <a href="{{ config('app.frontend_url', config('app.url')) }}/elections/{{ $election->id }}" class="btn">View Election Details</a>
    </div>
@endsection
