<div class="auth-container">
  <div class="auth-card">
    <header>
      <h1><%= t(".title") %></h1>
      <small><%= t(".description") %></small>
    </header>

    <%= form_with url: verify_backup_code_login_attempt_path(@attempt), method: :post, local: true do |form| %>
      <%= hidden_field_tag :return_to, params[:return_to] if params[:return_to].present? %>
      <fieldset>
        <%= form.label :code, t(".code_label") %>
        <%= form.text_field :code,
            required: true,
            autofocus: true,
            autocomplete: "off",
            placeholder: t(".placeholder") %>
      </fieldset>
      <%= form.submit t(".verify") %>
    <% end %>

    <% if @attempt.totp_available? %>
      <footer>
        <p>
          <%= link_to t(".use_authenticator"), totp_login_attempt_path(@attempt) %>
        </p>
      </footer>
    <% end %>
  </div>
</div>
