<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Reset PIN</title>
    <style>
      body {
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
          line-height: 1.6;
          color: #333;
          max-width: 600px;
          margin: 0 auto;
          padding: 20px;
          background-color: {{tenant.backgroundColor}};
      }
      .email-container {
          background-color: white;
          padding: 30px;
          border-radius: 8px;
          box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      }
      .header {
          text-align: center;
          border-bottom: 1px solid #eee;
          padding-bottom: 20px;
          margin-bottom: 30px;
      }
      .logo {
          font-size: 24px;
          font-weight: bold;
          color: {{tenant.primaryColor}};
      }
      h1 {
          color: #1f2937;
          font-size: 24px;
          margin-bottom: 20px;
      }
      .button {
          display: inline-block;
          padding: 12px 24px;
          background-color: {{tenant.primaryColor}};
          color: white;
          text-decoration: none;
          border-radius: 6px;
          font-weight: bold;
          margin: 20px 0;
      }
      .warning {
          background-color: #fef3c7;
          border-left: 4px solid #f59e0b;
          padding: 15px;
          margin: 20px 0;
      }
      .footer {
          margin-top: 30px;
          padding-top: 20px;
          border-top: 1px solid #eee;
          font-size: 14px;
          color: #6b7280;
          text-align: center;
      }
    </style>
  </head>
  <body>
    <div class="email-container">
      <div class="header">
        {{#if tenant.logo}}
        <img
          src="data:image/png;base64,{{tenant.logo}}"
          alt="{{tenant.longName}}"
          style="max-height: 60px; margin-bottom: 10px"
        />
        {{/if}}
        <div class="logo">{{tenant.longName}}</div>
      </div>

      <h1>Reset Your PIN</h1>

      <p>Hello,</p>

      <p>You have received a request to reset your PIN for {{tenant.longName}}.</p>

      <p><strong>To reset your PIN, please click the button below:</strong></p>

      <p><a href="{{resetUrl}}" class="button">Reset PIN Now</a></p>

      <p>
        If the button doesn't work, copy this link into your browser:<br />
        {{resetUrl}}
      </p>

      <div class="warning">
        <strong>Important Notice:</strong> This link is valid for
        <strong>{{expirationMinutes}} minutes</strong> only and can be used only once.
      </div>

      <p>After resetting your PIN, you can log in to your account with your new PIN.</p>

      <p>
        If you did not request this, you can safely ignore this email. Your PIN will remain
        unchanged.
      </p>

      <p>If you have any questions, please contact our team.</p>

      <p>
        Best regards<br />
        The {{tenant.longName}} Team
      </p>

      <div class="footer">
        <p>This email was generated automatically. Please do not reply to this email.</p>
        <p>&copy; {{tenant.longName}} - Secure, encrypted, trustworthy</p>
      </div>
    </div>
  </body>
</html>
