<?php require __DIR__ . '/../layouts/header.php'; $lang=current_lang(); ?>
<div class="container" style="max-width:900px">
  <h4 class="mb-3"><i class="fa-solid fa-file-circle-plus me-2"></i><?= e($lang==='ar'?'تقديم بحث جديد':'New Submission') ?></h4>

  <?php if (!empty($err)): ?><div class="alert alert-danger"><?= e((string)$err) ?></div><?php endif; ?>

  <div class="card border-0 shadow-sm">
    <div class="card-body">
      <form method="post" action="<?= e(base_path('submit/store')) ?>" class="row g-3">
        <input type="hidden" name="_csrf" value="<?= e(csrf_token()) ?>">

        <div class="col-md-6">
          <label class="form-label"><?= e($lang==='ar'?'العنوان (English)':'Title (EN)') ?></label>
          <input class="form-control" name="title_en" required>
        </div>
        <div class="col-md-6">
          <label class="form-label"><?= e($lang==='ar'?'العنوان (عربي)':'Title (AR)') ?></label>
          <input class="form-control" name="title_ar" required>
        </div>

        <div class="col-md-6">
          <label class="form-label"><?= e($lang==='ar'?'ملخص (English)':'Abstract (EN)') ?></label>
          <textarea class="form-control" name="abstract_en" rows="4"></textarea>
        </div>
        <div class="col-md-6">
          <label class="form-label"><?= e($lang==='ar'?'ملخص (عربي)':'Abstract (AR)') ?></label>
          <textarea class="form-control" name="abstract_ar" rows="4"></textarea>
        </div>

        <div class="col-12 d-flex gap-2">
          <button class="btn btn-primary btn-rounded"><i class="fa-solid fa-paper-plane me-2"></i><?= e($lang==='ar'?'إرسال':'Submit') ?></button>
          <a class="btn btn-outline-secondary btn-rounded" href="<?= e(base_path('author')) ?>"><?= e($lang==='ar'?'رجوع':'Back') ?></a>
        </div>
      </form>
    </div>
  </div>
</div>
<?php require __DIR__ . '/../layouts/footer.php'; ?>
