{% extends 'base.html' %}
{% load static %}

{% block title %}New Mood Entry - PixelMinds{% endblock %}

{% block content %}
<div class="section">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-7">
                <div class="card shadow-lg border-0">
                    <div class="card-body p-5">
                        <h1 class="section-title text-center mb-4">How are you feeling?</h1>
                        <form method="post" novalidate>
                            {% csrf_token %}

                            <div class="mb-4">
                                <label for="{{ form.mood_score.id_for_label }}" class="form-label fs-5">Your Mood Score (1-10)</label>
                                {{ form.mood_score }}
                                {% if form.mood_score.errors %}
                                    <div class="invalid-feedback d-block">
                                        {{ form.mood_score.errors|striptags }}
                                    </div>
                                {% endif %}
                            </div>

                            <div class="mb-4">
                                <label for="{{ form.note.id_for_label }}" class="form-label fs-5">Notes</label>
                                {{ form.note }}
                                {% if form.note.errors %}
                                    <div class="invalid-feedback d-block">
                                        {{ form.note.errors|striptags }}
                                    </div>
                                {% endif %}
                            </div>

                            <div class="mb-4">
                                <label class="form-label fs-5">Activities</label>
                                <div id="id_activities" class="border rounded p-3 bg-light">
                                {% for checkbox in form.activities %}
                                    <div class="form-check form-check-inline me-3">
                                        {{ checkbox.tag }}
                                        <label class="form-check-label" for="{{ checkbox.id_for_label }}">{{ checkbox.choice_label }}</label>
                                    </div>
                                {% endfor %}
                                </div>
                                {% if form.activities.errors %}
                                    <div class="invalid-feedback d-block">
                                        {{ form.activities.errors|striptags }}
                                    </div>
                                {% endif %}
                            </div>

                            <div class="d-grid">
                                <button type="submit" class="btn btn-primary btn-lg">Save Entry</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}