/* --- Add Task Form --- */
.add-task-form {
    display: none;
    padding: 10px 20px;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg-alt);
}
.add-task-form.visible {
    display: block;
}
.input-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}
#new-task-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 8px 0;
    font-size: 1em;
    min-width: 0;
}
/* NEW: Bottom row layout for Add Task */
.form-bottom-row {
    display: flex;
    justify-content: space-between; /* Formatting left, Actions right */
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap; /* Handle mobile wrapping */
    gap: 10px;
}
.add-fmt-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}
.v-separator {
    width: 1px;
    height: 1.5rem; /* Adjusted for better alignment with buttons */
    background: var(--color-border);
    margin: 0 6px;
    align-self: center;
}
.icon-btn {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1.1em;
    padding: 2px 5px;
    border-radius: 4px;
    color: var(--color-text-alt);
}
.icon-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text);
}
/* Override .form-actions to fit in row */
.form-actions {
    margin-top: 0; 
    display: flex;
    gap: 10px;
}
.form-actions button[type="submit"] {
    background-color: var(--color-accent);
    color: white;
    border: none;
}
.form-actions button[type="submit"]:hover {
    background-color: #c53e30;
}
/* --- Context Menu --- */
.context-menu {
    display: none;
    position: absolute; /* Default to 'desktop' (JS-controlled) positioning */
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 6px;
    z-index: 1000;
    min-width: 200px;
}
/* Mobile-specific styles for Context Menu */
@media (max-width: 768px) {
    .context-menu {
        position: fixed; /* On mobile, it's a fixed modal */
        top: 20px; /* Justified top with little padding */
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
    }
}
.context-menu ul {
    list-style: none;
}
.context-menu li {
    display: flex;
    align-items: center;
    padding: 3px 1px;
    cursor: pointer;
    border-radius: 5px;
}
.context-menu li:hover {
    background-color: var(--color-bg-alt);
}
.context-menu li.danger {
    color: var(--color-danger);
}
.context-menu li.danger:hover {
    background-color: #FFF0F0;
}
.context-menu li.context-menu-divider {
    display: block; /* Override flex alignment */
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 4px 0;
    padding: 0;
    height: 0;
    line-height: 0;
    list-style: none;
}
/* This is the icon-holder class for menus */
.menu-icon {
    display: inline-block;
    width: 4em;
    text-align: center;
    margin-right: 6px;
    flex-shrink: 0;
    border-right: 1px solid var(--color-border);
}
/* --- Loading Spinner --- */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--color-border);
    border-top: 5px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* --- Notification Banner --- */
.notification-banner {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #282828;
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 5000;
    align-items: center;
    gap: 20px;
}
.notification-banner.visible {
    display: flex;
}
/* NEW: Green variant for task completion confirmation - MASSIVE SIZE */
.notification-banner.confirm-completion {
    background-color: #2E7D32; /* Dark Green */
    
    /* Make it Huge (approx 4x feel) */
    padding: 40px 60px;
    width: 90%;
    max-width: 700px;
    bottom: 30vh; /* Move it up to center-ish */
    
    flex-direction: column; /* Stack message and buttons */
    gap: 30px;
    
    border: 4px solid #1B5E20;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Increase text size for the massive banner */
.notification-banner.confirm-completion #notification-message {
    font-size: 2rem;
    text-align: center;
    line-height: 1.3;
}

#notification-message {
    font-weight: 500;
}
#notification-message strong {
    color: #E0E0E0;
}
.notification-actions {
    display: flex;
    gap: 10px;
}
/* NEW: Actions layout for massive banner */
.notification-banner.confirm-completion .notification-actions {
    gap: 30px;
    width: 100%;
    justify-content: center;
}

.notification-actions button {
    background: transparent;
    border: 1px solid #666666;
    color: #FFFFFF;
    padding: 4px 10px;
    cursor: pointer;
}
.notification-actions button:hover {
    background: #444444;
}

/* NEW: Massive buttons for confirmation */
.notification-banner.confirm-completion .notification-actions button {
    font-size: 1.8rem;
    padding: 20px 50px;
    border: 3px solid #A5D6A7; /* Lighter green border */
    background-color: #43A047;
    border-radius: 8px;
    font-weight: bold;
    flex-grow: 1; /* Make buttons fill width */
    max-width: 250px;
}

.notification-banner.confirm-completion .notification-actions button:hover {
    background-color: #1B5E20;
    transform: scale(1.05); /* Slight grow effect */
    border-color: #ffffff;
}

.notification-actions button.action {
    border-color: #888888;
    font-weight: bold;
}
/* --- Formatting Toolbar (Edit Modal) --- */
.formatting-toolbar {
    display: flex;
    align-items: center; /* Ensure vertical centering for all items including separator */
    gap: 5px;
    margin-bottom: 5px;
    padding: 4px;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}
.format-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--color-text-alt);
}
.format-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text);
}
