/* ================================
   BASE / GLOBAL
   ================================ */
* {
    font-family: 'Lato', sans-serif;
    box-sizing: border-box;
}


h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

body {
    background-color: #ffea9e;
    margin: 0;
    padding: 0;
    margin-top: 0px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    color: #cc7000;
}

a:hover {
    color: #000;
}


/* ================================
   BUTTONS
   Global style applied to all buttons
   across the website.
   ================================ */
button {
    background-color: #ff9900;
    color: #000;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.95em;
    border-radius: 4px;
}

button:hover {
    background-color: #e68a00;
}


/* ================================
   NAVIGATION
   Full-width bar flush to the top of
   the page. Links centered using flexbox.
   ================================ */
nav {
    background-color: #FEC601;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

nav a {
    padding: 10px 16px;
    text-decoration: none;
    color: #000;
}

nav a:hover {
    background-color: #e6b100;
}

nav a.active {
    background-color: #b83200;
    color: #fff;
    font-weight: bold;
}


/* ================================
   SITE TITLE (index.html only)
   Sits above the nav bar as a header.
   Overrides the global h1 max-width so
   it spans the full page width.
   ================================ */
#site-title {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px 16px;
    text-align: center;
    font-size: 1.8em;
    background: linear-gradient(135deg, #ffea9e 0%, #ffd84f 50%, #ff9900 100%);
}


/* ================================
   HERO IMAGE (index.html)
   ================================ */
#hero-image-placeholder {
    width: 100%;
    max-width: 860px;
    margin: 24px auto 0;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}

#hero-image-placeholder img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
}

@media (max-width: 768px) {
    #hero-image-placeholder img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    #hero-image-placeholder img {
        height: 160px;
    }
}


/* ================================
   PAGE HEADINGS
   ================================ */
h1 {
    margin-top: 10px;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 0 16px;
}

main h1 {
    background: linear-gradient(90deg, #ffd84f, #ffea9e);
    padding: 20px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    margin-top: 24px;
}

h3,
p {
    margin-top: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 1.4em;
    padding: 0 16px;
}


/* ================================
   MAIN CONTENT WRAPPER (index.html)
   Constrained width, centered on page.
   ================================ */
main {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}


/* ================================
   CARD ACCENT + INPUT FOCUS (global)
   ================================ */
.review-card,
.note-card,
#review-form-section {
    border-left: 4px solid #ff9900;
}

input:focus,
textarea:focus {
    outline: 2px solid #ff9900;
    outline-offset: 1px;
}


/* ================================
   REVIEW FORM SECTION (index.html)
   ================================ */
#review-form-section {
    background-color: #fff7db;
    border: 1px solid black;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

#review-form-section h2 {
    margin-top: 0;
}

#review-form label {
    display: block;
    margin-top: 10px;
    font-size: 0.95em;
}

#review-form input,
#review-form textarea {
    width: 100%;
    margin-top: 4px;
    padding: 6px 8px;
    font-size: 0.95em;
}

#review-form textarea {
    min-height: 80px;
    resize: vertical;
}


/* ================================
   REVIEW CARDS (index.html)
   White background, confined to main width.
   ================================ */
.review-card {
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.review-card h3 {
    margin: 0 0 4px;
    text-align: left;
    font-size: 1.1em;
    max-width: none;
    padding: 0;
}

.review-meta {
    font-size: 0.9em;
    color: #555;
    margin: 0 0 8px;
}

.comments-section {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid #ccc;
}

.comment {
    margin: 4px 0;
    font-size: 0.9em;
}

.comment-form {
    margin-top: 8px;
}


/* ================================
   SCHEDULE PAGE (schedule.html)
   ================================ */

/* Activity input form — horizontal bar with matching background */
#schedule-form {
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

#schedule-form label {
    font-weight: bold;
    margin: 0;
}

#schedule-form input {
    padding: 6px 8px;
    font-size: 0.95em;
}

/* Calendar header — month label on the left, arrows to the right */
#calendar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

#calendar-header h2 {
    margin: 0;
    flex: 1;
}

/* Calendar table — #fff7db background on all cells */
#calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}

