<?php defined( 'ABSPATH' ) || exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en">
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    <meta name="x-apple-disable-message-reformatting" />
  </head>
  <?php
    $background_type  = $settings['background_type'] ?? 'color';
    $background_color = $settings['colors']['background']['default'] ?? '#ffffff';
    $background_image = $settings['background_image']['url'] ?? '';
    ?>
  <body
    style='<?php echo $background_type === 'color' ? "background-color:" . esc_attr( $background_color ) . ";" : "background-image:url(" . esc_url( $background_image ) . ");"; ?>font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif'>
    <table style="margin: 0 auto; max-width: 800px; width: 100%; background-color: #ffffff;">
      <tr>
        <td style="padding: 8px;">
          <?php 
            //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 
            echo $content;
            ?>
        </td>
      </tr>
    </table>
  </body>
</html>
