<div id="editSubServiceModal" class="modal fade" tabindex="-1" aria-labelledby="editSubServiceModal" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document" style="display: block;">
    <form method="post" action="<?= base_url('admin/sub_services/edit') ?>">
      <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" 
             value="<?= $this->security->get_csrf_hash(); ?>" />
      <input type="hidden" name="id" id="editSubServiceId">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Edit Sub Service</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
        </div>
        <div class="modal-body">
          <div class="mb-3">
            <label>Service</label>
            <select name="service_id" id="editSubServiceService" class="form-control" required>
              <option value="">Select Service</option>
              <?php foreach($services as $s): ?>
                <option value="<?= $s->id ?>"><?= $s->name ?></option>
              <?php endforeach; ?>
            </select>
          </div>
          <div class="mb-3">
            <label>Name</label>
            <input type="text" name="name" id="editSubServiceName" class="form-control" required>
          </div>
          <div class="mb-3">
            <label>Description</label>
            <textarea name="description" id="editSubServiceDescription" class="form-control"></textarea>
          </div>
          <div class="mb-3">
            <label>Fee</label>
            <input type="number" step="0.01" name="fee" id="editSubServiceFee" class="form-control" required>
          </div>
          <div class="mb-3">
            <label>Currency</label>
            <input type="text" name="currency" id="editSubServiceCurrency" class="form-control" value="PKR">
          </div>
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn btn-primary">Save Changes</button>
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
        </div>
      </div>
    </form>
  </div>
</div>
