<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Subscription Status Update</title>
  </head>
  <body style="margin: 0; padding: 0; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;">
    <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="max-width: 600px; margin: 0 auto;">
      <tr><td>{{> header}}</td></tr>
      <tr>
        <td style="padding: 32px;">
          <h1 style="color: #1a1a1a; font-size: 24px; font-weight: 600; margin: 0 0 24px 0; line-height: 1.3;">Subscription Update</h1>
          <p style="color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 16px 0;">Hi {{customerName}},</p>
          <p style="color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 24px 0;">Your subscription status has been updated.</p>
          <div style="background: #f9f9f9; padding: 20px; border-radius: 6px; margin: 24px 0;">
            <p style="margin: 0 0 8px 0; font-size: 14px; color: #333333;"><strong>New Status:</strong> <span style="text-transform: uppercase;">{{status}}</span></p>
            {{#if subscriptionId}}<p style="margin: 0; font-size: 14px; color: #666666;">Subscription ID: {{subscriptionId}}</p>{{/if}}
          </div>
          {{#if (eq status "canceled")}}
          <p style="color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 24px 0;">Your subscription has been canceled. You will continue to have access until the end of your current billing period.</p>
          {{else if (eq status "active")}}
          <p style="color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 24px 0;">Your subscription is now active. Thank you for your continued support.</p>
          {{else if (eq status "past_due")}}
          <p style="color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 24px 0;">Your subscription payment is past due. Please update your payment method to avoid service interruption.</p>
          {{else}}
          <p style="color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 24px 0;">Your subscription status has changed to {{status}}.</p>
          {{/if}}
          {{#if dashboardUrl}}
          <div style="text-align: center; margin: 32px 0;">
            <a href="{{dashboardUrl}}" style="display: inline-block; background: #1a1a1a; color: #ffffff; padding: 14px 28px; text-decoration: none; border-radius: 4px; font-weight: 600; font-size: 16px;">View Subscription Details</a>
          </div>
          {{/if}}
          <p style="color: #999999; font-size: 14px; line-height: 1.5; margin: 24px 0 0 0;">If you have any questions, please contact our support team.</p>
        </td>
      </tr>
      <tr><td>{{> footer}}</td></tr>
    </table>
  </body>
</html>
