<!DOCTYPE html>
<html>
<head>
    <title>Chatbot</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container-fluid">
        <div class="row justify-content-center mt-5">
            <div class="col-12 col-sm-10 col-md-8 col-lg-6 col-xl-4">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title">Chatbot</h4>
                    </div>
                    <div class="card-body">
                        <ul class="chat-box">
                            {% for message in conversation %}
                                {% if message[0] == 'AI' %}
                                    <li class="bot">{{ message[1] }}</li>
                                {% else %}
                                    <li class="user">{{ message[1] }}</li>
                                {% endif %}
                            {% endfor %}
                        </ul>
                    </div>
                    <div class="card-footer">
                        <form id="chat-form">
                            <div class="input-group">
                                <input type="text" name="message" class="form-control" placeholder="Type your message...">
                                <div class="input-group-append">
                                    <button type="submit" class="btn btn-primary"><i class="mdi mdi-send"></i></button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/js/bootstrap.min.js"></script>
    <script src="{{ url_for('static', filename='js/chat.js') }}"></script>
</body>
</html>