/* ========== 待办组件样式 ========== */
#todo-widget .widget-content {
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 16px;
    opacity: 1;
}

#todo-widget.collapsed .widget-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

#todo-widget.collapsed .widget-collapse-btn i {
    transform: rotate(-90deg);
}

.todo-count-badge {
    visibility: hidden;
    background: #ff6b6b;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#todo-widget.collapsed .todo-count-badge {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

#todo-list {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 12px;
}

#todo-list::-webkit-scrollbar {
    width: 4px;
}

#todo-list::-webkit-scrollbar-thumb {
    background: var(--widget-input-border);
    border-radius: 2px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--widget-border);
    transition: all 0.3s ease;
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    cursor: pointer;
    flex-shrink: 0;
}

.todo-text {
    flex: 1;
    min-width: 0;
    color: var(--widget-text-color);
    font-size: 13px;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--widget-text-secondary);
}

.todo-delete {
    background: none;
    border: none;
    color: var(--widget-text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0;
}

.todo-item:hover .todo-delete {
    opacity: 1;
}

.todo-delete:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
}

.todo-input-container {
    display: flex;
}

#todo-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--widget-input-bg);
    border: 1px solid var(--widget-input-border);
    border-radius: 10px;
    color: var(--widget-text-color);
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

#todo-input::placeholder {
    color: var(--widget-text-secondary);
}

#todo-input:focus {
    border-color: var(--accent-color);
    background: var(--widget-input-bg);
}
