<!-- Individual Parameter Row -->
<div class="parameter-row mb-3">
    <div class="row g-3">
        <div class="col-md-5">
            <label class="form-label">
                <i class="fas fa-list me-1"></i>
                Parameter to Change
            </label>
            <select name="change_fields" class="form-control" required>
                <option value="">Select parameter...</option>
                {% for val, label in parameter_choices %}
                <option value="{{ val }}" {% if field==val %}selected{% endif %}>{{ label }}</option>
                {% endfor %}
            </select>
        </div>

        <div class="col-md-5">
            <label class="form-label">
                <i class="fas fa-edit me-1"></i>
                New Value
            </label>
            <input type="number"
                   step="0.1"
                   name="change_values"
                   value="{{ value }}"
                   class="form-control"
                   required
                   placeholder="Enter new value">
        </div>

        <div class="col-md-2 d-flex align-items-end">
            <button type="button"
                    class="btn btn-outline-danger btn-sm remove-parameter-row"
                    hx-delete="/remove-parameter-row"
                    hx-target="closest .parameter-row"
                    hx-swap="outerHTML"
                    hx-push-url="false"
                    title="Remove this parameter"
                    style="display: none;">
                <i class="fas fa-times"></i>
            </button>
        </div>
    </div>

    {# Hidden date input only for rows that don't already have the visible date input #}
    {% if not is_first_row %}
    <input type="hidden" name="change_dates" value="{{ date }}">
    {% endif %}
</div>