#calendar-table th {
    border: 1px solid #000;
    padding: 8px;
    text-align: center;
    background-color: #fff7db;
}

#calendar-table td.day-cell {
    border: 1px solid #000;
    vertical-align: top;
    width: 14.28%;
    min-height: 100px;
    height: 100px;
    padding: 4px;
    background-color: #fff7db;
}

#calendar-table td.empty {
    border: 1px solid #000;
    width: 14.28%;
    background-color: #fff7db;
}

/* Highlight today's date in the calendar */
#calendar-table td.today {
    outline: 2px solid #ff9900;
    outline-offset: -2px;
}

.day-number {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

/* Activity flags inside calendar cells — matching background */
.activity-flag {
    background-color: #ffd84f;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85em;
    margin-bottom: 4px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

/* X remove button — smaller than the global button style */
.remove-btn {
    font-size: 0.7em;
    padding: 2px 5px;
    line-height: 1;
}

/* Compact circle buttons for month navigation */
#prev-month,
#next-month {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slightly warmer background on weekend columns */
#calendar-table tbody tr td.day-cell:nth-child(1),
#calendar-table tbody tr td.day-cell:nth-child(7),
#calendar-table tbody tr td.empty:nth-child(1),
#calendar-table tbody tr td.empty:nth-child(7) {
    background-color: #fffbe6;
}


/* ================================
   CHECKLIST
   Applies to all checklist-style lists
   across checklist.html and activity.html.
   Removes default bullet styling and lays
   each item out as checkbox → label inline.
   ================================ */

/* Remove bullets and default list padding */
#checklist-items,
#checklist-preview,
.custom-activity-card ul,
#result-custom-activities ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

/* Each item: checkbox on the left, label to the right */
#checklist-items li,
#checklist-preview li,
.custom-activity-card li,
#result-custom-activities li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}

.crossed-off {
    text-decoration: line-through;
    color: #888;
}


/* ================================
   NOTES PAGE (userNotes.html)
   ================================ */

/* Note form — centered vertical layout with constrained width */
#note-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 24px;
    max-width: 480px;
    margin: 0 auto 32px;
    text-align: center;
}

#note-form label {
    font-weight: bold;
    margin-bottom: 4px;
}

#note-form input,
#note-form textarea {
    width: 100%;
    padding: 8px;
    font-size: 0.95em;
    margin-bottom: 16px;
    box-sizing: border-box;
}

#note-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Notes grid — multi-column on wider screens */
#notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

/* Individual note cards */
.note-card {
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    margin: 0;
    text-align: center;
}

.note-card h3 {
    margin: 0 0 4px;
    font-size: 1.1em;
    max-width: none;
    padding: 0;
    text-align: center;
}

.note-card small {
    display: block;
    color: #666;
    font-size: 0.8em;
    margin-bottom: 8px;
}

.note-card p {
    font-size: 0.95em;
    margin: 0 0 12px;
    max-width: none;
    padding: 0;
    text-align: center;
}


/* ================================
   PROFILE PAGE (profile.html)
   Centered vertical form, all elements aligned to center.
   ================================ */

#profile-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 32px 24px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

#profile-form label {
    font-weight: bold;
    margin-bottom: 4px;
}

#profile-form input {
    width: 100%;
    padding: 8px;
    font-size: 0.95em;
    margin-bottom: 16px;
    box-sizing: border-box;
}

/* Success and error messages centered below the form */
#profile-success,
#profile-error {
    text-align: center;
    max-width: 420px;
    margin: 8px auto 0;
    padding: 0;
    font-size: 0.95em;
}

#profile-success {
    color: #7a5800;
}


/* ================================
   AUTH PAGE (auth.html)
   Centered vertical form bar, consistent
   with the other forms across the site.
   ================================ */

#auth-container {
    max-width: 420px;
    margin: 60px auto;
}

#login-form-section,
#signup-form-section {
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 32px 24px;
    text-align: center;
}

#login-form-section h1,
#signup-form-section h1 {
    margin: 0 0 20px;
    max-width: none;
    padding: 0;
    font-size: 1.5em;
}

