<div class="flex items-center gap-2">
        <?= btn_pdf('admin/job_circular/jobs_posted_pdf/' . $job_posted->job_circular_id) ?>
        
    </div>
<div class="modal-body p-4">
	
    <?php
    if (!empty($job_posted->designations_id)) {
        $design_info = $this->db->where('designations_id', $job_posted->designations_id)->get('tbl_designations')->row();
        $designation = !empty($design_info) ? $design_info->designations : '-';
    } else {
        $designation = '-';
    }
    ?>
    <div class="grid grid-cols-1 md:grid-cols-2 gap-4 text-sm">
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('job_title') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= $job_posted->job_title; ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('designation') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= $designation; ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('employment_type') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= lang($job_posted->employment_type); ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('experience') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= $job_posted->experience; ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('age') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= $job_posted->age; ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('salary_range') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= $job_posted->salary_range; ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('vacancy_no') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= $job_posted->vacancy_no; ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('posted_date') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= !empty($job_posted->posted_date) ? display_date($job_posted->posted_date) : '-' ?></p>
        </div>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('last_date_to_apply') ?></p>
            <p class="mt-1 font-medium text-foreground"><?= !empty($job_posted->last_date) ? display_date($job_posted->last_date) : '-' ?></p>
        </div>
        <?php $show_custom_fields = custom_form_label(14, $job_posted->job_circular_id);
        if (!empty($show_custom_fields)) {
            foreach ($show_custom_fields as $c_label => $v_fields) {
                if (!empty($v_fields)) {
                    ?>
                    <div>
                        <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= $c_label ?></p>
                        <p class="mt-1 font-medium text-foreground"><?= $v_fields ?></p>
                    </div>
                <?php }
            }
        }
        ?>
        <div>
            <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('status') ?></p>
            <p class="mt-1">
                <?php if ($job_posted->status == 'unpublished') : ?>
                    <span class="inline-flex items-center rounded-full bg-red-50 px-2 py-1 text-xs font-semibold text-red-600"><?= lang('unpublished') ?></span>
                <?php else : ?>
                    <span class="inline-flex items-center rounded-full bg-emerald-50 px-2 py-1 text-xs font-semibold text-emerald-600"><?= lang('published') ?></span>
                <?php endif; ?>
            </p>
        </div>
    </div>

    <div class="mt-4">
        <p class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"><?= lang('description') ?></p>
        <div class="mt-2 rounded-lg border border-border bg-muted/40 p-3 text-sm text-foreground">
            <?php echo $job_posted->description; ?>
        </div>
    </div>
</div>

