<?php
/**
 * Standalone cancel booking page.
 * Loaded by Playard_Public::handle_cancel_request() via template_redirect.
 * Variables available: $ref, $token
 */
if ( ! defined( 'ABSPATH' ) ) exit;

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

$_config = wp_json_encode( playard_get_frontend_config() );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
  <meta charset="<?php bloginfo( 'charset' ); ?>">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><?php esc_html_e( 'Cancel Booking', 'playard' ); ?> — <?php bloginfo( 'name' ); ?></title>
  <?php wp_head(); ?>
</head>
<body style="margin:0;padding:40px 16px;background:#F8FAFC;font-family:Inter,system-ui,sans-serif;">
  <div
    id="playard-cancel-app"
    data-ref="<?php echo esc_attr( $ref ); ?>"
    data-token="<?php echo esc_attr( $token ); ?>"
    data-config="<?php echo esc_attr( $_config ?: '{}' ); ?>"
  ></div>
  <?php wp_footer(); ?>
</body>
</html>
