<!DOCTYPE html>
<html lang="{{.Locale}}">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="theme-color" content="#fff">
    <title>{{.TemplateTitle}}</title>
    <link rel="stylesheet" href="{{asset .Domain "/fonts/fonts.css" .ContextName}}">
    <link rel="stylesheet" href="{{asset .Domain "/css/cozy-bs.min.css" .ContextName}}">
    <link rel="stylesheet" href="{{asset .Domain "/styles/theme.css" .ContextName}}">
    <link rel="stylesheet" href="{{asset .Domain "/styles/cirrus.css" .ContextName}}">
    {{.Favicon}}
    <link rel="preload" href="/assets/icons/check.svg" as="image">
  </head>
  <body class="modal-open">
    <div class="modal d-block theme-inverted" tabindex="-1" aria-modal="true" role="dialog">
      <div class="modal-dialog modal-dialog-centered">
        <main role="application" class="modal-content">
          <div class="modal-icon">
            <span class="icon icon-auth"></span>
          </div>
          <div class="modal-body mt-4 mt-md-1 p-md-5">
            <form id="login-form" method="POST" action="/auth/confirm" class="d-contents" data-iterations="{{.Iterations}}" data-salt="{{.Salt}}">
              <input id="state" type="hidden" name="state" value="{{.State}}" />
              <input id="redirect" type="hidden" name="redirect" value="{{.Redirect}}" />
              <input id="csrf_token" type="hidden" name="csrf_token" value="{{.CSRF}}" />
              <input id="trusted-device-token" type="hidden" name="trusted-device-token" value="" />

              <h1 class="h4 h2-md mb-0 text-center">{{t "Login Confirm Title"}}</h1>
              <p class="mb-4 mb-md-5 text-muted text-center">{{t "Login Confirm Help"}}</p>
              <div id="login-field" class="input-group form-floating has-validation w-100">
                <input type="password" class="form-control form-control-md-lg" id="password" name="passphrase" autofocus autocomplete="current-password" />
                <label for="password">{{t "Login Password field"}}</label>
                <button id="password-visibility-button" class="btn btn-outline-info" type="button" name="password-visibility"
                        data-show="{{t "Login Password show"}}" data-hide="{{t "Login Password hide"}}" title="{{t "Login Password show"}}">
                  <span id="password-visibility-icon" class="icon icon-eye-closed"></span>
                </button>
              </div>
              <a href="/auth/passphrase_reset{{if .Redirect}}?redirect={{.Redirect}}{{end}}" class="align-self-start my-3">
                {{t "Login Forgot password"}}
              </a>
              <button id="login-submit" class="btn btn-primary btn-md-lg w-100 mt-4 mt-md-5" type="submit">
                {{t "Login Submit"}}
              </button>

            </form>
          </div>
          <a href="{{or .Redirect "/"}}" class="btn btn-icon position-absolute top-0 end-0" aria-label="Close">
            <span class="icon icon-cross"></span>
          </a>
        </div>
      </div>
    </div>
    <div class="modal-backdrop show"></div>
    <script src="{{asset .Domain "/scripts/cirrus.js"}}"></script>
    {{if .CryptoPolyfill}}<script src="{{asset .Domain "/js/asmcrypto.js"}}"></script>{{end}}
    <script src="{{asset .Domain "/scripts/password-helpers.js"}}"></script>
    <script src="{{asset .Domain "/scripts/password-visibility.js"}}"></script>
    <script src="{{asset .Domain "/scripts/login.js"}}"></script>
  </body>
</html>
