<?php
if ( ! defined('ABSPATH') ) {
	die();
}
global $wpcb_configuration_id;
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title><?php esc_attr_e( 'Configurator preview', 'wcb-configurator-builder' ); ?></title>
	<?php wp_head(); ?>
	<style>
		body {
			background-color: #F4F5F7;
		}
		.wpcb-template-shortcode:not(.alignfull) {
			max-width: 1200px;
			margin: 0 auto;
		}
	</style>
</head>
<body id="wpcb-admin-preview">
	<?php
	$template_layout = get_post_meta( $wpcb_configuration_id, '_template', true );

	$template_path = sprintf(
		'public/templates/%s',
		$template_layout
	);

	require WPCB_BASE . $template_path . '.php';
	wp_footer();
	?>
</body>
</html>