@extends('layouts.app')

@section('title', 'Submit Full Paper')

@section('content')
<!-- Page Header -->
<section class="bg-gradient-to-r from-primary-600 to-primary-700 py-16">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <h1 class="text-3xl md:text-4xl font-bold text-white">Submit Full Paper</h1>
        <p class="text-primary-100 mt-2">Submit your full paper for accepted abstracts</p>
    </div>
</section>

<section class="py-12">
    <div class="max-w-xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="bg-white rounded-xl shadow-sm p-6 lg:p-8">
            <div class="mb-6 p-4 bg-blue-50 border border-blue-200 text-blue-700 rounded-lg">
                <p class="text-sm">Only accepted abstract authors can submit full papers. Please use your submission code from the acceptance email.</p>
            </div>

            @if($errors->any())
            <div class="mb-6 p-4 bg-red-50 border border-red-200 text-red-700 rounded-lg">
                <ul class="list-disc list-inside space-y-1">
                    @foreach($errors->all() as $error)
                    <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
            @endif

            <form action="{{ route('submission.full-paper.store') }}" method="POST" enctype="multipart/form-data" class="space-y-6">
                @csrf
                
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Submission Code *</label>
                    <input type="text" name="submission_code" value="{{ old('submission_code') }}" required class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500" placeholder="SUB-XXXXXXXX">
                </div>

                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Full Paper File *</label>
                    <div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center">
                        <input type="file" name="full_paper_file" accept=".pdf,.doc,.docx" required class="hidden" id="full_paper_file">
                        <label for="full_paper_file" class="cursor-pointer">
                            <svg class="w-12 h-12 text-gray-400 mx-auto mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"/></svg>
                            <p class="text-gray-600">Click to upload your full paper</p>
                            <p class="text-sm text-gray-500">PDF, DOC, DOCX (Max 10MB)</p>
                        </label>
                    </div>
                </div>

                <button type="submit" class="w-full py-3 bg-primary-600 text-white font-semibold rounded-lg hover:bg-primary-700 transition">
                    Submit Full Paper
                </button>
            </form>
        </div>
    </div>
</section>
@endsection
