<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}



/**
 * ============================================
 * FILE: templates/emails/customer/appointment-pending.php
 * Customer Pending Appointment Email Template
 * ============================================
 */
?>
<?php
// Get email header
do_action( 'rtrb_get_email_header', $email, $booking );

do_action( 'rtrb_email_before_content', $email, $booking );
do_action( 'rtrb_email_content_start', $email, $booking );
?>

	<!-- Email Content Text -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td class="main-content">
				<?php if ( ! empty( $settings['additional_content'] ) ) : ?>
					<?php echo wp_kses_post( wpautop( wptexturize( $settings['additional_content'] ) ) ); ?>
				<?php else : ?>
					<p style="margin: 0;"><?php esc_html_e( 'Thank you for your booking! Your appointment is pending confirmation. We will notify you once it\'s confirmed.', 'radius-booking' ); ?></p>
				<?php endif; ?>
			</td>
		</tr>
	</table>

<?php do_action( 'rtrb_email_before_booking_details', $email, $booking ); ?>

	<!-- Booking Details Box -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="booking-details">
		<tr>
			<td style="padding: 20px;">
				<?php do_action( 'rtrb_email_booking_details', $email, $booking ); ?>
			</td>
		</tr>
	</table>

<?php do_action( 'rtrb_email_after_booking_details', $email, $booking ); ?>

	<!-- Status Badge -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td align="center" style="padding: 16px 0;">
			<span style="background-color: #fef3c7; color: #92400e; padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block;">
				⏳ <?php esc_html_e( 'PENDING CONFIRMATION', 'radius-booking' ); ?>
			</span>
			</td>
		</tr>
	</table>

<?php if ( ! empty( $settings['footer_text'] ) ) : ?>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td class="footer-text">
				<?php echo wp_kses_post( wpautop( wptexturize( $settings['footer_text'] ) ) ); ?>
			</td>
		</tr>
	</table>
<?php endif; ?>

<?php do_action( 'rtrb_email_before_button', $email, $booking ); ?>

<?php if ( ! empty( $settings['button_text'] ) ) : ?>
	<?php do_action( 'rtrb_email_button', $email, $booking, $settings ); ?>
<?php endif; ?>

<?php
do_action( 'rtrb_email_content_end', $email, $booking );
do_action( 'rtrb_email_after_content', $email, $booking );
do_action( 'rtrb_get_email_footer', $email, $booking );