<!doctype html>
<html lang="de">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Termin bestätigt</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;
      }
      h2 {
          color: #374151;
          font-size: 20px;
          margin-bottom: 15px;
      }
      .button {
          display: inline-block;
          background-color: {{tenant.primaryColor}};
          color: white !important;
          padding: 12px 24px;
          text-decoration: none;
          border-radius: 6px;
          font-weight: 500;
          margin: 10px 5px;
      }
      .button:hover {
          background-color: #1d4ed8;
      }
      .button-cancel {
          background-color: #dc2626;
      }
      .button-cancel:hover {
          background-color: #b91c1c;
      }
      .appointment-details {
          background-color: #f8fafc;
          padding: 20px;
          border-radius: 6px;
          border-left: 4px solid {{tenant.primaryColor}};
          margin: 20px 0;
      }
      .success-box {
          background-color: #dcfce7;
          border-left: 4px solid #16a34a;
          padding: 15px;
          margin: 20px 0;
          border-radius: 4px;
      }
      .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>Termin bestätigt</h1>

      <div class="success-box">
        <strong>✓ Ihr Termin wurde erfolgreich gebucht!</strong>
      </div>

      <p>Vielen Dank für Ihre Buchung. Ihr Termin wurde bestätigt.</p>

      <div class="appointment-details">
        <h2>Termindetails</h2>
        <p><strong>Datum:</strong> {{appointmentDate}}</p>
        {{#if title}}
        <p><strong>Termin:</strong> {{title}}</p>
        {{/if}} {{#if location}}
        <p><strong>Ort:</strong> {{location}}</p>
        {{/if}}
      </div>

      <div style="text-align: center">
        {{#if cancelUrl}}
        <a href="{{cancelUrl}}" class="button button-cancel">Termin absagen</a>
        {{/if}}
      </div>

      <div class="footer">
        <p>Wir freuen uns auf Ihren Besuch!</p>
        <p style="margin-top: 10px; font-size: 12px">Bei Fragen kontaktieren Sie uns bitte.</p>
      </div>
    </div>
  </body>
</html>
