<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* Сброс стилей */
      body,
      h1,
      h2,
      h3,
      p,
      div,
      img,
      button,
      table,
      th,
      td {
        margin: 0;
        padding: 0;
        border: 0;

        font: inherit;
        vertical-align: baseline;
      }

      body {
        background-color: #f2f2f7;
        font-family: Arial, sans-serif;
      }

      @media (max-width: 600px) {
        h1 {
          font-size: 25px !important;
        }

        h4 {
          font-size: 20px !important;
        }
      }
    </style>
  </head>
  <body style="background-color: #f2f2f7; font-family: Arial, sans-serif">
    <table style="width: 100%; padding: 16px">
      <tr>
              <td>
                <img class="image" style="width: 103px; height: 40px" src="https://storage.yandexcloud.net/squizimages/logo-email-squiz.png" />
              </td>
              <td>
                <p style="text-align: end; color: #9a9aaf; font-size: 14px">Квиз для вашего бизнеса</p>
              </td>
            </tr>

      <tr>
        <td colspan="2" style="height: 100%">
          <h1
            style="
              font-size: 30px;
              font-weight: 600;
              margin-bottom: 13px;
              width: 100%;
              margin: 0;
              margin-bottom: 13px;
              margin-top: 50px;
            "
          >
            Поступила новая заявка с квиза “{{.QuizConfig.Theme}}”!
          </h1>
        </td>
      </tr>
      <tr>
        <td colspan="2" style="height: 100%">
          <p style="color: #9a9aaf; font-size: 20px; margin-bottom: 50px">
            Время заявки: {{ .AnswerTime }}
          </p>
        </td>
      </tr>

      <tr>
        <td colspan="2" style="height: 100%">
          <a
					href="https://quiz.pena.digital/results/{{ .QuizID }}"
            style="
              display: flex;
              justify-content: center;
              color: #f2f3f7;
              text-align: center;
              font-size: 18px;
              font-style: normal;
              font-weight: 400;
              line-height: 24px;
              border-radius: 8px;
              border: 1px solid #7e2aea;
              background: #7e2aea;
              padding: 10px 43px;
              max-height: 63px;
              margin-bottom: 50px;
            "
          >
            Посмотреть в личном кабинете
          </a>
        </td>
      </tr>

      <tr>
        <td colspan="2" style="height: 100%">
          <h1
            style="font-size: 25px; font-weight: 600; margin-bottom: 15px; width: 100%; margin: 0; margin-bottom: 13px"
          >
            Контакты
          </h1>
        </td>
      </tr>

      <tr>
        <td colspan="2" style="padding: 0">
          <table
            style="
              background-color: #fff;
              border-radius: 8px;
              text-align: left;
              max-width: 480px;
              width: 100%;
              padding: 16px;
              margin-bottom: 30px;
            "
          >
            <tr>
              <th
                style="
                  text-align: start;
                  color: #9a9aaf;
                  font-size: 20px;
                  font-style: normal;
                  font-weight: 400;
                  line-height: normal;
                "
              >
                Имя
              </th>
              <td>
                <p
                  style="
                    text-align: start;
                    color: #4d4d4d;
                    font-size: 20px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: normal;
                    margin-bottom: 15px;
                  "
                >
                {{ .AnswerContent.Name}}
                </p>
              </td>
            </tr>
            {{ if .AnswerContent.Email }}
                    <tr>
                      <th
                        style="
                              text-align: start;
                              color: #9a9aaf;
                              font-size: 20px;
                              font-style: normal;
                              font-weight: 400;
                              line-height: normal;
                            "
                      >
                        Email
                      </th>
                      <td style="word-break: break-word">
                        <p
                          style="
                              text-align: start;
                              color: #7e2aea;
                              font-size: 20px;
                              font-style: normal;
                              font-weight: 400;
                              line-height: normal;
                              margin-bottom: 15px;
                            "
                        >
                          {{ .AnswerContent.Email }}
                        </p>
                      </td>
                    </tr>
                  {{ end }}
            {{ if .AnswerContent.Phone }}
                    <tr>
                      <th
                        style="
                          text-align: start;
                            color: #9a9aaf;
                            font-size: 20px;
                            font-style: normal;
                            font-weight: 400;
                            line-height: normal;
                        "
                      >
                        Телефон
                      </th>
                      <td
                        style="
                          text-align: start;
                            color: #4d4d4d;
                            font-size: 20px;
                            font-style: normal;
                            font-weight: 400;
                            line-height: normal;
                        "
                      >
                        {{ .AnswerContent.Phone }}
                      </td>
                    </tr>
                  {{ end }}

            {{ if .AnswerContent.Telegram }}
                <tr>
                  <th
                    style="
                      text-align: start;
                      color: #9a9aaf;
                      font-size: 20px;
                      font-style: normal;
                      font-weight: 400;
                      line-height: normal;
                    "
                  >
                    Telegram
                  </th>
                  <td
                    style="
                      text-align: start;
                        color: #4d4d4d;
                        font-size: 20px;
                        font-style: normal;
                        font-weight: 400;
                        line-height: normal;
                    "
                  >
                    {{ .AnswerContent.Telegram }}
                  </td>
                </tr>
              {{ end }}
            {{ if .AnswerContent.Wechat }}
                            <tr>
                              <th
                                style="
                                  text-align: start;
                                    color: #9a9aaf;
                                    font-size: 20px;
                                    font-style: normal;
                                    font-weight: 400;
                                    line-height: normal;
                                "
                              >
                                Wechat
                              </th>
                              <td
                                style="
                                  text-align: start;
                                    color: #4d4d4d;
                                    font-size: 20px;
                                    font-style: normal;
                                    font-weight: 400;
                                    line-height: normal;
                                  "
                              >
                                {{ .AnswerContent.Wechat }}
                              </td>
                            </tr>
                          {{ end }}
            {{ if .AnswerContent.Viber }}
                            <tr>
                              <th
                                style="
                                  text-align: start;
                                    color: #9a9aaf;
                                    font-size: 20px;
                                    font-style: normal;
                                    font-weight: 400;
                                    line-height: normal;
                                "
                              >
                                Viber
                              </th>
                              <td
                                style="
                                  text-align: start;
                                    color: #4d4d4d;
                                    font-size: 20px;
                                    font-style: normal;
                                    font-weight: 400;
                                    line-height: normal;
                                "
                              >
                                {{ .AnswerContent.Viber }}
                              </td>
                            </tr>
                          {{ end }}
            {{ if .AnswerContent.Vk }}
                            <tr>
                              <th
                                style="
                                  text-align: start;
                                  color: #9a9aaf;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                Vk
                              </th>
                              <td
                                style="
                                  text-align: start;
                                  color: #4d4d4d;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                {{ .AnswerContent.Vk }}
                              </td>
                            </tr>
                          {{ end }}
            {{ if .AnswerContent.Skype }}
                            <tr>
                              <th
                                style="
                                  text-align: start;
                                  color: #9a9aaf;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                Skype
                              </th>
                              <td
                                style="
                                  text-align: start;
                                    color: #4d4d4d;
                                    font-size: 20px;
                                    font-style: normal;
                                    font-weight: 400;
                                    line-height: normal;
                                "
                              >
                                {{ .AnswerContent.Skype }}
                              </td>
                            </tr>
                          {{ end }}
            {{ if .AnswerContent.Whatsup }}
                            <tr>
                              <th
                                style="
                                  text-align: start;
                                    color: #9a9aaf;
                                    font-size: 20px;
                                    font-style: normal;
                                    font-weight: 400;
                                    line-height: normal;
                                "
                              >
                                Whatsup
                              </th>
                              <td
                                style="
                                  text-align: start;
                                  color: #4d4d4d;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                {{ .AnswerContent.Whatsup }}
                              </td>
                            </tr>
                          {{ end }}
            {{ if .AnswerContent.Messenger }}
                            <tr>
                              <th
                                style="
                                  text-align: start;
                                  color: #9a9aaf;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                Messenger
                              </th>
                              <td
                                style="
                                  text-align: start;
                                  color: #4d4d4d;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                {{ .AnswerContent.Messenger }}
                              </td>
                            </tr>
                          {{ end }}
            {{ if .AnswerContent.Address }}
                            <tr>
                              <th
                                style="
                                  text-align: start;
                                  color: #9a9aaf;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                Адрес
                              </th>
                              <td
                                style="
                                  text-align: start;
                                  color: #4d4d4d;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                {{ .AnswerContent.Address }}
                              </td>
                            </tr>
                          {{ end }}
            {{ range $key, $value := .AnswerContent.Custom }}

                            <tr>
                              <th
                                style="
                                  text-align: start;
                                  color: #9a9aaf;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                {{ $key }}
                              </th>
                              <td
                                style="
                                  text-align: start;
                                  color: #4d4d4d;
                                  font-size: 20px;
                                  font-style: normal;
                                  font-weight: 400;
                                  line-height: normal;
                                "
                              >
                                {{ $value }}
                              </td>
                            </tr>
            {{ end }}
          </table>
        </td>
      </tr>

      <tr>
        <td colspan="2" style="height: 100%">
          <h1
            style="font-size: 25px; font-weight: 600; margin-bottom: 15px; width: 100%; margin: 0; margin-bottom: 13px"
          >
            Ответы
          </h1>
        </td>
      </tr>

      {{ range .AllAnswers }}
        {{ if keyExists $.QuestionsMap .AnswerID }}
        <tr>
          <td colspan="2" style="padding: 0">
            <table
              style="
                background-color: #fff;
                border-radius: 8px;
                text-align: left;
                max-width: 480px;
                width: 100%;
                padding: 16px;
                margin-bottom: 15px;
              "
            >
              <tr>
                <th colspan="2">
                  <p
                    style="
                      text-align: start;
                      color: #4d4d4d;
                      font-size: 20px;
                      font-style: normal;
                      font-weight: 400;
                      line-height: normal;
                      margin-bottom: 10px;
                    "
                  >
                  {{ index $.QuestionsMap .AnswerID }}
                  </p>
                </th>
              </tr>

              <tr>
                <td style="color: #9a9aaf; font-size: 20px; font-style: normal; font-weight: 400; line-height: normal">
                  {{ renderImage .Content }}
                </td>
              </tr>
            </table>
          </td>
        </tr>
        {{ end }}
      {{end}}

      <tr>
        <td colspan="2" style="text-align: center; padding: 0">
          <a style="color: #7e2aea; font-size: 20px; font-style: normal; font-weight: 400; line-height: normal">
            quiz.pena.digital
          </a>
        </td>
      </tr>
    </table>
  </body>
</html>
