<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="noindex, nofollow">
    <title>Create Your Property Website | PropertyWebBuilder</title>
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    <%= stylesheet_link_tag "tailwind-default", "data-turbo-track": "reload" %>
  </head>
  <body class="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
    <div class="min-h-screen flex flex-col">
      <!-- Header -->
      <header class="bg-white shadow-sm">
        <div class="max-w-7xl mx-auto px-4 py-4 sm:px-6 lg:px-8">
          <div class="flex justify-between items-center">
            <h1 class="text-2xl font-bold text-indigo-600">PropertyWebBuilder</h1>
            <span class="text-sm text-gray-500">Create your property website</span>
          </div>
        </div>
      </header>

      <!-- Progress Bar -->
      <% if defined?(@step) && @step %>
        <div class="bg-white border-b">
          <div class="max-w-3xl mx-auto px-4 py-4">
            <div class="flex items-center justify-between">
              <% [
                { step: 1, label: 'Email' },
                { step: 2, label: 'Configure' },
                { step: 3, label: 'Setup' },
                { step: 4, label: 'Complete' }
              ].each do |s| %>
                <div class="flex items-center">
                  <div class="<%= s[:step] <= @step ? 'bg-indigo-600 text-white' : 'bg-gray-200 text-gray-600' %> w-8 h-8 rounded-full flex items-center justify-center font-semibold text-sm">
                    <%= s[:step] < @step ? '&#10003;'.html_safe : s[:step] %>
                  </div>
                  <span class="ml-2 text-sm <%= s[:step] <= @step ? 'text-indigo-600 font-medium' : 'text-gray-500' %> hidden sm:inline">
                    <%= s[:label] %>
                  </span>
                </div>
                <% if s[:step] < 4 %>
                  <div class="flex-1 h-1 mx-4 <%= s[:step] < @step ? 'bg-indigo-600' : 'bg-gray-200' %>"></div>
                <% end %>
              <% end %>
            </div>
          </div>
        </div>
      <% end %>

      <!-- Main Content -->
      <main class="flex-1 flex items-center justify-center p-4">
        <div class="w-full max-w-lg">
          <% if flash[:error] %>
            <div class="mb-4 p-4 bg-red-100 border border-red-400 text-red-700 rounded-lg">
              <%= flash[:error] %>
            </div>
          <% end %>
          <% if flash[:notice] %>
            <div class="mb-4 p-4 bg-green-100 border border-green-400 text-green-700 rounded-lg">
              <%= flash[:notice] %>
            </div>
          <% end %>
          <%= yield %>
        </div>
      </main>

      <!-- Footer -->
      <footer class="bg-white border-t py-4">
        <div class="max-w-7xl mx-auto px-4 text-center text-sm text-gray-500">
          &copy; <%= Date.current.year %> PropertyWebBuilder. All rights reserved.
        </div>
      </footer>
    </div>
  </body>
</html>
