<?php
defined( 'ABSPATH' ) || exit;

/**
 * Booking details table partial.
 *
 * Expected variables:
 * @var array<string,string> $bookaro_details Label-value pairs to display.
 */
if ( empty( $bookaro_details ) || ! is_array( $bookaro_details ) ) {
    return;
}
?>
<h3 class="bookaro-email-subheading"><?php esc_html_e( 'Booking summary', 'mybookaro' ); ?></h3>
<table class="details-table" cellpadding="0" cellspacing="0" role="presentation" style="width:100%; border-collapse:collapse; margin:20px 0;">
    <tbody>
        <?php foreach ( $bookaro_details as $bookaro_label => $bookaro_value ) : ?>
        <tr>
            <td style="padding:8px 10px; background:#f9fafb; font-weight:600; border-bottom:1px solid #e5e7eb; width:35%;">
                <?php echo esc_html( $bookaro_label ); ?>
            </td>
            <td style="padding:8px 10px; border-bottom:1px solid #e5e7eb;">
                <?php echo esc_html( $bookaro_value ); ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>
