<?php
/**
 * Public Booking Cancelled Page
 *
 * @package Freelance_Studio
 */

if (!defined('ABSPATH')) {
    exit;
}

$booking = $data['booking'];
$business = $data['business'];
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo('charset'); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="noindex, nofollow">
    <title><?php esc_html_e('Booking Cancelled', 'freelance-studio'); ?> - <?php echo esc_html($business['business_name']); ?></title>
    <?php include JEEB_FS_PLUGIN_DIR . 'includes/views/public/booking/booking-styles.php'; ?>
</head>
<body class="fs-booking-page">
    <div class="fs-booking-container">
        <header class="fs-booking-header">
            <?php if ($business['business_logo']): ?>
                <img src="<?php echo esc_url($business['business_logo']); ?>" alt="<?php echo esc_attr($business['business_name']); ?>" class="fs-booking-logo">
            <?php endif; ?>
        </header>
        
        <div class="fs-cancelled-card">
            <div class="fs-cancelled-icon">
                <svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                    <circle cx="12" cy="12" r="10"></circle>
                    <line x1="15" y1="9" x2="9" y2="15"></line>
                    <line x1="9" y1="9" x2="15" y2="15"></line>
                </svg>
            </div>
            
            <h1><?php esc_html_e('Booking Cancelled', 'freelance-studio'); ?></h1>
            <p><?php esc_html_e('Your booking has been cancelled successfully. A confirmation email has been sent.', 'freelance-studio'); ?></p>
            
            <div class="fs-confirmation-actions">
                <p><?php esc_html_e('Want to reschedule?', 'freelance-studio'); ?></p>
                <?php 
                $permalink_structure = get_option('permalink_structure');
                if (empty($permalink_structure)) {
                    $book_url = add_query_arg('fs_booking', '1', home_url('/'));
                } else {
                    $book_url = home_url('/book/');
                }
                ?>
                <a href="<?php echo esc_url($book_url); ?>" class="fs-btn-primary">
                    <?php esc_html_e('Book a New Meeting', 'freelance-studio'); ?>
                </a>
            </div>
        </div>
        
        <footer class="fs-booking-footer">
            <p><?php echo esc_html($business['business_name']); ?></p>
        </footer>
    </div>
</body>
</html>
