/* ========================================= */
/* TODO STYLES: Стили для компонента ToDo (чеклисты) */
/* ========================================= */


.node.todo-list-node{
    border-color: var(--green) !important;
}

.node.todo-list-node.selected { 
    border-color: var(--red) !important;
}

/* Контейнер чеклиста внутри кастомной ноды */
.node-todo-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 6px;
    overflow-y: auto; /* Позволяет прокручивать список задач */
    box-sizing: border-box;
}

/* Стилизация полосы прокрутки внутри ноды */
.node-todo-container::-webkit-scrollbar { 
    width: 4px; 
}
.node-todo-container::-webkit-scrollbar-thumb { 
    background: #444; 
    border-radius: 2px; 
}

/* Каждая отдельная строчка задачи */
.todo-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    /* ИСПРАВЛЕНО: Объединили padding, выделив 24px слева под порт и безопасный отступ контента */
    padding: 5px 8px 6px 24px; 
    border-radius: 20px 4px 4px 20px;
    flex-shrink: 0; /* Важно: не сжимать строку */
    width: 100%; 
    box-sizing: border-box;
    z-index: 68;
}

.todo-item:last-child {
    border-bottom: none;
}

/* Позиционирование порта внутри строки задачи (выносим строго за левую границу) */
.todo-item .port.input {
    position: absolute;
    /* ИСПРАВЛЕНО: Центрируем точку ровно в левом зазоре строки, чтобы по ней легко кликалось */
    left: 2px; 
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--yellow);
    cursor: pointer;
    z-index: 70; /* Чтобы порт гарантированно был выше фона строки */
}

/* Кастомный инпут текста задачи */
.todo-input {
    flex-grow: 1; /* Инпут забирает всё свободное пространство */
    background: transparent;
    border: none;
    color: #fff;
    font-size: 13px;
    outline: none;
    min-width: 0; /* Защита флекса от распирания длинным текстом */
}


.todo-item .todo-input {
    color: #f79c00;
}
/* Эффект вычеркивания при завершении задачи */
.todo-item.completed .todo-input {
    text-decoration: line-through;
    color: #00ff7b;
    opacity: 0.4;
}

/* Чекбокс */
.todo-checkbox {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #00ff88;
}

/* Кнопка удаления (крестик) */
.todo-btn-del {
    background: transparent;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 11px;
    padding: 0 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-left: auto; /* Прижимает к правому краю */
    flex-shrink: 0; 
}
.todo-btn-del:hover {
    opacity: 1;
}

/* Кнопка добавления (внизу контейнера) */
.todo-btn-add {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.08);
    border: 1px dashed rgba(0, 255, 136, 0.3);
    padding: 6px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    
    /* Жесткая фиксация кнопки внизу контейнера */
    margin-top: auto; 
    flex-shrink: 0;
    width: 100%;
    transition: background 0.2s, border-color 0.2s;
}
.todo-btn-add:hover { 
    background: rgba(0, 255, 136, 0.15); 
    border-color: rgba(0, 255, 136, 0.6);
}
