/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Header and Footer Styling */
header {
    background-color: #006769;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0.5rem 1rem;
    height: auto;
    position: relative;
    z-index: 1003; /* Ensure header is above the sidebar */
}

header .logo img {
    max-height: 50px; /* Adjust logo height for the header */
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Footer Styling */
footer {
    background-color: #006769;
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
    z-index: 1001;
}

/* Main Content */
main {
    display: flex;
    flex: 1;
    padding: 1rem;
    justify-content: flex-start;
    position: relative;
    z-index: 1000;
    transition: padding-left 0.3s ease;
}

/* Sidebar Styling */
#sidebar {
    width: 250px;
    box-sizing: border-box;
    background-color: #f4f4f4;
    padding: 1rem;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 1002; /* Ensure it's above the TinyMCE editor */
    transition: transform 0.3s ease, top 0.3s ease;
    transform: translateX(-100%);
    position: fixed;
    top: 60px; /* Default top for desktop */
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

#sidebar.open {
    transform: translateX(0);
}

#sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#sidebar ul li {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#sidebar ul li a {
    text-decoration: none;
    color: #006769;
    display: block;
    font-weight: bold;
}

#sidebar ul li:hover {
    background-color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

/* Toggle Button Styling */
#toggle-sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: #006769;
    color: white;
    border: none;
    padding: 10px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1003;
    width: auto;
    height: auto;
}

/* '+' Button Styling */
.add-note {
    font-size: 40px;
    color: white;
    background-color: #006769;
    padding: 0.5rem;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-note:hover {
    background-color: #005f5f;
}

.add-note:active {
    background-color: #004d4d;
}

/* Adjust card and toggle button for larger screens */
@media (min-width: 769px) {
    #sidebar {
        transform: none;
        position: fixed;
        top: 60px; /* Align with header */
    }

    #toggle-sidebar {
        display: none;
    }

    main {
        padding-left: 250px;
    }
}

/* Show the toggle button on mobile devices */
@media (max-width: 768px) {
    #toggle-sidebar {
        display: block;
    }

    main {
        padding-left: 0;
    }

    #sidebar.open ~ main {
        padding-left: 250px;
    }

    section {
        width: 100%;
    }

    /* Stack the logo and nav items vertically if necessary */
    header {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}
/* --------------------------- */
/* Checklist UI Styling        */
/* --------------------------- */

#checklist-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

#new-checklist-item-text {
    flex: 1;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}

#add-checklist-item-btn {
    background-color: #006769;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#add-checklist-item-btn:hover {
    background-color: #005a5c;
}

#checklist-container {
    margin-bottom: 15px;
}

.checklist-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 6px;
    transition: background-color 0.2s ease;
}

.checklist-item-row:hover {
    background: #f5f5f5;
}

.checklist-item-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checklist-item-row label {
    flex: 1;
    font-size: 15px;
    cursor: pointer;
}
/* Checklist note layout */
#checklist-toolbar {
    display: flex;
    gap: 10px;
    margin: 10px 0 12px 0;
    align-items: center;
}

#new-checklist-item-text {
    flex: 1;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
}

#add-checklist-item-btn {
    background-color: #006769;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
}

#add-checklist-item-btn:hover {
    background-color: #00585a;
}

#checklist-container {
    max-width: 520px;
    margin-bottom: 14px;
}

.checklist-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.checklist-item-row:hover {
    background-color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.12);
}

.checklist-item-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex: 0 0 auto;
}

.checklist-item-row label {
    color: #222;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

#title,
#tags {
    max-width: 420px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

section {
    width: 100%;
    max-width: 900px;
}
/* Top-left action buttons layout */
#sidebar > div:first-child {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 15px;
}

/* Improve icon buttons */
.add-note {
    width: 60px;
    height: 60px;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

/* Checklist icon */
.add-note[title="New Checklist"] {
    background-color: #F2C14E;
    color: #333;
}

.add-note[title="New Checklist"]:hover {
    background-color: #e3b43e;
}