JSFiddle - React, Tailwind, and code Playground

by rowntreerob

HTML

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Install App Guide</title>
  <style>
    /* Basic styling for the chat interface */
    body {
      font-family: Arial, sans-serif;
      background: #f5f5f5;
      margin: 0;
      padding: 0;
    }
    #chat-container {
      max-width: 600px;
      margin: 50px auto;
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      display: flex;
      flex-direction: column;
      height: 80vh;
    }
    #chat-log {
      padding: 20px;
      flex-grow: 1;
      overflow-y: auto;
      border-bottom: 1px solid #ccc;
    }
    .message {
      margin-bottom: 10px;
      line-height: 1.4;
    }
    .bot {
      color: #333;
    }
    .user {
      color: #007bff;
      text-align: right;
    }
    #input-container {
      padding: 10px;
    }
    #user-input {
      width: calc(100% - 22px);
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 4px;
      outline: none;
    }
  </style>
</head>
<body>
  <div id="chat-container">
    <div id="chat-log"></div>
    <div id="input-container">
      <input type="text" id="user-input" placeholder="Type your message..." autofocus>
    </div>
  </div>

  <script>
    document.addEventListener("DOMContentLoaded", function() {
      const chatLog = document.getElementById('chat-log');
      const userInput = document.getElementById('user-input');

      let step = 0;
      const steps = [
        "Step 1: Ensure you are using your mobile Chrome browser. When ready, type 'done' and press Enter.",
        "Step 2: Open the URL for our web app. (If you aren’t there already, type the URL in your address bar: <strong>https://lyarncheef.github.io/ayuda</strong>.) Then type 'done' once you’re there.",
        "Step 3: Tap the three vertical dots (Chrome settings) in the upper-right corner. When you’ve done that, type 'done'.",
        "Step...