<?php
/**
 * Template Name: AWT Canvas (No Header/Footer)
 * Description: Full-width blank template for Gutenberg. Strips away theme header, footer, and sidebar.
 *
 * @package Author_Website_Templates
 * @since 1.0.9
 */

if (!defined('ABSPATH')) {
	exit; // Exit if accessed directly
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="scroll-smooth">

<head>
	<meta charset="<?php bloginfo('charset'); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php wp_head(); ?>
	<style>
		/* Full-width canvas reset */
		html,
		body {
			margin: 0;
			padding: 0;
			width: 100%;
			height: 100%;
		}

		.awt-canvas-wrapper {
			width: 100%;
			min-height: 100vh;
		}
	</style>
</head>

<body <?php body_class('awt-canvas-body awt-wrapper'); ?>>
	<?php wp_body_open(); ?>

	<?php
	// Inject global header if enabled in settings
	if (
		function_exists('rswpthemes_awt_should_render_header') &&
		rswpthemes_awt_should_render_header() &&
		function_exists('rswpthemes_awt_get_global_header')
	) {
		echo rswpthemes_awt_get_global_header();
	}
	?>

	<div class="awt-canvas-wrapper">
		<?php
		// The Loop
		while (have_posts()):
			the_post();
			the_content();
		endwhile;
		?>
	</div>

	<?php
	// Inject global footer if enabled in settings
	if (
		function_exists('rswpthemes_awt_should_render_footer') &&
		rswpthemes_awt_should_render_footer() &&
		function_exists('rswpthemes_awt_get_global_footer')
	) {
		echo rswpthemes_awt_get_global_footer();
	}
	?>

	<?php wp_footer(); ?>
</body>

</html>