<?php

declare(strict_types=1);

/**
 * Beitrags-/Preistabelle. Props:
 *   $fees array{title?, rows: [{label, price}], note?}
 * Semantische Definitionsliste (Begriff → Betrag), responsiv ohne <table>-Layout-Zwang.
 */
if (empty($fees['rows'])) {
    return;
}
?>
                <div class="fee-table">
<?php if (!empty($fees['title'])): ?>
                    <h3 class="fee-table__title"><?= e($fees['title']) ?></h3>
<?php endif; ?>
                    <dl class="fee-table__list">
<?php foreach ($fees['rows'] as $row): ?>
                        <div class="fee-table__row">
                            <dt class="fee-table__label"><?= e($row['label']) ?></dt>
                            <dd class="fee-table__price"><?= e($row['price']) ?></dd>
                        </div>
<?php endforeach; ?>
                    </dl>
<?php if (!empty($fees['note'])): ?>
                    <p class="fee-table__note"><?= e($fees['note']) ?></p>
<?php endif; ?>
                </div>
