<!DOCTYPE html>
<html>
<head>
  <style>
    body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
    .container { max-width: 600px; margin: 0 auto; padding: 20px; }
    .header { 
      background-color: {{#if (eq status 'accepted')}}#4CAF50{{else}}#f39c12{{/if}}; 
      color: white; 
      padding: 20px; 
      text-align: center; 
    }
    .content { padding: 20px; background-color: #f9f9f9; }
    .footer { text-align: center; padding: 20px; font-size: 12px; color: #777; }
    .button {
      display: inline-block; 
      padding: 10px 20px; 
      background-color: #4a6baf; 
      color: white; 
      text-decoration: none; 
      border-radius: 4px;
      margin: 15px 0;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header">
      <h1>Invitation {{toUpperCase status}}</h1>
    </div>
    <div class="content">
      <p>Hello {{name}},</p>
      
      {{#if (eq status 'accepted')}}
        <p><strong>{{inviteeName}}</strong> has accepted your invitation to co-author <strong>{{bookTitle}}</strong>.</p>
        <p>You can now collaborate on this book in your dashboard.</p>
      {{else}}
        <p>We're sorry to inform you that <strong>{{inviteeName}}</strong> has declined your invitation to co-author <strong>{{bookTitle}}</strong>.</p>
        <p>You can invite other authors or continue working on the book yourself.</p>
      {{/if}}
      
      <p style="text-align: center; margin: 25px 0;">
        <a href="{{dashboardUrl}}" class="button" style="color: white;">Go to Dashboard</a>
      </p>
      
      <p>Best regards,<br>The Xania Bookstore Team</p>
    </div>
    <div class="footer">
      <p>© {{year}} Xania Bookstore. All rights reserved.</p>
      <p>This is an automated message, please do not reply to this email.</p>
    </div>
  </div>
</body>
</html>
