<?php
/**
 * Template Name: Submit Experience
 * 
 * @package DevelopSriLanka
 */

get_header(); ?>

<main id="main" class="site-main">
    <section class="experience-section">
        <div class="container">
            <div class="experience-intro">
                <h1 class="section-title">Share Your Sri Lanka Experience</h1>
                <p class="section-subtitle">Tell us why Sri Lanka is special to you. Your story could inspire thousands of travelers!</p>
            </div>
            
            <form id="experience-form" class="experience-form" enctype="multipart/form-data">
                
                <div class="form-group">
                    <label for="contributor-name">Your Name (Optional)</label>
                    <input type="text" id="contributor-name" name="name" placeholder="Enter your name">
                </div>
                
                <div class="form-group">
                    <label for="contributor-email">Your Email (Optional)</label>
                    <input type="email" id="contributor-email" name="email" placeholder="your.email@example.com">
                    <small>We'll only use this to notify you when your experience is published</small>
                </div>
                
                <div class="form-group">
                    <label for="contributor-phone">Your Phone Number (Optional)</label>
                    <input type="tel" id="contributor-phone" name="phone" placeholder="+94 77 123 4567">
                    <small>We may contact you for follow-up or featured stories</small>
                </div>
                
                <div class="form-group">
                    <label for="contributor-company">Driver/Guide/Travel Company Name (Optional)</label>
                    <input type="text" id="contributor-company" name="company" placeholder="e.g., ABC Tours Sri Lanka">
                    <small>If you used a guide, driver, or travel company, mention them here</small>
                </div>
                
                <div class="form-group">
                    <label for="contributor-country">Your Country <span style="color: red;">*</span></label>
                    <input type="text" id="contributor-country" name="country" placeholder="e.g., United States" required>
                </div>
                
                <div class="form-group">
                    <label for="experience-title">Title of Your Experience <span style="color: red;">*</span></label>
                    <input type="text" id="experience-title" name="title" placeholder="e.g., Best Week of My Life in Sri Lanka" required>
                </div>
                
                <div class="form-group">
                    <label for="experience-story">Your Story <span style="color: red;">*</span></label>
                    <textarea id="experience-story" name="story" placeholder="Share your experience... What made Sri Lanka special? What did you discover? How did it change you?" required></textarea>
                  <small>Minimum 1 word</small>
                </div>
                
                <div class="form-group">
                    <label>Upload Images (Optional)</label>
                    <input type="file" id="experience-images" name="images[]" accept="image/*" style="display: none;">
                    <button type="button" id="add-image-btn" class="btn btn-secondary" style="width: 100%; margin-bottom: 10px;">
                        + Add Image
                    </button>
                    <small id="image-counter">You can upload up to 4 images (max 5MB each)</small>
                    <div id="image-previews" style="display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 15px;"></div>
                </div>
                
                <div class="form-group">
                    <div class="checkbox-group">
                        <input type="checkbox" id="consent" name="consent" required>
                        <label for="consent">I agree to share my story publicly and give permission for it to be published on this website. <span style="color: red;">*</span></label>
                    </div>
                </div>
                
                <div id="form-message" style="margin-bottom: 20px;"></div>
                
                <button type="submit" class="submit-button" id="submit-btn">
                    Submit Your Experience
                </button>
                
            </form>
            
            <div class="text-center mt-20">
                <p><strong>Note:</strong> All submissions are reviewed by our team before being published. We'll notify you via email once your story is approved.</p>
            </div>
        </div>
    </section>
</main>

<?php get_footer(); ?>