@extends('emails.layout')

@section('content')
    <h1>✅ Candidacy Approved</h1>
    <p>Congratulations! Your candidacy for the <strong>{{ $election->title }}</strong> election has been approved.</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">Position</span>
            <span class="info-value">{{ $candidate->position?->title ?? 'N/A' }}</span>
        </div>
        <div class="info-row">
            <span class="info-label">Status</span>
            <span class="info-value"><span class="badge badge-success">Approved</span></span>
        </div>
        @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>

    <p>Your profile is now visible to voters. Make sure your manifesto and profile are up to date to make the best impression.</p>

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