﻿body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa; /* Light background */
    padding: 20px;
}

h1 {
    color: #007bff; /* Primary blue color */
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Style the main section wrapper */
.card {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* --- Dropdown and Controls --- */
#categoryDropdown {
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    width: 300px; /* Limit the width */
    font-size: 16px;
}

/* --- Item List Styling --- */
#currentItemsList {
    list-style: none; /* Remove bullet points */
    padding: 0;
    margin-top: 15px;
}

    #currentItemsList li {
        display: flex; /* Use flex for horizontal layout within the list item */
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        margin-bottom: 8px;
        border: 1px solid #e9ecef;
        border-radius: 4px;
        background-color: #f8f9fa;
        transition: background-color 0.2s;
    }

        #currentItemsList li:hover {
            background-color: #e2e6ea;
        }

.item-text, .item-edit-input {
    flex-grow: 1; /* Allows the text/input to take up most space */
    margin-right: 15px;
}

.item-edit-input {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* --- Buttons --- */
button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s, opacity 0.2s;
    margin-left: 5px; /* Space between buttons */
}

/* Primary Button (Save) */
#saveButton {
    background-color: #28a745; /* Success green */
    color: white;
}

    #saveButton:hover {
        background-color: #218838;
    }

/* Action Buttons (Edit/Add) */
.edit-btn, #addItemButton {
    background-color: #007bff; /* Primary blue */
    color: white;
}

    .edit-btn:hover, #addItemButton:hover {
        background-color: #0056b3;
    }

/* Delete Button */
.delete-btn {
    background-color: #dc3545; /* Danger red */
    color: white;
}

    .delete-btn:hover {
        background-color: #c82333;
    }

/* --- Add New Item Area --- */
.add-new-item {
    display: flex; /* Layout input and button horizontally */
    gap: 10px;
    margin-top: 20px;
}

#newItemText {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

/* --- Modal/Warning --- */
#unsavedChangesModal {
    border: 1px solid #ffc107; /* Warning yellow border */
    background-color: #fff3cd; /* Light yellow background */
    color: #856404; /* Dark text */
    padding: 20px;
    border-radius: 5px;
    margin-top: 30px;
}

    #unsavedChangesModal h3 {
        margin-top: 0;
        color: #856404;
    }

#modalContinueButton {
    background-color: #ffc107;
    color: #343a40;
}

#modalCancelButton {
    background-color: #6c757d; /* Secondary gray */
    color: white;
}