#login-form,
#signup-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#login-form label,
#signup-form label {
    font-weight: bold;
    margin-bottom: 4px;
}

#login-form input,
#signup-form input {
    width: 100%;
    padding: 8px;
    font-size: 0.95em;
    margin-bottom: 16px;
    box-sizing: border-box;
}

/* Toggle link and error message below the form */
#login-form-section p,
#signup-form-section p {
    font-size: 0.9em;
    max-width: none;
    padding: 0;
    margin: 8px 0 0;
    text-align: center;
}

.auth-error {
    color: red;
}


/* ================================
   ACTIVITY PAGE (activity.html)
   Each section gets a white card with
   constrained width and spacing between them.
   ================================ */

/* Quiz and result sit inside <main>, which already
   constrains width. Give them the white card look.
   Narrower max-width keeps the form compact. */
#quiz-container,
#result-container {
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 24px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* Center buttons within the quiz and result boxes */
#quiz-container button,
#result-container button {
    display: block;
    margin: 20px auto 0;
}

/* More breathing room between each quiz option */
#options-container label {
    display: block;
    padding: 8px 0;
}

/* Food generator and custom activity are outside <main>,
   so they need their own width constraint and centering.
   Narrowed to match the quiz box width. */
#food-generator,
#custom-activity-section {
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 28px;
    max-width: 620px;
    margin: 24px auto;
}

/* Saved custom activity cards — bordered, narrower than the parent section */
.custom-activity-card {
    border: 1px solid #bbb;
    border-radius: 6px;
    padding: 14px;
    margin-top: 16px;
    max-width: 460px;
}

/* Center the generate button in the food section */
#food-generator button {
    display: block;
    margin: 20px auto 0;
}

/* Activity page image row */
.activity-images {
    display: flex;
    gap: 12px;
    justify-content: center;
    background-color: #fff7db;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.activity-images img {
    width: calc(33.33% - 8px);
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .activity-images {
        flex-direction: column;
    }

    .activity-images img {
        width: 100%;
        height: 140px;
    }
}


/* Food result card */
#food-result {
    background-color: #fff7db;
    border-left: 4px solid #ff9900;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 16px;
}

/* Override global p style inside food generator —
   global p is 1.4em which makes question text too large */
#food-generator p {
    font-size: 1em;
    max-width: none;
    text-align: left;
    margin-top: 12px;
    padding: 0;
}

/* Space out form elements inside activity sections */
#food-generator label,
#custom-activity-section label {
    display: block;
    margin-top: 10px;
}

#custom-activity-section input[type="text"],
#custom-activity-section textarea {
    width: 100%;
    padding: 6px 8px;
    margin-top: 4px;
    font-size: 0.95em;
}

#custom-activity-section fieldset {
    margin-top: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
}

/* Checklist builder row */
#checklist-builder {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

#checklist-item-input {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.95em;
    min-width: 160px;
}

/* Hide the <hr> separators — spacing from the cards handles separation */
body>hr {
    display: none;
}

/* Back link styled as a button (checklist.html) */
.back-link {
    display: inline-block;
    background-color: #ff9900;
    color: #000;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95em;
    margin-top: 16px;
}

.back-link:hover {
    background-color: #e68a00;
    color: #000;
}


/* ================================
   FOOTER
   ================================ */
footer {
    background-color: #FEC601;
    text-align: center;
    padding: 16px;
    margin-top: 40px;
    color: #4a3500;
    font-size: 0.9em;
}

footer p {
    margin: 0;
    font-size: 0.9em;
    max-width: none;
    padding: 0;
}


/* ================================
   RESPONSIVE — TABLET (max 768px)
   ================================ */
@media (max-width: 768px) {



    nav a {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    h3,
    p {
        font-size: 1.2em;
    }

    main {
        padding: 0 12px 32px;
    }
}


/* ================================
   RESPONSIVE — PHONE (max 480px)
   ================================ */
@media (max-width: 480px) {



    nav a {
        padding: 10px 8px;
        font-size: 0.85em;
    }

    h1 {
        font-size: 1.4em;
    }

    h3,
    p {
        font-size: 1em;
    }

    .review-card {
        padding: 12px;
    }
}